This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-01-23 15:01:43

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

custom level maker idea (edit, save, load, or re-edit)

I'm pretty sure a lot of you get the idea for making a basic level editor, you just add stuff and play right off the bat, and once your done with the game the level goes poof, well its actually possible to save and load custom levels, here's how:

get yourself a few lists first:
-tile
-spawnX
-spawnY
-level
-levelspawns

now setup a basic tile movement and stamping feature so people can start designing the level

now here's where saving comes into play
every time a tile is placed it sets its direction, position, and costume number into the list "tile". before placing any tiles you'll have to make a new variable for double every tile in the list "tile", you should of course have this done by coding. Now when you add a tile it will add the position by what variable it is within the list "tile". depending on the position on the level it will add data into the corresponding place in the list. now first you'll add the costume number. next you'll want to add the direction of the tile to the NEXT variable. why the next one? because it would be much harder to decipher the direction and costume number out of one variable. though if you must you can do it with the blocks in numbers for separating words. now once you save it all this data will go into the "level" list. if there is another saved level make sure the code will be able to detect this and skip the corresponding number of tiles. now spawning works the same as adding directions and costume numbers. once you save, the spawn X and Y will be transfered to levelspawns

now here's loading:
loading is much more simple. all we have to do is read at the correct starting point on the list "level". once you do so just tell it to stamp the tile using the corresponding costume number and direction. the level loading should on average take at most 10 seconds. now spawning is added for the player to randomly select between the variables of the spawn points for the level when spawning.

that's pretty much it, if you were expecting code the answer is no, if you cannot read this and figure out how to code you are then not ready to use material this advanced

EDIT:
forgot to add exporting and importing levels

to export a level all you need to do is type out all the variables in "level" and "levelspawns"

next add a feature to enter digits into the list and then you can click run and it will construct the level

Last edited by dingdong (2010-01-24 14:36:39)


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#2 2010-01-23 15:06:28

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: custom level maker idea (edit, save, load, or re-edit)

I don't need this right now, but it seems promising to those who use.


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#3 2010-01-23 15:09:57

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: custom level maker idea (edit, save, load, or re-edit)

Look at my Level Creator Players...


http://i.imgur.com/WBkM2QQ.png

Offline

 

#4 2010-01-24 08:34:08

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: custom level maker idea (edit, save, load, or re-edit)

This technique works,but there's one problem you can't solve;what if you go to another game,and come back?


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#5 2010-01-24 14:34:15

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: custom level maker idea (edit, save, load, or re-edit)

Brass45 wrote:

This technique works,but there's one problem you can't solve;what if you go to another game,and come back?

oh right I forgot about this feature, you can solve it, hold I'll re-edit the main post


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#6 2010-01-24 16:40:45

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: custom level maker idea (edit, save, load, or re-edit)

dingdong wrote:

Brass45 wrote:

This technique works,but there's one problem you can't solve;what if you go to another game,and come back?

oh right I forgot about this feature, you can solve it, hold I'll re-edit the main post

How does that help if you go to another webpage?I mean the kind of saving like in bloons TD4 and pretty much every game known to mankind.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#7 2011-02-15 20:01:32

doggycat
Scratcher
Registered: 2011-02-15
Posts: 2

Re: custom level maker idea (edit, save, load, or re-edit)

it a awsome game

Offline

 

Board footer