• 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.

stefu

ideas to simulate car

5 posts in this topic

I''d like to know how car racing games calculate cars'' movements. I''v tried two different ways. 1: Exactly move the car along circle''s arc. the circle is calculated by steering angle. This makes the car move exactly ideal line. This seems to make sense for arcade games. 2: I have realistic physic parameters for the car. Then I only apply impulses for different events. gravity down, tyres up, tyres forwards and backwards (accel/brake), tyressideways (to prevent sliding). This makes sense for simulations games. If anyone has worked with this problem it''d be nice to hear about your solutions. Of course the solution is always unique and combination of compromises (atleast for me, I''m not physicist). I like the second solution, there is just one problem. The car is very restles. Car has alway a little noise when not moving. Also bumpy polygoned ground makes a problem, when traction changes gradually. I do all calculations in static time steps. What is commonly used frequency. 100 times per second?
0

Share this post


Link to post
Share on other sites
here''s a cool tutorial series called Physics of Racing
http://www.miata.net/sport/Physics/

there''s a $100 book named "Motor Vehicle Dynamics : Modeling and Simulation", which I''ve never been able to find a review of, but sounds very interesting. a couple others I ran across while searching are "Theory of Ground Vehicles", "Fundamentals of Vehicle Dynamics", and "Race Car Vehicle Dynamics". I''d love to read some of these, but it''s not practical to plunk $100 a pop on books I may never use. good luck
0

Share this post


Link to post
Share on other sites
Automobile simulation is very tricky. Bobtree''s book and website suggestions are good references. Look in libraries first so you don''t shell out $100!

In your experiments with method #2, you have what sounds like a really good start, but you''ve discovered some of the tricks of numerical physics. You will need to add numerical damping into the system to get rid of the restlessness/noise (or "jitter"). The damping would be something like a viscous damping force, which is a force that is a function of velocity and applied in the opposite direction of motion. You may have viscous damping for each tire and for the breaks---with a different damping force computed in each direction of motion for the tires. The damping would be adjusted so it just gets rid of the undesirable effects. Do a web search and you should find some discussion of viscous damping.

As for bumpy terrain, why not have a separate, smoother version of the terrain with fewer polygons that you use especially for the driving simulation? The car may not conform exactly to your visualization terrain, but it may be good enough, depending on the camera angle (e.g., if you''re not looking at the car at ground level, you might not be able to see that the car is slightly above the displayed terrain).

The issue of time steps is also a complicated one. I would suggest that for now you just pick a time step that is close to your average frame rate. You may want to use something different for debugging.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
0

Share this post


Link to post
Share on other sites
> As for bumpy terrain, why not have a separate, smoother
> version of the terrain with fewer polygons that you use
> especially for the driving simulation?

This makes sense but I think it''s the wrong way round: if anything the world is more undulating than most graphics engines/harware can render it. I.e. it''s worth looking at maintaing seperate data for the rendering and driving surface, but for an at all accurate simulation the latter may well be the more detailed.

> The issue of time steps is also a complicated one. I would
> suggest that for now you just pick a time step that is close
> to your average frame rate. You may want to use something
> different for debugging.

Better is a completely variable timebase. If you implement this from the start you will not fall into the trap of making your code dependant on a fixed timebase, which can be very difficult to debug and fix later. E.g subtle differences between playability between PAL and NTSC systems.

If during testing you vary it over a very wide range, you will quickly spot any problems introduced by a dependence on a fixed frame rate. Then to decide on the best fixed frame rate you can try running the simulation with various timebases choosing the lowest one that gives you a stable simulation.
0

Share this post


Link to post
Share on other sites
By the way, where is car''s centre of gravity. I have it currently set in the middle of car (all tyres are same distance from CG). The car seems to be understeering. Is the CG normally more in front side of the car?


Net Racing Demo:
http://www.geocities.com/stefankjb/download.html
0

Share this post


Link to post
Share on other sites
quote:
Original post by johnb
> As for bumpy terrain, why not have a separate, smoother
> version of the terrain with fewer polygons that you use
> especially for the driving simulation?

This makes sense but I think it''s the wrong way round: if anything the world is more undulating than most graphics engines/harware can render it. I.e. it''s worth looking at maintaing seperate data for the rendering and driving surface, but for an at all accurate simulation the latter may well be the more detailed.



We maintain separate locomotion terrains for our game, and they are quite a bit less detailed than the display terrains. The benefit of having less detail is that queries can be done damned fast. The game is a third person game with the characters mainly walking. Not the same as a rolling vehicle, and for this game our locomotion terrains actually works very well. In fact our characters do separate from the display terrain somewhat, but it is not enough to notice usually. We have some very strange terrain, with overhangs and things, and it is not straightforward to simplify the display terrain. Probably the best solution will be different for every game.

quote:
Original post by johnb
> The issue of time steps is also a complicated one. I would
> suggest that for now you just pick a time step that is close
> to your average frame rate. You may want to use something
> different for debugging.

Better is a completely variable timebase. If you implement this from the start you will not fall into the trap of making your code dependant on a fixed timebase, which can be very difficult to debug and fix later. E.g subtle differences between playability between PAL and NTSC systems.



Yes, you''re absolutely correct in saying the code should support a variable timebase. At least for moving between systems. Its not necessarily good to vary the simulation time step from frame to frame on a given system, since some games may require that simulations be repeatable, and repeatability suggests the use of fixed time steps, at least on a specific hardware platform.

quote:
Original post by johnb
If during testing you vary it over a very wide range, you will quickly spot any problems introduced by a dependence on a fixed frame rate. Then to decide on the best fixed frame rate you can try running the simulation with various timebases choosing the lowest one that gives you a stable simulation.


I agree with this approach. While only one of many, it is a straightforward way to develop a simulation that will work on different systems.



Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
0

Share this post


Link to post
Share on other sites