Sign in to follow this  
rockbox

writing a game/dont know where to start

Recommended Posts

Howdy,

i've been doing some research online but cant seem to find what im looking for.i want to start writing a game,but before i can start coding it i need basic things like loading 3d meshes into the engine, or a small editor where i can place those meshes in the world so that i can physically align them where i want them. i've read some books that show me how to load a 3d model in directx using the .X file format. Im interested in another,more common, format that other 3d engines use to handle their 3d model files.


-where can i look to implement support to load other file formats besides the .X format.



-where can i find documentation or beginner help for loading meshes into the world and moving them about like in a level editor.



-where can i further research player character movement with the camera(as if the camera was moving).the last book i read they said to rotate all objects in the scene according to the camera position instead of moving the camera about the scene as if attached to the player.where can i find advice on this?



i dont know where to look is why im posting this.terrain is something i'd like to look into also but for now i'll stick with drawing a single polygon flat plane as terrain while i learn the other stuff(though i you suggest a starting point for a good terrain rendering i'd much appreciate it)



if anyone can help guide me in the right direction i'd be grateful as i dont know where to look,thanks!

Share this post


Link to post
Share on other sites
Your first step is picking an engine. If you pick the appropriate engine almost nothing you just listed will be an issue anymore. If you don't want to pick an engine, just be aware, you are no longer writing a game, but coding an engine, and your game code is many many many months or years from being started.

Now in order to pick the proper engine, you need to decide a few things. Platform support, programming language and tool chain requirements. Oh, and of course budget. Got no cash... well, that makes the list easier! :D

Share this post


Link to post
Share on other sites
[quote name='rockbox' timestamp='1305415738' post='4810880']
im trying to learn where to begin on making my own,as learning experience and hobby
[/quote]

Don't.

If you're not even sure on how to begin writing a game, you're definitely not ready to start writing an engine
There are a lot of good engines available freely, if you want to develop games you should pick one of those
You can get back on engine programming once you have a very good grasp on game development itself, and if you have a genuine interest in being an engine programmer, otherwise it'll lead to frustration and project abandoning

Share this post


Link to post
Share on other sites
My advice to you, export from 3ds max or whatever modelling software to obj. Code a quick custom console app that reads the obj and outputs as custom binary format, applying any translations, rotation or scaling to the final mesh if you want. Assimp is a great library for loading a variety of file formats, it will load obj very easily, as well as its materials.

Share this post


Link to post
Share on other sites
[quote name='rockbox']
-where can i find documentation or beginner help for loading meshes into the world and moving them about like in a level editor.
[/quote]
As others have stated, picking an existing engine will handle this for you: you'll use their editor. Otherwise, you would need to write your own model viewer/level editor. These are some of the things that 'tools developers" work on in industry.

[quote name='rockbox']
-where can i further research player character movement with the camera(as if the camera was moving).the last book i read they said to rotate all objects in the scene according to the camera position instead of moving the camera about the scene as if attached to the player.where can i find advice on this?
[/quote]
That's partially true, though you're not really "moving" the scene. Scene objects (to include other players with their own cameras) exist in a world-coordinate system, while the camera renders from its own coordinate system (view coordinates). Under the hood of any solid camera class is the 3d math required to calculate what an object's world coordinates translate to in the view grid, so "moving" the camera (like with a first-person camera, based on the player's position) just means translating the world coordinates by the player's offset from origin when you calculate your viewable frustum (the trapezoidal shape that relates to the camera's field of view).

[quote name='rockbox']
i dont know where to look is why im posting this.terrain is something i'd like to look into also but for now i'll stick with drawing a single polygon flat plane as terrain while i learn the other stuff(though i you suggest a starting point for a good terrain rendering i'd much appreciate it)
[/quote]
Off the top of my head, if you google "Chad Vernon DirectX tutorials" you should come across his series, one of which goes pretty in-depth into terrain generation based on heightmaps. There are other paradigms of terrain usage out there though, it falls into the various categories of level design. Again, picking an existing engine will make (the majority of) that choice for you.

Share this post


Link to post
Share on other sites
unless your experenced then writting a game engine, thats what it looks like you want to do , is bloody hard , your best be is use an engine all ready made , try the unity engine.

im staring my 3rd years as games development sttudent at uni , my final year project is a game engine and i have 10 months do make one , i "should" make it in time, thats how complicated they can get

Share this post


Link to post
Share on other sites
[quote name='thedodgeruk' timestamp='1305446963' post='4810994']
unless your experenced then writting a game engine, thats what it looks like you want to do , is bloody hard , your best be is use an engine all ready made , try the unity engine.

im staring my 3rd years as games development sttudent at uni , my final year project is a game engine and i have 10 months do make one , i "should" make it in time, thats how complicated they can get
[/quote]

Even worse: I am a software engineering major and have quite a few years of game/engine programming experience, and I've been working on a full-featured engine for over 1,5 years right now
This is a hobby project of though, I still have other university-projects to take care of, so it's not a full-time job like yours probably is, but I don't think there are a lot of people who can work full-time on their own engine anyway

Share this post


Link to post
Share on other sites
[quote name='rockbox' timestamp='1305415738' post='4810880']
im trying to learn where to begin on making my own,as learning experience and hobby
[/quote]

Start by making a game, write the low level components when you need them (a model loader is needed fairly early but you can start off by using hardcoded simple shapes like cubes to get a prototype up and running quickly), don't worry about making a reusable engine at this point (Making a game without using an engine will teach you the low level concepts required for an engine, writing more games will help you find a way to make your "engine" reusable). (Its quite unlikely that you'll be able to reuse much code at all from your first game but you'll definitly learn alot from it)

as for what model format you should use it really depends on your needs, a description of the MD5 format can be found here : [url="http://www.modwiki.net/wiki/MD5_%28file_format%29"]http://www.modwiki.n...8file_format%29[/url]
Making your own format is also fairly easy if your requirements are simple.

Writing your own loader for a text based format like .obj can be a fairly good exercise (The format is simple and you can open the files in notepad to see how they're structured)

Moving meshes around in a world really is no different from moving 2D sprites around in a world, (one extra axis complicates the math a litte bit and animation can be a bit more complex but the basic concept is the same), Have you made any games at all yet ?

Share this post


Link to post
Share on other sites
Thank you for all yalls input,it helps to hear other advice about this kind of thing.

the reason i havnt picked an engine already is because im not even in college yet,so i dont wanna pay for an engine yet and the free for non commercial use ones like UDK requires knowledge of their own scripting language.learning a new language takes time.and it doesnt help to learn unreal script unless i will be working for unreal.but i cant find a good engine in c++

SimonForsman, no i have not written any game besides the very basic sample program "games" in directx learning books and such. i understand that writing a game,not an engine is key but to write a game you need a number of basic components like moving of characters,model rendering,terrain,etc. im not sure how indie developers do it but when they start from scratch sometimes im sure they dont code of their coordinates for every object in a scene.that seems silly.they have some kind of open source level editor or something huh?or something basic and simple-er than the AAA game editors.

Share this post


Link to post
Share on other sites
[quote name='rockbox' timestamp='1305654056' post='4812005']... free for non commercial use ones like UDK requires knowledge of their own scripting language.learning a new language takes time.and it doesnt help to learn unreal script unless i will be working for unreal.[/quote]

Not true:

[list][*]UnrealScript is object-oriented and has a broadly C++/Java-like syntax, and so you will build on skills directly transferable to C++[*]Your general programming skill will develop - the majority of concepts in programming apply to most programming languages[*]You will be using a language designed specifically for use in games, which has been used in massively successful games in the past - this will give you insight into how things are organized in big game engines and provide you with ideas for your own "built from scratch" projects further down the line[*]It will probably be more productive in terms of playable results than starting with C++[*]Working in the industry, you may be expected to learn new scripting languages (possibly proprietary ones) quite frequently[*]Experience in more languages is useful in itself - it gives you a broader perspective[/list]
I'm not suggesting that UnrealScript is the best option, but keep in mind that it's very unlikely that any experience you gain in developing games will be a waste of time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this