• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Jasun220

Radio Control car physics???

16 posts in this topic

Hey, first of all, let me introduce myself. My name is Jason and im using the Genesis3D Rendering engine for my game (www.genesis3d.com), and the game is going to be a radio control car game. Im at the point of physics for the car, is there any FREE physics engines out there that can simulate RC cars? And i need some information for the camera code, i dont know if i can explain this or not, but you know in racing games how the camera seems to ''float'' and follow behind the car, i need help in getting the effect for a camera. Im not an expert in DirectX or OpenGL, but some code snips or something would be great! - Thanks in advance - Jason
0

Share this post


Link to post
Share on other sites
Code your own physics. Besides the fact that I don't know of any "physics engines," it's not too hard to code, anyway. Start simple:

move(float amount, carstruct * car)
{
car->x += sin(car->angle) * amount //In radians
car->y += cos(car->angle) * amount
}

turn(float amount, carstruct * car)
{
//Amount is in radians.
car->angle += amount;
}

The end. Read up on vectors - read the vectors and planes article here on gamedev.net. And if you need to get more complicated then that, read up on trig (not too hard) and use common sense (game physics really is mostly common sense, plus a little trig), and if you can't figure something out, then post here. I hope you're successful in coding your RC car game. Just don't make things too complicated.

Edited by - TerranFury on August 14, 2001 9:45:04 PM
0

Share this post


Link to post
Share on other sites
The engine im using is a prety simple engine to use. so im sure i could get it eventually For all those people making RPG games, i would suggest you lookinto Genesis3D (www.genesis3d.com) and if you have time, download GDemo, it show the power of Genesis3D.
0

Share this post


Link to post
Share on other sites
I knocked up an RC car demo thing in openGL for an assignment...its not great (less than a weeks work) and was my 1st 3D demo...the sliding i put in tho was very RC car like i thought...

http://www.rbut.demon.co.uk/RC.zip
(you need glut32.dll also cus i used a glut function for the FPS)

As far a physics engines go - there arnt any that I know of...


**
Ste
0

Share this post


Link to post
Share on other sites
Thats great, thats what i need. May i ask for the source code, so i can learn how to port it to Genesis3D?
0

Share this post


Link to post
Share on other sites
I would totally give the code out as this is something I strongly believe in (free source for educational purpose). Alas I my HD died leaving me with nothing...I only have the exe as I uploaded it to ftp. I have the code (printed out) as a hard copy of the code was a requirement of the assignment.

If you require direction regarding a specific aspect I am sure I could explainthe theory i implimented...but pls dont ask for every aspect else I will be 92 before I finish the email!



**
Ste
0

Share this post


Link to post
Share on other sites
Ok, well, the people that are making Genesis3D Classis will have objects with physics in them, so im going to wait until they release their re-built engine. The main thing i was interested in is your camera code, thats my chalenge right now.
0

Share this post


Link to post
Share on other sites
Well, as others have said, you should read up on vectors, also, create your own physics engine if you can, you''ll know what the hell you did, instead of being left in the dark by someone elses code, to get the "floating" effect of the camera, all you need to do is translate the camera coordinates and have it follow the car at a certain velocity, it wouldn''t be to hard to do, if your using OpenGL, try something like this...

I haven''t really used glulookat or whatever before but you can find info on nehes site i''m sure, it does camera stuff, but do something like this if i''m wrong


make sure you specify that this goes to the camera coordinates, it will move the camera back 5 units.
glTranslatef(0.0f,0.0f,-5.0f):

then do a little loop that makes the camera "follow" the car...

in this example, x will be the actual speed that the car is going, so you can just use this variable from wherever else youre using it.
again, make sure you''re specifying that these are camera coordinates
while(vehicle_speed == x)
{
doing this, will make the camera always follow 5 units behind the car, no matter what speed it is going.
also, i''m not really sure if you can do this with glTranslatef or whatever, i''m kind of new to opengl myself.
vehicle_speed - 5 = camera_speed;
glTranslatef(0.0f,0.0f,camera_speed);
}
that''s just something i came up with in my head, i''m really not sure if it works or not, but you could probably get what i was thinking of from that. hope i helped some.
0

Share this post


Link to post
Share on other sites
I know what ur saying, in fact thats what i got coded in my G3D game. But that ONLY says 5 or whatever behind the car at ALL times, download that demo from Jedaye, and see how that camera works, that is what i would like.
0

Share this post


Link to post
Share on other sites
Thats quite literally a one line thing...along with some stored data...

When you update the camera position vector (in world space) use the equation:

TargetPosition = some value relative to the object you are following;
CameraPosition += ((TargetPosition - CameraPosition) / 16.0f);

Simple eh?

Edited by - Jedaye on August 25, 2001 4:15:10 PM
0

Share this post


Link to post
Share on other sites
And thatll make the effect just like in that demo? Wow, i thought it would be alot of code.
0

Share this post


Link to post
Share on other sites
Indeed, simple eh?

there are limitations with this appraoch tho...try playing with the ''16.0f'' value...you will soon find out what i mean...

There are far more complex approaches involving some quite interesting physics (spring equations etc), it all depends upon what you want anf what type of game you are implimenting it in...

I like to think of this one as: Object <-> pole <-> camera Where the camera acts as if its attatched to the objects via a pole and 2 pivets...
0

Share this post


Link to post
Share on other sites