Re: Galaga 1990
Recently, Alejandro Tejada wrote: > How could you change the image of the > ship while executing a move command > to reflect that the ship received a hit > from the player? If you're using an image, set the text of the moving image to the text of your "exploding" image or similar. > After the player hit the ship, Could you > delete this ship while executing this > move command? Yes. Just tried both actions on an image moving across a card and they appear to work as expected (Rev 4 OS X). Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
This is a really interesting topic because this is similar to my first question to Scott Raney after i bought Metacard... Geoff Canyon Rev wrote: > > Since the enemies' paths are pre-determined in this method, you can > determine whether a particular shot will hit an enemy at the time the > shot is fired. And vice versa, whether an enemy that you are planning > the route for will intersect any of the current shots on the screen. > It requires a bit of work, but it's (much) better than checking each > time you move the ship to see whether any of the shots have hit any of > the enemies. > How could you change the image of the ship while executing a move command to reflect that the ship received a hit from the player? After the player hit the ship, Could you delete this ship while executing this move command? Thanks in advance! Alejandro -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Galaga-1990-tp2230572p2232288.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
Since the enemies' paths are pre-determined in this method, you can determine whether a particular shot will hit an enemy at the time the shot is fired. And vice versa, whether an enemy that you are planning the route for will intersect any of the current shots on the screen. It requires a bit of work, but it's (much) better than checking each time you move the ship to see whether any of the shots have hit any of the enemies. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
Geoff, Amazing. Much better. Thanks so much for your attention! Now I am off to try and detect collisions Much gratitude! On May 26, 2010, at 3:03 AM, Geoff Canyon Rev wrote: > You definitely don't want to do this by positioning everything every > time you update. Instead, the move command is your special friend > here. For the enemy, you can plot out a randomized course from the top > to the bottom, and then tell it to follow that path in a set amount of > time. The bullets are even easier since they just have to go from > bottom to top. I did a quick hack job, cutting the code about in half > and speeding it up significantly. It now handles three enemies and 11 > bullets without breaking a sweat on my macbook. Here's the stack: > http://snurl.com/wsclc and here's the article I posted with some > comments: http://gcanyon.posterous.com/a-blast-from-my-programming-past > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
Nice Geoff -- the use of the move command cuts down significantly on processor use. And your stack reinforces the benefits of avoiding a bunch of stacked "send" messages. Regards, Scott Rossi Creative Director Tactile Media, UX Design Recently, Geoff Canyon Rev wrote: > You definitely don't want to do this by positioning everything every > time you update. Instead, the move command is your special friend > here. For the enemy, you can plot out a randomized course from the top > to the bottom, and then tell it to follow that path in a set amount of > time. The bullets are even easier since they just have to go from > bottom to top. I did a quick hack job, cutting the code about in half > and speeding it up significantly. It now handles three enemies and 11 > bullets without breaking a sweat on my macbook. Here's the stack: > http://snurl.com/wsclc and here's the article I posted with some > comments: http://gcanyon.posterous.com/a-blast-from-my-programming-past ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
You definitely don't want to do this by positioning everything every time you update. Instead, the move command is your special friend here. For the enemy, you can plot out a randomized course from the top to the bottom, and then tell it to follow that path in a set amount of time. The bullets are even easier since they just have to go from bottom to top. I did a quick hack job, cutting the code about in half and speeding it up significantly. It now handles three enemies and 11 bullets without breaking a sweat on my macbook. Here's the stack: http://snurl.com/wsclc and here's the article I posted with some comments: http://gcanyon.posterous.com/a-blast-from-my-programming-past ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Galaga 1990
Hi "Generic": I took a look at your stack and you've done everything right from a conceptual standpoint. All your code makes sense. The problem you're running into is Rev's "real world" behavior and performance -- Rev is not multi-threaded and is not suited to managing lots of sub-second messages simultaneously. The practical way to do what you want is to use a single master repeat loop that handles all animation, movement, key tracking etc. This may seem counterintuitive to what you're trying to teach, but it's really the only way to get any smooth performance out of Rev that's suitable for a game. I modified your stack as an example of one way to enhance performance. Execute the following in your Rev message box: go url "http://www.tactilemedia.com/download/Galaga_1990_mod.rev"; All the code is at the stack level. Shots are limited to one at a time on screen, which of course you can change. Given what you've built so far, I think you'll be able to easily grasp what's going and modify as needed. Good luck. Regards, Scott Rossi Creative Director Tactile Media, UX Design Recently, Generic Email wrote: > So, I am teaching my kids programming. I started with Scratch. > http://scratch.mit.edu/ > > Our first game was Galaga 1990. > It is available to play here: > http://scratch.mit.edu/projects/TheCritic1/1057645 > > I wanted to teach them Rev as well, so I started recreating the game in Rev. > > My code for both the Scratch game and my Rev code so far is here: > http://drop.io/Galaga_1990 > > ok, my problem is that the fire coming from my main ship, in the rev game, > looks like crap. > I have limited it to 5 moving particles, but even so, it crawls. > > I am sure it is a newb mistake, but if someone could point me in the right > direction, it would help. > > Thanks!___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Galaga 1990
So, I am teaching my kids programming. I started with Scratch. http://scratch.mit.edu/ Our first game was Galaga 1990. It is available to play here: http://scratch.mit.edu/projects/TheCritic1/1057645 I wanted to teach them Rev as well, so I started recreating the game in Rev. My code for both the Scratch game and my Rev code so far is here: http://drop.io/Galaga_1990 ok, my problem is that the fire coming from my main ship, in the rev game, looks like crap. I have limited it to 5 moving particles, but even so, it crawls. I am sure it is a newb mistake, but if someone could point me in the right direction, it would help. Thanks!___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution