simple question
I'm trying to write my first app in REBOL but are facing some trouble. I'm doing a small game, and had a look at the examples at re-bol.com. However, they couldnt help me out with one fundamental problem, I can't seem to prevent my little "player" to run off the scene. I'm trying by looking at the player/offset/1 to see if it's < 550. When it is, I set it to 550. Or at least I try, but REBOL prints out that it's a lot more and do not care at all about my conditions :( Pygame seem so much simpler... since I know it ;) Regards Stefan
posted by: elwis 18-May-2010/14:18:41-7:00
ah, that little ugly piece of code seem to actually work, well then.. ;) box 0x0 #"l" [ if (z/offset/1 <= 550)[ print z/offset/1 z/offset: z/offset + 10x0 ]
posted by: elwis 18-May-2010/14:34:32-7:00
Check out the textris program for an example of how to use the cursor keys to control movement. Also http://www.rebol.org/view-script.r?script=async-get-keys.r
posted by: Nick 18-May-2010/15:31:52-7:00
Here's another small example R2 game: do http://www.rebol.com/scripts/pongo.r
posted by: Carl 19-May-2010/20:15:52-7:00
That Pongo script is one of the best documented games available - a great tutorial all on it's own.
posted by: Nick 24-May-2010/10:46:19-7:00
these games are also great. http://www.rebolforces.com/reb/13/gridlock.r http://www.rebolforces.com/reb/13/reblox.r http://www.rebolforces.com/reb/13/rotate.r I love the last one.
posted by: Endo 24-May-2010/16:49:25-7:00
Great Games! Just spent 15 minutes playing gridlock. Now to get my kids playing them.
posted by: Steve Oldner 25-May-2010/13:50:50-7:00
|