forums

TNT Basic Forums > Programming Q&A
Some questions about some ideas...
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-10-2005 22:22

Posted by:
Ian

Location:
canada

Find more posts by Ian

i was thinking about how you could make a racing game. my idea was for it to be topdown, and always having the car facing generally up and always being in the middle of the screen. this seems easy with the use of maps and viewport scroilling, but then it hit me. if the car is always pointing upwards, the map would have to rotate when the car turns... is there any good way to do this? i thought about using a large sprite (which would slow it down i know but im just thinking) but then i didnt know how to make objects (like other cars) rotate with he map and always be moving relative to the map.

this seems rather complicated to me. is it?

this is really more for my own curiosity, as my hands are full with a platformer at the moment as some of you may know. id still like to figure this out however.

thanks
ian

09-11-2005 14:20

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

What you're trying to do is hard and may be too slow in an interpreted language like TNT if you have a slower computer, want high framerates or use high resolution. However you can do it. I don't suggest using one big sprite, but rather manually render the map out of sprites (i've done it in an example available in the directory) once you have your map out of tiles you could (i'm just guessing here, as i've never done it) rotate each sprite around its avix with the sprite rotation commands and rotate them aroudnd the center of the map using a sin ans cos law (if you don't know how i can give examples however i'm no math teacher ;) )

09-12-2005 12:30

Posted by:
Jae Rune

Location:
Cheyenne, WY

Find more posts by Jae Rune

Honestly, you can leave the car in a given spot and just move the map around it on it's X/Y without rotating it, you just gotta rotate the car sprite. It's a faster and probably more elegant solution. I've seen it masterfully implemented in Neo•Geo games, and other old arcade games. It'd certainly give TNT an easier time of things.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.