Skip to main content
gamedev.net
🔒 Locked

Another Map Editor Thread

Started by Mr Lane Dec 27, 2004 at 8:08 AM 6 replies 700+ views
Original Post
Mr Lane
Mr Lane
Hello Its come time for me to make a map editor for my engine, the problem is i really am being put off by the difficulties. I considered writing the editor in Java so i could use swing, but i really dont like java and am worried about the thing slowing down when maps get big. I really would like to use C (or C++ which i dont mind as much), but I dont like win32 from my early experiences. I have tangled with win32 when i started with OpenGL, but have now moved to SDL, which makes all the windowing and key inputs so easy. I have no idea how to do a GUI in SDL, so i was wondering is it possible (or unwise) to use SDL in my editor for windowing ( i will need 4 windows) and capturing key and mouse inputs, but using win32 API for things like dialog boxes, menus and buttons? Kind of a hybrid app. This would be pretty ugly code wouldnt it? Anyone got any suggestions for this overwhelmed programmer?
SiCrane
SiCrane
There are GUI toolkits for SDL. ParaGUI seems to be the most popular right now.

Alternately, you can try a different windowing toolkit, like wxWindows.
Mr Lane
Mr Lane
ParaGUI seems to be exactly what I am after. Thanks heaps!
wyrzy
wyrzy
Do you have access to C#.NET? Making a Map Editor is rather easy with Windows.Forms as its basically drag-and-drop and this way you can get on to making your game.

I've heard of some people having troubles using Win32 Messages Boxes with SDL, so if you're going to go with Win32, I would just grab the window loading code from somewhere and then setup everything else you need. I am pretty sure that you cannot bring up multiple "real" windows when using SDL, but I could be wrong. *EDIT* I would agree with SiCrane suggestion about ParaGUI if you want to use SDL */EDIT*

Also, if you don't have access to VS.NET, then you could use Java. I believe there is a free editor so can design you app in WYSIWYG mode. Just for the map editor, I don't think its going to be too slow. Java Is slower than C++ for most things, but for a map editor, I don't think you're going to need it running too fast to get things accomplished.

What type of game is this for?
3dmodelerguy
3dmodelerguy
I woul storng suggest use wxWidgets. setting upo windows is very easy and 30 line and you have your main window and you can ad thing with 1-2 lines of code. OpenGL is also supported so if you wanted to go to 3D, the move would be easy.
Mr Lane
Mr Lane
Quote:
Original post by wyrzy
Do you have access to C#.NET? Making a Map Editor is rather easy with Windows.Forms as its basically drag-and-drop and this way you can get on to making your game.
I have heard about this. I could have picked up the 2003 version for VisualC++ .NET for 10 bucks at uni when they had a deal on, but i didnt bother. Stupid me. I have also got a book on C# and know a bit about it, so this would have worked out well.

Quote:
I've heard of some people having troubles using Win32 Messages Boxes with SDL, so if you're going to go with Win32, I would just grab the window loading code from somewhere and then setup everything else you need. I am pretty sure that you cannot bring up multiple "real" windows when using SDL, but I could be wrong. *EDIT* I would agree with SiCrane suggestion about ParaGUI if you want to use SDL */EDIT*
I think your right with SDL and that restriction. I know i cant bring up 4 seperate OpenGL windows with it (but i can split that window into 4 viewports).

Quote:
Also, if you don't have access to VS.NET, then you could use Java. I believe there is a free editor so can design you app in WYSIWYG mode. Just for the map editor, I don't think its going to be too slow. Java Is slower than C++ for most things, but for a map editor, I don't think you're going to need it running too fast to get things accomplished.

What type of game is this for?
Its a 3D engine and at the moment has terrain and static meshes, but i am looking to add CSG to the engine for indoor areas, and i really would prefer my own editor for this. I plan for the editor to have 3 2D and one 3D viewport just like UnrealEd. The editor creation is the biggest hurdle: i know how to do the CSG stuff and the PVS, but actually working out how to select objects in the viewports and manipulate them I have no idea about as this point. Also I have only created GUI's in Java Swing...but i dont like the idea of running the viewports via java (unless there is a way to run a java GUI on top of a C editor?).

In short I have been doing alot of planning, but there is not much point implemeting anything till i have made an editor to create reasonable sized maps.

If i do go back to win32 with this, then i may as well convert the engine over to win32 as well...i would rather explore all options before i do this.
Mr Lane
Mr Lane
Quote:
Original post by 3dmodelerguy
I woul storng suggest use wxWidgets. setting upo windows is very easy and 30 line and you have your main window and you can ad thing with 1-2 lines of code. OpenGL is also supported so if you wanted to go to 3D, the move would be easy.
This wxWidgets looks cool I have to say.

If wxWidgets can gab mouse and keyboard input and open an OpenGL window for my editor, what reason would I have to use SDL for my actual engine?

Maybe I am missing something. I will sleep and review all this tomorrow.
Mr Lane
Mr Lane
OK after another day of review I have decided wxWidgets would be a good choice for an editor GUI.

My question for those who have used it is: can I open one or even more OpenGL windows in a wxWidget window? If so will this require any Win32 stuff? Can SDL be used to open an OpenGL window within a wxWidget window?

What i really want is 3 OpenGL windows in 2D Orthographic mode drawing lines and a 4th window rendering perspective 3D*. I will need to be able to interact with the OpenGL window, and OpenGL has selection mode and picking for that (is this the best way to do it?). The thing is, does wxWidgets deliver mouse position information that I can use for OpenGL's selection mode through its event system similar to how you can grab mouse coords within an SDL window?

In general, is this the correct approach for how to go about making an editor? Or am i really lost?

*I know SDL cant open more then one OpenGL window in a single app, but you can split a window into seperate viewports which solves that problem.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.