Sign in to follow this  

Level Loading C++ / DirectX 10

This topic is 2533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all!

I hope this is the right place to post, Just wanted to ask whats the best approach for loading a 3D level/World/Map using C++ and DirectX 10 ?

How would the level be created i.e. build parts in a modeling program then go through a "layout type file" and then set positions in code and render?

Does the level loading have to be scripted (or are there other methods?)

If you need me to expand some more I can.

This is really just the planning stage I just wondered on how large developers seem to have a cusom level / map file and how it gets to the render stage.

Many thanks In advance

Mode-X

EDIT: Or even recommend some books about world/map editor making / loading
My main aim is for a persistent game world (Oblivion style)

[Edited by - modex on December 23, 2010 8:44:05 AM]

Share this post


Link to post
Share on other sites
Thank you for the reply!! Im more looking for ways to code it I dont understand how the devlopers for TES-Contrusction set or GECK(Fallout) get the level information loaded from one file and then organise the data in the edit tool.
Or even the game for that matter.

I can load individual models and animate etc. but not a game World! nor do I know how to structure the World information i.e. positions of obects map markers trigger points etc.

Share this post


Link to post
Share on other sites
Just a quick top up on here - I have seen a terrain generator that uses Quaterneons!? to load parts of the terrain is this something I should look into?

Share this post


Link to post
Share on other sites
It depends on your map format. Similarly to how you know how to read in model data, you need to know how to read in the format of your map. You need to know how the file is organized and where everything is located. For example, I use a custom format in my engine where the header contains the map's background music and tileset. If someone wants to write a reader for my map, they need to know what that header looks like.

Share this post


Link to post
Share on other sites
Thats the kind of answer I need - I haven't got a map built yet, needed to know how its done then how to layout where objects are etc. I can load individual models (using Maya 2011 and the .obj file format) which I have a resource manaher that loads the models textures shaders etc and can instance them or add to list.

I can load a height mapped terrain or a model of a terrain and add models etc to it from the program, but I need some reference for a map editor so I can position the items and export all the data then load it into the game, the editor would export all the position data scripts etc. Just not sure where to start with coding this sort of tool, I understand the layouts and functionallity its just the implentation.

Share this post


Link to post
Share on other sites
I`m not quite sure what your problem is, but if you already have a heightmap rendered, then all you need to do to place your objects over it is a basic transformation triple (position, rotation, scale).

So, you load this information from the level file (in your favourite format), and during rendering just apply the transformations (scale, rotation, transformation) and voila - you have your world loaded.

It`s a simple task - there`s no need for a book to describe this.

Share this post


Link to post
Share on other sites

This topic is 2533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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