Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / need help getting started Gran Turismo/Forza style game

Author
Message
HDT Commodore
13
Years of Service
User Offline
Joined: 14th Jan 2013
Location:
Posted: 28th Jun 2013 01:32
My ultimate dream is to make a Gran Turismo/Forza style game in DB. The only problem is I'm a complete novice and need someone to help me learn the skill necessary to make this. I doesn't have to be perfect, I just need to know how to go about this. I have the DarkGAME Studio containing Cartography Shop, Dark Basic Pro, Shader, EDIT, MATTER, VOICES, FPS Free, Plant Life and Tree Magik. I will create the car object file externally with Blender or something, but want to focus on the engine and use DarkMATTER files for cars to test it. Any help would be greatly appreciated.

notfinishednameundecided.weebly.com it turns out HYPER ENTERTAINMENT is already a thing.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 28th Jun 2013 02:28 Edited at: 28th Jun 2013 02:34
Quote: "I just need to know how to go about this."


You probably need telling exactly what to do as if the other person were really making the game for you.

If I tell you how to go about this... Get a car skidding around on some land, and then keep improving the physics...

...can you really do it from that?

The games that people make usually are within their coding skills to begin with. The day I got DB I made a driving game by editing a Jet Demo. Then I added some new landscapes to the Jet Demo, and it was a Driving game in one day. You sort of need to know something about what you are doing.

You can find some driving examples, and edit them, but you need to understand them as well.

PirateJohn
14
Years of Service
User Offline
Joined: 4th Aug 2011
Location: California
Posted: 28th Jun 2013 04:32
If you're a complete novice, I would recommend starting waaaaaaaaaay simpler than that. People who have been programming for decades (raises hand) would have a lot of trouble programming a driving simulator. Frankly, it would take the full use of my degree in physics to just make the car move right.

Start more simply and use those simple programs to learn how to make more complicated stuff. Try making a Tic-Tac-Toe or Memory game and go from there.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 28th Jun 2013 05:19
I'd recommend building a simple car in your modeling program to start. Keep it simple because you'll have to redo or rework the design a few times to get it to function well in your game. After you get a simple car, try loading it into DBP and like mentioned above make it animate and move in some basic way.

Then from there you just keep reworking the design with greater detail.

HDT Commodore
13
Years of Service
User Offline
Joined: 14th Jan 2013
Location:
Posted: 28th Jun 2013 09:56
thank you all for your help. does anyone have any idea what lessons or tutorials to start with? I did the ones on this site (all i think) i also found a tutorial for a driving simulator but the supplied completed one gave a .dll error.

notfinishednameundecided.weebly.com it turns out HYPER ENTERTAINMENT is already a thing.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Jun 2013 14:18
I'd recommend searching for a vehicle physics demo, and altering that.

No offence, but a newb won't get anywhere near a gran turismo/forza game game with their first DBPro app. Hell I've been coding this language since 2000 and I'm still nowhere near creating a game of that quality.

Do however share your passion, as one day I'd love to create a similar game, being an avid car nut/racer.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 28th Jun 2013 15:41
Quote: "I'd recommend searching for a vehicle physics demo, and altering that."

This is a good suggestion.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 28th Jun 2013 17:52 Edited at: 1st Jul 2013 04:15
I should write up some tips for everyone who wants to make a driving game. I think I will.

This is my area, something which is a part of every day in my life; I know what it feels like to think about getting into making a driving game.

I am making a car racing game as part of my multi-sports game. I have created cars, AI, roads, checkpoints and so on; getting them to work and making things look good.

The problem with working on your own is that you have to do EVERYTHING! Modelling, programming, audio, testing and tweaking.

You will be very surprised at how difficult the testing and tweaking part is in driving games. When it comes to getting the car to feel the way you want it to feel; to not spin and topple over when a wheel touches pebble; to not total when you make a sharp turn, and as for getting the gears and audio to work to change speed; yikes! Hard, hard work.

If you want to make a start, FIRST thing to stress is not to give up and not to work on more than one project if you can; you can end up spending your life working on more 'new projects'.

On a practical basis, these procedures will get your racing game up and running. If you are using Windows 7 / 8; I recommend not installing the game studio in the 'Program Files' folder or in any other Windows location under protection, by default the operating system is set up to protect itself from tampering, and the game studio needs freedom to produce executables. Excluding the TGC folder and your project folder in your anti-virus is a good idea. Lots of .EXE files will be compiled there; just make sure your internet download folder is not excluded also!

A: You need good equipment; duh yeah! But seriously don't under estimate it. You need to run the game whilst running some kind of physics editor for your engine tweaking; in addition to running Blender and your IDE whilst making an analysis of visuals and game-flow.

You will be compiling code many times, light-mapping your levels, exporting vehicles from blender; you truly have a need for speed! You are unlikely to build something that runs perfectly straight away, this means you need more power to make up for your mistakes. Get a decent PC, or two, and some file backup equipment; sometimes hard-drives crash, sometimes viruses do get on your system, sometimes graphics cards burnout. Backup every day as a minimum; if you spend lots of time on the work.

B: Install Blender, TGC products and your project on a separate hard drive from your operating system if you can; this reserves more disk IO speed for your work instead of sharing the disk with background processes and your web browser. I partition my drives so that fragmentation is limited to particular partitions; and that's the setup over with.

C: Learn the basics; start with learning how to use arrays, functions, timers, 3D objects and sounds. Here are some good tutorials and examples. These are not driving game tutorials, but they are necessary to get any game to work. There are other tutorials around that may not have sprung to mind; but these are important.

You will not read/watch them all, unless you are perfect; just try to at least skim through them to take note of the principles.

Daniel's TGC Video tutorials
These videos will give you an all round guide of the principles of DBPRO programming. It's nice to watch a video instead of reading sometimes; but if you prefer reading, the next few tutorials are good reads.

TDK Beginner's tutorials
Sadly the most important tutorial is the boring one. Skip this tutorial and you will likely perform 'spaghetti programming'; 1000s of instructions too messy to read. You can't make a game that you can't understand; you can't get much help from people who can't understand your code.

What you code today gets forgotten tomorrow. This tutorial covers HOW TO PROGRAM IN DBPRO, and HOW NOT TO PROGRAM IN DBPRO. It's a bit like an elementary school of programming, but most of the programming you end up doing, the 10s of 1000s of lines of code will need to be structured the way that is recommend here; the way that is organized.

I cannot stress enough how important tidiness is when an average day in programming life is spent looking for needles in haystacks; finding faults as small as a missing word in a 70 thousand, 80 thousand line program with over 500,000 - 600,000 words really requires a neat and tidy layout to navigate. It's all fine locating things during the first 5,000 to 10,000 lines, but things start to get really complex when you reach the 20s; and compile times take longer and longer.

You should also seperate your code into classes stored in seperate project files. Your project folders and files are like road maps to things in your project. Comments; remarks, these are like road signs. The Indigo IDE features a nice To-Do list and snippet system that makes organization more easier.


Arrays, by Sixty Squares
80-90% of your logical game data in memory will reside in arrays. You need to use them to relate information to indexes so that, dynamic information, stuff created while the game runs, can be tracked, copied, saved and manipulated. Consider that each car, player and checkpoint will need an array element of a given number which contains their information; a bit like an article number in a database. UDTs stand for user defined types, think of these as database fields, and arrays as database tables.

Diggseys 3D Math tutorials
You do not need to understand everything about trigonometry to make a video game, and need not understand matrices and interpolation straight off the bat, but you will need to at least know how to use vectors; particularly in driving games, otherwise you will end up doing more work than is necessary using singular numeric vehicle velocity elements and will struggle to make use of physics engines later on. Be amazed at how many vectors you need just to make an car drive like a car!

My tutorial about memblocks
This is my tutorial that features picture illustrations of how memblocks work. This is good learning because memblocks will be oblivious at first when you learn; its that section of the documentation that seems to make no sense at first. But later on it hits you that you will need to understand how they work to do anything complex that cannot be done with Arrays. It is also a way of learning how to use Memory Banks, and this is all a stepping stone for getting into direct memory access.

Also, watch Blender and Photoshop/Gimp tutorials during your spare time. Watch things like these, not X Factor.

Real good Blender beginner tutorial videos





C: This can be done while learning the basics. Watch lots of driving games, lots of real televised racing events and get a good grasp of driving physics; no point making something that racing fans will look at as a poor simulation.

Take notes of how the camera moves, how things sound and look in the game.


Nothing beats watching and listening to the real thing.


Bit of a rally


Madness!

D: PHYSX is NVidia's hardware/software accelerated collision, motion and joints simulator, and I recommend buying a copy of Dark Dynamix as a foundation for your vehicle engine. Dark Physics alternative vehicle engine is not a vehicle engine in my opinion, it is a hidden rolling sphere with a hull floating on it; something happened when it was created, somebody didn't notice how bad it was. Dark Dynamix is the best plugin DBPRO has for racing games period; I've used them all. In Dark Dynamix, you work with the wheels and chassis as separate logical entities, after-all, they are separate things in real life.

But vehicles is not the only thing you need this for; it's also good for particles effects, rocks and other physical objects that move around.

E:Install these FREE plugins, I've explained why:

Collision
Sparkys Collision is a replacement for the collision system that comes with DBPRO. You will need this for logical and functional collision purposes.

Utilities
Matrix1, this is an upgrade for DBPRO's core library. Of particular interest here in relation to creating a great driving experience, is its 3D maths commands; for instance binding object positions and rotations to vectors; and its function pointers feature, so you can bind function calls to things like keystrokes/joypad buttons or checkpoint collisions in an organized fashion.

Read the help files!
You should scan through the help files for all the commands, they are there to help you; and will teach you great techniques. Some gems include time tickers, INI file lookups, render targets, limb creation and array pointers.

For HUD Display
Advanced2D is an upgrade to the 2D drawing library that does not slow down your game as much. The traditional 2D commands are not suitable for fast simulations; not that the person who created DBPRO, used it to build FPS Creator, which is a type of game engine that does not need much 2D drawing; a racing game needs lots of 2D visual indicators; you will need Advanced2D.

Windows Controls
BBB GUI is one of the only good ways for DBPRO to create windows controls. You will need windows controls to build your tweaking tools; any other method will require too much work. Windows supplies many controls so you can save time.

XML Game Data
XML Plugin by MadBit is quite a young plugin that packs power. It's the best XML plugin for DBPRO, and XML is the best configuration file format in the world; because it is extensible and tool programs and services can interpret it more easily than binary files. For security, any file format can be encrypted. Use XML to create your configuration files so you can alter the behavour of the program without having to recompile. Things like car names, track descriptions, text, key button bindings belong in configuration files, not in constants; these types of information need to change often.

Particles
This particles plugin is a good addition for your work; you could use it to create the skidding particles and exhaust smoke. The particle engine that comes with Dark Basic is limited, and sometimes crashes.

F: Observe these coding examples; Use these kinds of snippets to learn how to tackle common issues.

Collision demo (using sparkys collision)


Quote: "I'd recommend searching for a vehicle physics demo, and altering that."


Here is a simple demo

Vehicle demo (using Dark Dynamix)


There are other general useful snippets at the code corner and code snippets section

G: Search the forum for tips on time based movement, performance and efficiency. Learn how to use timers; learn how to be efficient with CPU/GPU usage. Time your events, don't run a constant loop if you can help it.

F: Learn about boolean operators. These work like circuit boards that determine if something is true or false. These are the building blocks of logic, and is the means to creating smart applications.

There is a help page in the documentation, plus I have created an article about it towards the boolean flags section. Visit it by clicking the image.



If you get this far you will be driving in your car game; but this is just the beginning. You will also want to look into map development and shaders at some point, but these are another huge topics.

For now check out TurboSquid for free or cheap 3D models.
Good luck!

HDT Commodore
13
Years of Service
User Offline
Joined: 14th Jan 2013
Location:
Posted: 30th Jun 2013 11:32
Thanks Chris! that goes for miiiiles. Only just read a little but couldn't do any as no internet where i was. I can now though. currently doing tdk's tutorials.

notfinishednameundecided.weebly.com it turns out HYPER ENTERTAINMENT is already a thing.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Jul 2013 04:12 Edited at: 1st Jul 2013 04:13
Those are really good tutorials; that will help you make your game engine easier to develop in the long run. Don't overlook the Matrix1 plugin either, there are some really good shortcuts it provides; here are some of them:



There actually 100s of commands like these which help you get more work done with less code.

Login to post a reply

Server time is: 2026-07-06 18:36:48
Your offset time is: 2026-07-06 18:36:48