Jump to content
IGNORED

W.I.P Racing game


roland p

Recommended Posts

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.

post-15728-127153213872_thumb.png

racing.bin

Link to comment
Share on other sites

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 by LS_Dracon
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...