Thanks for the feedback. My younger son’s 12 but quite bright. The aim of the language was to just define where the platforms are etc and no more work would be required ie jumping etc would be handled by my part. The advantage of this little language is that you could create your own playable platform game in just a couple of lines of code as opposed to writing 100’s or 1000’s of lines of code ie the code snippet below is one whole platform game. The other advantage is that these levels could plug together.
This is a better description of what the previous program does:
simple set of 5 platforms with a ladder between each
define x 40 # sets x to 40
loop 5 # loops round 5 times
define y loop * 40 # y gets set to 140 then 240 etc
platform at x, y # draws a platform at x,y coord
ladder at x+rnd(100), y # draws connecting ladders
The above would be enough to start playing a game. It looks intuitive to me obviously because I came up with the language but it was interesting to hear I need to make it easier. The advantage of my small design is that I can create types of things (like platforms) and then plonk them on the screen to use. This is how I would define the platform and I’d do it elsewhere so the user doesn’t have to write the standard stuff:
define platform # this defines what a platform is
image “plat.png” # there’s an image
extend right 100 # that gets repeated for 100 pixels going right
action stand # the player can stand on this item
Other options apart from stand are :
- stand # player can stand on this
- climb # for ladders or trees I guess
- die # any contact will kill player
- ignore # just part of background image
- push # the player can push this item around
You can define various things for any item, so above we have the platform extending to the right for 100 pixels but, if that wasn’t what you wanted, you could just add a different extend when placing a platform ie:
platform at x, y extend up 200
Other options allow items to move so you could just define an elevator to go from the bottom of the screen to the top as follows:
define elevator # this defines what an elevator is
image “plat.png” # just used same picture but could be anything
action stand # must be able to stand on it
move up 400 restart # it will move up the screen 400 pixels and then restart
then I could place elevators anywhere on screen:
elevator at 50,0
elevator at 400,40
Does that make it clearer?