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.

Newcomers DBPro Corner / level design question

Author
Message
galad
17
Years of Service
User Offline
Joined: 2nd Aug 2007
Location:
Posted: 3rd Sep 2007 06:28
Ok I am new to programing and extremely new to darkbasic. I am just trying out things to learn Darkbasic Pro. I have a general question about designing 3d levels.

Is it best to create a matrix and load in the seperate objects such as houses and trees or is it better to create the landscape using a program like 3d world studio and load it in as one big chunk? Or is that even possable? Please pardon me if my question is completely stupid as I am a complete newb.

Thanks
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 3rd Sep 2007 14:40
Don't worry, you're question isn't stupid, it is infact a question that people with years of knowledge will still ask, and some people will give you different answers than others, but, here are some points that all people will give you:

- It depends entirelly on the type of game. For example, you dont need a matrix if you are making an FPS that is set inside buildings
- Flexibility means you can do more. If you load your level in as one big model from 3DWS, then when you want to add an extra tree or get rid of that annoying bench, you are screwed.


This is my personal way of doing it. I make my own file format, which basically says: Create an object (and specify the object type / model location), Get a texture image, Position, Scale and Rotate, then, worry about extra stuff like shaders.

Here is a simple file format I made that I can use for levels:


Might look confusing, but it's not. The first line, "object", says that this part will be used to make an object. The next line, "cube", says to make a cube. If it said "file", it would mean it loads a model made in a program. The directory of the model is speficied later. The next 3 lines each have 3 pieces of data. The first 3 and Position X, Y and Z. The next is Rotation X, Y and Z, and the next one is scaling. Then, the next line tells the loader the directory of the object, and the texture.

Since the object is not a model, you dont need a directory, so it is "void".

It then does the same thing till the file ends.

If you can make something that can parse that (to be honest, shouldn't take more than a week of learning if you try), you will have no problems with level loading. Another advantage is that with a file format you can make your own level editor that will export to your format, so it will be compatible with any of your games, but, that's a little harder

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
galad
17
Years of Service
User Offline
Joined: 2nd Aug 2007
Location:
Posted: 3rd Sep 2007 20:00
Thanks for your reply. So what you're saying is it's up to my preference or the style of game I am making as to which method is best.

what I am experimenting with is a 3D RPG similar to Oblivian(although much less ambitious). I doubt I will ever come close to finishing it but it allows me to learn darkbasic.

So far I have a matrix and my character which I move around in the 3rd person view using w,a,s,d keys and the camera follows in 3rd person view. I have loaded in a few objects such as my character model a house and some trees that I borrowed off the internet. I just was wondering if using the matrix was the 'correct' way to do it. But I guess there is no correct method.

I find it hard going because the documentation included with darkbasic pro is severly lacking IMO. I have a book "DarkBasic Pro Game Programming 2ed." which is severly lacking IMO. The Hands on DarkBasic Pro books seem good but I can't afford them atm but I guess I'll have t pony up the cash if I am going to be serious about this.

Thansk for the clear and concise repsonse.

Login to post a reply

Server time is: 2024-11-25 13:32:11
Your offset time is: 2024-11-25 13:32:11