N-racer Blog


Dzz

stmia r0!, {r2-r9}
Joined
Jan 30, 2006
Messages
1,098
Website
Visit site
I was reading Mr. Jabberwocky's delightful thread about his adventures making the game "Fire" and, although I lack his amusing dry wit, I thought "I have to do a thread about making a game too!"

One of the projects I was half-heartedly starting to poke at a year ago was a little game where the player has a marble that races against other marbles on loopy tracks hanging in outer space. This project was called "N-Racer", for no particular reason. Now that I'm starting projects again, this will be one of them, and I thought that some of you out there might have some interest in following along. I'll post thoughts, concept stuff, screenshots, and sometimes a little program as I puzzle out how to make the game.

Hopefully, blathering on in this thread won't cause any serious injury.

To start thinking about the game, I played with a CAD program to get a feel for what a track might look like and came up with this as an example:

nr1a.jpg


What ends up being possible will depend on the ability to do 3D stuff on the gp2x. Some people probably make the point that since the gp2x doesn't have 3d capabilities built in, 3D on the gp2x will always suck so it would be better to avoid it. There's some truth to that; on the other hand, it makes it more of a challenge.

Rixed in particular has done amazing things with his 3D renderer; I'm really impressed by gpu940! I would use it, but I already started writing a bunch of 3D code way back when and I'd like to use it, so I'll be coding the 3D myself... it's more fun that way to me anyway.

So a "camera's eye" view of that track might look like this, which is basically what I'd expect the game to look like (except in color and probably without the nice curves):

nr1b.jpg


So that's the sort of thing I have in mind, more or less.

One visual aspect that will help make the game hopefully visually interesting is a decent background, so I spent some effort starting to think about rendering that, and decided that rendering the inside of a sphere was probably a good way to do it.

nr1c.jpg


A little sketch application I'm using to develop the background can be downloaded here to kind of get the idea:

http://www.dzzgames.com/nr1.gpe

L/R rotates one axis, A/B rotates another axis, and X/Y rotates a third axis

Unfortunately, the little sliver triangles near the poles of the sphere are not very nice, and doing a smooth mapping from a picture to these triangles will be difficult without odd distortions, so I'm discarding that concept and the next thing I want to do is develop a version of this using a "geo-sphere", which is constructed from equal-sized triangles. I gather that a more common way in the industry to do this is to use a "sky box", but for that to work I think the texture mapping has to be perspective-correct and I was hoping to cheat and use a faster affine mapping which I should be able to get away with if all the triangles are reasonably sized and facing the center.

I am not blasting away with all guns on this project so updates might come occasionally or in bursts.... thanks for reading!
 
Hi Dzz,

It's great to hear that you're working on a brand new title. I still play Vektar and Zooov, and this looks like yet another quality game from you. :)

I was wondering, where do you find information on 3D graphics topics? I'm especially interested in the math involved in calculating perspective, plotting the points, ordering the rendering, etc. Can you recommend a certain book as reference, or some specific articles? How did you get started?
 
Hey Alex! I love the look and gameplay of the games you've been making, keep up the great work!

I got a book called "Essential Mathematics for Games" by Van Verth and Biship which seems pretty good. Once you know what to look for, google is handy too.
 
looking forward to seeing the progress of this game. just happy to see you back in the community making another game. alex had been making some great games while you were gone. I'd kind of like to see you both work on a game together at some point as you're my favorite homebrew devs and seem to have a good sense of style and approach to making games.

and dzz everyone who has played zoov seems to really like it. it may not have made as much an impact as vektar but still a great game and vektar I'm sure drew some extra attention because of geometry wars. point is everything you did was great. the nethack port is great also though i noticed someone patching it to add some higher level stuff to it. never was a problem for me since I never got so far in nethack.

anyway good luck with your project and anything else you decide to do.
 
Looks like it will be fantastic, can't wait to see how this progresses.
 
Thank you for the update Dzz!
This game idea seems really nice.
I like the path that gp2x homebrew scene is taking recently.
Is it the Gbax competiton heat?
 
No reason why the gp2x can't do 3d - at least to psx level.
If we can get (albeit slow) 3d emulated then I'm sure you'll be successful.
Gp2x homebrew is definitely on the up now :)
Will watch this thread with a lot of interest!
 
This will be something to look forward to! Good luck!

About the background. Wouldn't it be easier on the GP2X to use a cube instead of a sphere? A lot less triangles to draw, and if you keep it centered on the camera at all times it will look great, imo.
 
Concerning 3D for Gp2X. I think the challenge is the best part of it of course.
A 3D game for a 3D console? No fun!
A 3D game for a non 3D handled? Fun!
It reminds me the great 3D era for Amiga (and even cpc 6128).
The 3D wasn't that good but the feeling of playing those games were great (ie : Stunt car racer, Total Eclipse...).

EDIT: I would like to see a 3D Pool game coming up. But I must admit that a 3D race game is even more exciting :)
 
jbrodack: thanks!

quasist: yes, player 1 will use the 'A', 'Y', and 'L' buttons, and player 2 will use 'B', 'X', and 'R'. Player 1 gets the up and left directions on the joystick, and player 2 gets down and right.

ruckage: thanks! Ruckman is a very fine piece of work, you can really tell when somebody put in the long hours to get everything right. I wish I had your artistic abilities!

virusx: thanks! my friend's work on his gbax entry Blast Riot got me fired up for development again. 3D Pool would be fun.

kevcal: i hope the thread will be interesting to follow!

deps: a cube would have less geometry and triangle setup expense but the problem is that when the cube is angled there is a significant difference in distance between one part of the triangles and another. That means that the texture coordinates should be closer together in one part of the triangle than another, by a significant amount. Drawing textured polygons correctly in a situation like that requires a "perspective correct" texture mapper which is more expensive for each pixel. Technically that is all true also for a polygonal sphere, but the difference across a smaller triangle is much less, so I think it is possible to cheat and ignore the issue, which should make the whole thing more efficient (I think, I could be wrong).

Mikey242: thanks!
 
Dzz said:
Drawing textured polygons correctly in a situation like that requires a "perspective correct" texture mapper which is more expensive for each pixel. Technically that is all true also for a polygonal sphere, but the difference across a smaller triangle is much less, so I think it is possible to cheat and ignore the issue, which should make the whole thing more efficient

Ah, you are right! Didn't thought of that. :)
 
Last edited by a moderator:
Great. By all means, make the camera have a pretty large FOV (at least 100°) for it makes things look faster

Oh, and for the sphere, why not use a sphere made of nothing but triangles of equal size?
 
A_SN said:
Oh, and for the sphere, why not use a sphere made of nothing but triangles of equal size?
Exactly, that's what I meant by a "geo-sphere" which is what I'd like to switch to. Working out the math for the texture mapping on that is giving me a headache though so I will probably stick with the current scheme until a day when I'm feeling smart.
 
Last edited by a moderator:
Dzz said:
A_SN said:
Oh, and for the sphere, why not use a sphere made of nothing but triangles of equal size?
Exactly, that's what I meant by a "geo-sphere" which is what I'd like to switch to. Working out the math for the texture mapping on that is giving me a headache though so I will probably stick with the current scheme until a day when I'm feeling smart.


Why bother with a sphere at all! Project on a cube! All you have to do is make sure the camera is at the center of the cube, always.
 
Last edited by a moderator:
A_SN said:
Why bother with a sphere at all! Project on a cube! All you have to do is make sure the camera is at the center of the cube, always.
Read a couple of posts above. :)
 
Last edited by a moderator:
A_SN said:
Why bother with a sphere at all! Project on a cube! All you have to do is make sure the camera is at the center of the cube, always.
That's what we were just talking about above. The problem is the perspective effect. It can be partially solved by tesselating the cube faces I suppose. Cubes are often used in PC games because the hardware does perspective-correct texture mapping "for free", but I'm trying to scavenge every CPU cycle I can.
 
Last edited by a moderator:
Back
Top