Help building a very basic 3d car game engine

Jun 8, 2013 at 11:59am
Hello at all

I'm planning to build a basic 3d game engine.

It would const of a car and a track (both already made in 3ds max). The game engine should have collison (car-track), car acceleration-braking and car turning left-straight-right, inertia and gravity force. Anything more. No shadowing, no suspension. In case I could achieve this I would implement more complete physics, particles, car and envoironment sound, shading, etc. Even it would not have GUI, just the classic black-white interface.

Something more basic than Car World (http://carworld.sourceforge.net/) but with my own car and track.

I don't understand any programming code and I would like to know in wich language I should made it. I have from now to January 2014 to make it on a Windows XP PC.

Wich language I should learn? C? C++? C#?

P.S. The car is about 20'000 polys and the track is like 60'000 polys, but i should make something with the API so it only renders in a 50m radius.

Oh, and I have Visual studio c# 2010 and xna 4.0 installed, but I want to see other options before going to XNA.


Thank you at all


Marc


SEE THE 9th POST THANK YOU!
Last edited on Jun 22, 2013 at 6:29pm
Jun 9, 2013 at 9:54am
Anyone?
Jun 9, 2013 at 3:44pm
Wow, lofty aspirations, for someone who doesn't even know what language to choose.

Pal, It's not gonna be easy, well it isn't THAT complex, however, it will take time to learn the basics first.

I wouldn't use C#, or .NET if a gun was pointing at be, but that's up to you.
The best choices, are OpenGL, with C, or C++, but that a little opinion based.

C is actually very simple to learn (compared to C++ which is a little harder), and creates small binaries.
Which is why I recommend C. Though, if you plan on turning this into a full game, USE C++!

If you listen to one piece of advice, stay away from VB!!!!!


Based on you'r talk about the 3D models, I would assume you have modelling experience, which is amazing.
VERY helpful in the future. Get a 3D printer :)


EDIT:
Erm, I don't think this should be in the beginners section... But then again you are a beginner!
Wow, that deadline is close... Good luck pal, I hope you the best.
Last edited on Jun 9, 2013 at 3:47pm
Jun 9, 2013 at 9:53pm
Not to put you down, but you'll need to have at least some knowledge in the following fields:

Programming (Duh).
OpenGL (My personal recommendation. In conjunction with C++).
OpenGL specifics, such as how to read and render 3D models, properly initializing an OpenGL context using the WIN32 API (or possibly using an OpenGL wrapper, like glut, which is easier but deprecated), matrix mathematics and rendering conventions such as VBOs or vertex arrays.

Also, coming up with your own implementation of physics, not to mention in a 3D environment, is painfully difficult.

The most realistic way for you to approach this I think would be to use one of the many "game engines" that are out there. Ogre maybe? AFAIK you wouldn't have to worry so much about rendering and physics. However, then that's another thing you'll have to get familiar with.
Last edited on Jun 9, 2013 at 9:58pm
Jun 12, 2013 at 1:08am
But don't let all this put you down;

You can do it, it just takes time.
The goal isn't impossible (although it will be hard)!
And learning C, or C++ is VERY rewarding!
Jun 19, 2013 at 8:05pm
Thank you all

I started learning C++ 15 days ago and i actually know how to make a calculator, a unit converter, etc.

Do you know wich aspects of c++ should i focuse?

Bucky's tutorials are this:

(sorry for the list, its huge)

4 - Variables
5 - Creating a Basic Calculator
6 - Variables Memory Concepts
7 - Basic Arithmetic
8 - if Statement
9 - Functions
10 - Creating Functions That Use Parameters
11 - Functions That Use Multiple Parameters
12 - Introduction to Classes and Objects
13 - Using Variables in Classes
14 - Constructors
15 - Placing Classes in Separate Files
17 - if / else Statement
18 - while Loops
19 - Simple Program Using a Loop
20 - Sentinel Controlled Program
21 - Assignment and Increment Operators
22 - for Loops
23 - Making a Stock Market Simulator
24 - do while Loops
25 - switch
26 - Logical Operators
27 - Random Number Generator
28 - Default Arguments / Parameters
29 - Unary Scope Resolution Operator
30 - Function Overloading
31 - Recursion
32 - Arrays
33 - Create an Array Using Loops
34 - Using Arrays in Calculations
35 - Passing Arrays to Functions
36 - Multidimensional Arrays
37 - How to Print Out Multidimensional Arrays
38 - Introduction to Pointers
39 - Pass by Reference with Pointers
40 - sizeof
41 - Pointers and Math
42 - Arrow Member Selection Operator
43 - Deconstructors
44 - const Objects
45 - Member Initializers
46 - Composition
48 - friend
49 - this
50 - Operator Overloading
51 - More on Operator Overloading
52 - Inheritance
53 - protected Members
54 - Derived Class Constructors and Destructors
55 - Introduction to Polymorphism
56 - virtual Functions
57 - Abstract Classes and Pure virtual Functions
58 - function Templates
59 - function Templates with Multiple Parameters
60 - class Templates
61 - Template Specializations
62 - Exceptions
63 - More Exceptions Examples
64 - Working with Files
65 - Tips for File Handling
66 - Writing Custom File Structures
67 - Reading Custom File Structures
68 - Cool Program Working with Files
71 - string Class and string Functions
72 - string substrings, swapping, and finding

I erased some of them (repeated for example).

Wich of them do you see unuseful? A good C++ should master all them (as bucky's tutorials cover all the C++ language), I know, but for what I need (see first post).

Also I found this wich seems very useful: http://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc12/Srisuchat/Thesis.pdf

Thank you & see you again!
Last edited on Jun 19, 2013 at 8:17pm
Jun 19, 2013 at 9:04pm
3d games are just 2d objects from top view with z ,x , y , instead of x,y
first learn 2d games, then the 2d objects just add z textures along with x & y and add camera from the point u want to view



~~personal experience in Game Maker 7 language
Jun 19, 2013 at 9:07pm
and for the language you should learn
all languages can do the engine you want, C,C++ or C#
you should learn how to interact with Direct X, because 60,000 polis are too much for standard header
Jun 22, 2013 at 6:42pm
Okay guys, now I manage the following:

C++

- Functions, variables, classes & objects (i will make them public at first)
- Data types (float & int) ----> i think that with this it will be sufficient
- Loops (while and for loops)
- if & else
- constructors
- random numbers
- classes in diferents files
- rand (), srand and time
- strings

I think i need to learn pointers and 3d arrays. what do you think i'm missing?

Physics

- cinematics (straight and circular movement)
- statics
- work & energy
- lighting (refraction calculation)
- dinamics

Maths

- Trigonometry (cosinus theorema & sinus theorema, also tan/sin/cos)
- 2 grade up equations, polinomics, functions
- derivated
- stadiscs
- probability
- vectors (x,y,z)


3ds Max

- Polygonal modeling (i modeled a house, a beer, a road signal, a 206 wrc, a windy road for example)
- spline modeling
- Smoothing, animating and texturing not yet




Okay, so what i need for my videogame is:


- A camera:

Chase cam: get the xyz position of the car and increase/decrease the Z and the X for the chase cam. So if the car position at one moment is 3x 4y, camera would be x 4y 2z (if the car is going to the left). Then i can make it complicated and say that the camera position is (0+0,2v)x 4y 2z, then the camera would get a growing distance when the car accelerates.

Bumper cam: xyz position of the bumper

Hood cam: xyz position of the middle of the hood

- A car: consts of:

wheels: is the main physics of the car. Represents the friction, the traction... of the car. I will make a simple physics at first and then i will make it complete (more parameters).

body: Represents the visual efects of the wheels. If the left wheel hits a rock on the road, then the front left part of the body raises it height in a different acceleration than the one of the wheel. If the wheels brake hard the front height of the car decreases.

I found many "car related" formulas, like for the packje curves (or something like that) or the rolling friction.

- A circuit: A 3d road model, with trees and landscapes and a sky box.

- Collision: I don't now what I should try.


The only graphic requierement is that it only renders on a circular area, where the car is the center (it not renders the whole circuit, only what the driver sees). I'm modeling the things quite simple (trees are made of two planes), that 60'000 poly of the circuit was huge, but because is a 32km road!



Due to my PC is not a good pc (it can run well LFS at 1024x768 though), what version of OpenGl do you recommend Where to download OpenGl? Where to learn Opengl?

I first will try to make a box move on a plane, and then go to the car physics. I think i will not go to attemp 2d.


I hope you make not gone crazy lol

thank you for reading this
Jun 22, 2013 at 8:18pm
You need a team, and to separate jobs, every person for his job
For me I think you need at least 3
such as 3D moduler , expert in 3d such as maya or 3d max
Topic archived. No new replies allowed.