Sign in to follow this  
Bom Tchi

[ Direct X - C# ] Create a 3D game editor

Recommended Posts

Hi all i'm newbie, i would to create a 3D game editor but i have no idea as to start by. 1) I've though about 4 swap chans view. 2) Load normal and skinned meshes 3) handle mouse coordinates to move resize the objects loaded I know .x files are very good handled by direct x 9 but i've not found good tutorial on the web. Can you help me with some very easy tutorials? Very thanks :)

Share this post


Link to post
Share on other sites
How much do you know (C#/DX) and exactly what do you want help with?

Here's a tutorial for loading a mesh:
http://www.riemers.net/Tutorials/DirectX/Csharp2/tut5.php

And here's the main page with lots of info:
http://www.riemers.net/index.php

This is if you want split view in your editor:
http://www.gamedev.net/community/forums/topic.asp?topic_id=412931&whichpage=1�

[Edited by - e-u-l-o-g-y on September 6, 2006 4:25:28 AM]

Share this post


Link to post
Share on other sites
You didn't really answer my question.. it's really hard to help you when you're not specific on what you need help with!

Check out this for general dx questions:
http://members.gamedev.net/jhoxley/directx/DirectXForumFAQ.htm

And http://www.codeproject.com/ for general C# gui problems

If you specify exactly what your skill level is, what you need help with and where in the process you are then it will be alot easier to help you!

Share this post


Link to post
Share on other sites

I'd start from the idea that your game engine and the game editor are practically the same program but the editor contains the code to edit the contents which the game engine shows.

So, from where to start from ? Perhaps studying a bit of DLLs to create an engine dll which allows the content to be edited/moved/rotated/placed etc...

So, never write the same code twice.

Also, which 3d format you plan to use for your meshes ?

Cheers !

Share this post


Link to post
Share on other sites
I've just explaned all: .x file becouse i guess thery are supported originally by directx.
Then i want to create the engine in the same time i develope the 3d editor.

1th step i handle 4 switch swap chains.
2th import .x simple/skinned meshes into a library and so define 3d objects
3th i place the object in the world then i set propreties and methods for the object added while i move rotate and scale it.

Is it a good way to work? I'm very good with c# and i know the basic of directx.

Share this post


Link to post
Share on other sites
I'm sorry but it's a bit hard to follow you, but I'll try to give an explanation on what I'd do. Like Demus79 said, I'd put all engine specific code in a library (assembly) that's imported into both the editor and the game. This way things are guaranteed to be handled in the same way.

What kind of editor is it you're making? Is it a level editor or a model editor? I guess it's a level editor since you're talking about placing objects. Loading .X files is ok since it's easy to use and there are alot of exporters for that format out there, though a custom format might be good later on in the process if you decide that .X doesn't provide the features you need. If you're going to set per object properties you'd either need another file to store these in or a custom format - though if it's a level editor these properties are likely stored there.

Why would you need 4 swap chains? See the link I provided for information on handlig multiple views.

Share this post


Link to post
Share on other sites
i tried to make a window with 4 swap chain in the past but i got bad rendering images when i resized the window maybe i lost some resources.
I want to handle losing devices and so on...
Ok it is a level editor, but maybe i've to start to develope the engine before.
How can i create it? I've to define Phisics Bounding box/sphere properties, velocity, gravity movement, and other methods.
So i've to start by the engine or creating at the same time during i create the level editor?
There are some "start by" turoial in c# for creation of level editor and engine 3d using direct x and possibly .x file?

Share this post


Link to post
Share on other sites
Handling lost devices is covered in the FAQ which I linked to earlier.

Having an editor early in the development process is a good thing since it's easy to add and test new content. I don't know of any tutorials that are specifically about editors and C# but I guess you could find some open source editors by googling. Besides - you don't really need it to be in C# since translating from another language is usually quite ok (especially if the concept is described in tutorial form).

I would start off by designing the engine. Write up a document on what you want it to do, what you need and everything else you can think about. This will give you a better idea of how the editor and engine should be created.

Since you seem to be a bit uncertain about how to handle this I'd do it piece by piece. You say you're good with C# then creating a simple WinForms app will be a piece of cake. Just build it piece by piece using two different projects (one for the engine and one for the editor) - and remember to check out the examples in the directx sdk if you haven't already.

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