Steaming Pile of Program

Posted by Haizen on Feb. 20, 2013, 4:04 p.m.

So as of late I have been writing my own game engine and map maker in full java. Always having that lust for actually making the game content, but having to continue to complete the editor. I have finally reached a point that I can make content and finalize this version of the editor.

Below is an image of the background editor. Its compact, but it gets its job done with no unnecessary fields or buttons. This is how you would create your background and drag and drop in the Room Canvas to set on the actual map.

Everything is drag and drop as I forced myself to learn how to overload the Transfer handler of the JTree. Made it give me the the default node and I just parsed the object from there. Was simple enough, but took a whole day.

I want this editor to be as flexible and modifiable as possible. It does not save these 'Room Objects' to any special extension; just XML. It parses the root node so I don't have unnecessary file types by my program.

So you choose an image from a resource pack (that you can create) and then you can make that background a part of a whole different resource pack. Obviously this background is dependent on all related resource packs and I made a verification process for that.

This is the resource pack creator (Plugin Editor). You use this to import your own whatever type files into a archive that I did make an extension for; its called "mwa" (Messiah Wolf Archive (cocky I know)). It zips all the resources that you add from your computer to a normal zip archive, so an archiving program could easily unzip it. It includes a manifest just like java's jar, but I wanted mine to include 'editorId''s, 'reference names''s and other properties. So I created my own process for that.

I have many more pictures of what my editor can do right now, but I only want to show the most essential.

Below is the main view of the editor. You drag and drop resources from the Tab on the left side labeled 'Resource Palette' and it recognizes them as either Actor, Map, Background, etc and appropiately adds it into the canvas and map.

There is much more that I have start and plan to finish this week; like the world simulator. I have it working, just don't have the java-scripts with the car physics started yet (and quite frankly I do not want to start).

So yeah, coffee.

Comments

Haizen 11 years, 2 months ago

It is fun to watch it load the maps instantly. I feel like a boss whenever I drop it in there. This program mimics the Elder Scrolls Construction set. It was my inspiration for using the JTrees as my resource holder.

The drag and drag thing is also because I liked that implementation in the elder scrolls construction set. Wish I had that source code; would have saved me some time. :D

Mega 11 years, 2 months ago

I'm tackling something like this at the moment, though I'm only in the "Deciding on data structures" phase. I'm probably going to wind up using Java too, though.

I'm specifically trying to make an additive space brush editor, using the Octree data structure, somewhat like a lot of the old Quake editors, but with brushes and Octrees.

Quote:
its called "mwa" (Messiah Wolf Archive (cocky I know))
"mpk". MegaPAK. Thought it's not zip. I used it in Exile, and in my OS development for the initrd. Has hooks for compression, though I never got around to using them, so it's a store-only format at the moment.

Anyway, that's a nice editor. What method did you use for designing the interface?

Haizen 11 years, 2 months ago

I'm not exactly sure what you mean by what "method" I used. To keep things nice and tidy and professional looking, I used the GridBagLayout to store Controls in evenly spaced rows and columns. For the buttons that you see like "Commit" and "Close" I used a simple BoxLayout with Horizontal Fillers.

But for each Dialog that I created I tried to keep all buttons within a confined dimension like 72x22 for each button and 104x22 for each JTextField or JFormattedField.

All the dialogs bear similarities, but this is to keep things organized and tidy so there is no clutter and no room for sloppyiness.

My main problem with programming is that I love to comment on each line of code that I write.

Its not heavy, maybe one to two lines of commenting; so that in the future when I release this as freeware, someone can easily pickup on what I was thinking and modify without damaging other essential parts of the program.

I would love to see an example of what you're working on. If you need any help with Java I would love to give you some assistance.

JuurianChi 11 years, 2 months ago

"He would love to"

Twice.

Can't say no, Mega.

Haizen 11 years, 2 months ago

Sure can't >:3

Mega 11 years, 2 months ago

Ah, should've been more clear. I was curious as to whether or not you used the Eclipse IDE or NetBeans to design the UI, or whether it was hand-coded. :P

I'll probably be showing screenshots sooner or later of my editor.

Haizen 11 years, 2 months ago

Ahhhh I see. I used Netbeans for the Dialogs. Hand coded the JPanels, JFrame and all that other good stuff. I only use the Netbeans editor for the GridBagLayout stuff.

Mega 11 years, 2 months ago

Quote:
Can't say no, Mega.
But I don't need any help with Java D:

I'll be showing screenshots when it's in a visual format though. And I'll release it.

Haizen 11 years, 2 months ago

It was only if you needed help. If you don't need help then ill just stalk you for those screen shots of your program. (Prowl Mode)

Mega 11 years, 2 months ago

*walks backwards so he can spot stalkers*