roland p Posted April 17, 2010 Share Posted April 17, 2010 Hi, I was trying out some racing engine for a top-view racer in the style of Monaco GP and Road fighter. The current kernal displays: -road -curvestones -one player car (Player sprite) -one enemy car (Missile sprite) There is no game logic yet. The cars will always follow the track. If I can repeat the enemy car (missile) and display them conditionally (as in turning individual cars on/off), I could make it into a racing game. racing.bin Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 17, 2010 Share Posted April 17, 2010 Very cool I did this parallax sprite effect in a demo years ago and think this effect would be cool for a game like Beamrider. Good luck Quote Link to comment Share on other sites More sharing options...
roland p Posted April 18, 2010 Author Share Posted April 18, 2010 Very cool I did this parallax sprite effect in a demo years ago and think this effect would be cool for a game like Beamrider. Good luck Thanks, Do you still have that demo somewhere? Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 18, 2010 Share Posted April 18, 2010 (edited) Sorry no, but I wrote a new one. It's not good as my previous, just work for the left side, anyway you have a good idea. Push the arrow to the left and return to the middle of the screen. The sprite get the perspective from top of the screen. I have plans to create a racing game using this technique, but since I haven't done nothing yet, maybe others programmers could use this for his personal projects. My racing game is not like your, my idea was created an enduro like but with good looking road, fixed tracks and car numbers. Well, Top Gear like. Probably you are using the same code, I'll explain for the others peoples. This code is present in many games that uses vetorial line, such Spiderman, CrossForce and Fishing Derby. It's almost the same code with small variations. Here is the relevant code, for display the effect : ldy #0 clc lda Var1 adc Var2 sta Var1 bcs SkipMove ldy Var3 SkipMove sty HMP0 If the sum of var1 and var2 are bigger than 255, branch and shift 1 pixel. Var 1 is a temp var. Must set as 0 at every frame. Var 2 is the "magical number", in this demo I just inc or dec according the direction you move. Var 3 hangs the HMPX value, #%00010000 or #%11110000. Inc or dec var 2 o the fly, you create an arch, but it cost 5 cycles. Playing with these vars you create a huge numbers of effects. That is. vetorsprite.bin Edited April 23, 2010 by LS_Dracon Quote Link to comment Share on other sites More sharing options...
roland p Posted April 18, 2010 Author Share Posted April 18, 2010 That's looking nice. It's about the same method I used for ballblazer. In my racing game, It's much more simple. There is now one table with road X positions. When the x position of the next road segment one more than the previous, I will HMOVE the road a pixel to the right or the left. Literally: segment2X-segment1X and shift the value left 4 times and store that value in the hmove registers. Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 18, 2010 Share Posted April 18, 2010 I see. You need rotate the car, not perspective distorsion. How about create a sprite table for rotating sprites, like combat? And keep the effect for more angle possibilities? Quote Link to comment Share on other sites More sharing options...
roland p Posted April 18, 2010 Author Share Posted April 18, 2010 Well, I just wanted to let the enemy cars follow the road. The distortion effect was a bonus. Just thinking, maybe I could store distorted sprites which are distorted like: 1 11 11 1111 111 1111 1111 1111 111 11 11 1 Maybe this combined with the distortion effect in the kernal could create a good looking rotation. I suspect this is about the same way the genesis achieves the pseudo mode-7 effects. But I will first try to get some enemies going. Quote Link to comment Share on other sites More sharing options...
Devin Posted April 19, 2010 Share Posted April 19, 2010 Wow, very impressive. I like how you used player 1 to draw the border... the animation is very smooth. Using the missile to draw the car is very clever! Graphically, this game looks great! Quote Link to comment Share on other sites More sharing options...
roland p Posted April 19, 2010 Author Share Posted April 19, 2010 Wow, very impressive. I like how you used player 1 to draw the border... the animation is very smooth. Using the missile to draw the car is very clever! Graphically, this game looks great! Thanks! I hope the graphics can be identified as racing cars Quote Link to comment Share on other sites More sharing options...
+selgus Posted April 19, 2010 Share Posted April 19, 2010 That's looking nice. It's about the same method I used for ballblazer. Does that mean Ballblazer has been put on the back burner now? --Selgus Quote Link to comment Share on other sites More sharing options...
roland p Posted April 19, 2010 Author Share Posted April 19, 2010 That's looking nice. It's about the same method I used for ballblazer. Does that mean Ballblazer has been put on the back burner now? --Selgus For now, yes. I've now decided to do some stuff that makes me happy. That means I've made a little port of Sokoban, not finished, but playable. I also tried a all-direction scroller wich was a bit dull. And now this racing game, since I like top-view racers. For Ballblazer, I spent a few weeks/months (not full time ofcourse) on a new 3d>2d projection, which should be faster, but it turned out to take more cycles than I expected. The current problems with ballblazer are that 3d>2d projection takes too much cycles to apply on all objects (goalports, ball), which is a bit depressing. I think big look-up tables might be the only answer. Quote Link to comment Share on other sites More sharing options...
+selgus Posted April 19, 2010 Share Posted April 19, 2010 For now, yes. I've now decided to do some stuff that makes me happy. That means I've made a little port of Sokoban, not finished, but playable. I also tried a all-direction scroller wich was a bit dull. And now this racing game, since I like top-view racers. Understood. I too had to put other projects ahead of the Fractalus 2600 game I've been working on. Want to finish up this iPhone/iPad engine/game before thinking of returning to the 2600. Squeezing stuff into the 2600 does take a large time commitment. Good luck on the racing game now. --Selgus Quote Link to comment Share on other sites More sharing options...
roland p Posted April 23, 2010 Author Share Posted April 23, 2010 Understood. I too had to put other projects ahead of the Fractalus 2600 game I've been working on. Want to finish up this iPhone/iPad engine/game before thinking of returning to the 2600. Squeezing stuff into the 2600 does take a large time commitment. Good luck on the racing game now. --Selgus Fractalus? That sounds interesting What have you made so far? I have plans to create a racing game using this technique, but since I haven't done nothing yet, maybe others programmers could use this for his personal projects. My racing game is not like your, my idea was create a enduro like but with good looking road, fixed tracks and car numbers. Well, Top Gear like. I was just expirimenting with that technique, but I did not realise you might want to create a game with it too... Anyway, I'm now expirimenting with a kernal that does conditionally strobes the HMOVE register. That way, you can set the HMP0,HMP1,HMM0,HMM1,HMBL registers outside the kernal and save 5 stores. The single-line kernal that I have now, has 55 free cycles to do stuff. Downside is that there are no playfield graphics. Quote Link to comment Share on other sites More sharing options...
roland p Posted April 23, 2010 Author Share Posted April 23, 2010 Attached, the demo of the Bresenham like road bending thing. Currently it moves a bit fast, I increment the vector with 2 every frame, otherwise the car would be wobly and didn't want to stay fixed, I don't know why yet. racing2.bin Quote Link to comment Share on other sites More sharing options...
Animan Posted April 24, 2010 Share Posted April 24, 2010 Sorry no, but I wrote a new one. It's not good as my previous, just work for the left side, anyway you have a good idea. Push the arrow to the left and return to the middle of the screen. The sprite get the perspective from top of the screen. I have plans to create a racing game using this technique, but since I haven't done nothing yet, maybe others programmers could use this for his personal projects. My racing game is not like your, my idea was created an enduro like but with good looking road, fixed tracks and car numbers. Well, Top Gear like. Probably you are using the same code, I'll explain for the others peoples. This code is present in many games that uses vetorial line, such Spiderman, CrossForce and Fishing Derby. It's almost the same code with small variations. Here is the relevant code, for display the effect : ldy #0 clc lda Var1 adc Var2 sta Var1 bcs SkipMove ldy Var3 SkipMove sty HMP0 If the sum of var1 and var2 are bigger than 255, branch and shift 1 pixel. Var 1 is a temp var. Must set as 0 at every frame. Var 2 is the "magical number", in this demo I just inc or dec according the direction you move. Var 3 hangs the HMPX value, #010000 or #%11110000. Inc or dec var 2 o the fly, you create an arch, but it cost 5 cycles. Playing with these vars you create a huge numbers of effects. That is. Your demo strangely reminds me of Radar Scope... Good luck on this, roland p. Looks good so far. Quote Link to comment Share on other sites More sharing options...
+selgus Posted April 24, 2010 Share Posted April 24, 2010 Fractalus? That sounds interesting What have you made so far? I have the framework for the main viewport and HUDs all coded up, with the fractal algorithm using P/M for lines and PF for the filling of mountains. Fractalus is more of a prequel to RoF, still am (was) working on much of the gameplay, instead of just a tech demo. It is currently using the E7 bankswitching protocol, with the RAM 0 being used for the bitmap-like display for the main viewport. Just very time consuming, and iPhone has taking the front burner now. --Selgus Quote Link to comment Share on other sites More sharing options...
roland p Posted May 2, 2010 Author Share Posted May 2, 2010 Another expiriment. I now try to simulate rotation by skewing the road and then move the curvestones a little. Car does not compensate the skewing yet. use joystick up/down left/right for move/rotate image. racing2.bin Quote Link to comment Share on other sites More sharing options...
Devin Posted May 3, 2010 Share Posted May 3, 2010 Another expiriment. I now try to simulate rotation by skewing the road and then move the curvestones a little. Car does not compensate the skewing yet. use joystick up/down left/right for move/rotate image. Very impressive! Quote Link to comment Share on other sites More sharing options...
Ethaniel Posted June 11, 2010 Share Posted June 11, 2010 any updates my friend? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.