News:

Holy shit, it's 2018 2019 2020 2021 2022 2023 2024, and the US isn't a fascist country! What a time to be alive.

Main Menu

XNA-based Level Editor

Started by warz, May 26, 2009, 11:01:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

warz


(update 1's shot)

I'm not quite announcing any finished products or anything, but this editor is going to be for a game I've been working on for the past several months. It's just a fairly simple 3D, isometric-style shooter, reminiscent of Sony's old "Infantry Online" game. What I've been needing to write, though, is an editor that'll just do some basic terrain creating. Initially I plan on being able to create and save heightmaps, or load existing heightmaps and render them to my viewport. I'll have this functionality implemented by the end of tomorrow, at least. I've already got code for this in my game, so that'll be relatively plug-n-go. After that, I'm not quite sure where the next logical step is but I think I'll add in some terrain picking, and work on manipulating the heightmap polygons on-screen - elevate, lower, smooth, whatever. If I get this far I'll add more goals, but I'm going to keep my sights relatively simple for now.

I'll keep updates coming as I work on this. Tomorrow should be a fun update.

Update 1: It took me a lot longer to get working how I wanted it, but I re-wrote the entire thing using a different method of getting XNA to work as a MDI child window. I'm using the Game class now which handles all the game looping, components and services for me. (I also get to use the content pipeline, now). I also threw in my free-moving camera, so now I can fully navigate around the 3D design space. The marker you see in the screenshot is just a simple origin marker placed at (0, 0, 0).

Update 2: http://forum.x86labs.org/index.php/topic,14336.msg177060.html#msg177060
http://www.chyea.org/ - web based markup debugger

Warrior

Looks nice. I havn't played with XNA in a while, what would be really cool would be XNA + a WPF Editor :).
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

warz

#2
Quote from: Warrior on May 26, 2009, 11:06:16 PM
Looks nice. I havn't played with XNA in a while, what would be really cool would be XNA + a WPF Editor :).

Yea. I was reading up on that prior to just settling with a Win Forms app.

I came across something that started to talk about having to use IIS and stuff for some type of communication. Thinking back on it now that doesn't make much sense, really, but it kind of turned me off.

I looked at the MS ribbon menu stuff, too. They've got it to where you have to purchase a license to use it? Pretty lame. It would be cool, though. :-P
http://www.chyea.org/ - web based markup debugger

Warrior

I think the WPF Ribbon (Including with the WPF Toolkit @ windowsclient.net) but it's pretty basic (No databinding support). With .NET4.0 it will be included standard in WPF.

One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

warz

#4


Update 2:
Had a busy day because of school, but I managed to spend a few hours coming up with a Heightmap and Terrain class. My Heightmap class is capable of generating vertices and indices for whatever size terrain you want. Right now the Heightmap class only generates a flat quadrilateral because I haven't finished the methods for writing/reading bitmaps, yet. Those are simple and I'm almost finished but I'm at that stage where I'm staring at the monitor just zoning out. Too much programming for me!

The Terrain class uses the Heightmap class to get the Vertex/Index Buffer data. The Terrain class is the class that is physically responsible for rendering the terrain on screen. So, in terms of editing the terrain, this class will invoke the Heightmap class when it's time to save whatever changes have been made to the terrain's height.

Like I mentioned in my original post's edit titled "update 1" - I've got a FreeCamera class in there, too. So, the user is able to navigate the 3D space. Right now, WASD move your forward, left, back, right. SpaceBar and E move you directly up. Q moves you directly down. Holding down LeftControl allows you to use the mouse to change the direction the camera is looking, and moving.
http://www.chyea.org/ - web based markup debugger