PDA

View Full Version : Editor (Python programmers appreciated)


Brafil
2010-09-27, 20:55
Allright, was gonna post a new thread but wasn't sure. So this is the thread of the editor for my branch.

Current features:
- Load and display tiles
- Save and Load palettes
- Next: Delete tiles

I plan on doing nothing but palettes for now, maps can be hand-coded somehow. Horadrim, you should definitely start creating some tiles!

If you're a Python programmer and think you can help with this, just tell me. I'm open for anyone (you should have a little experience in one of the modules listed below).

You need: wxPython, PIL, NumPy and PyOpenGL to run the editor,and of course Python 2.6/3.0 (not sure about 3.x). The libraries are all included for Windows already.

Horadrim
2010-09-27, 22:07
Allright, was gonna post a new thread but wasn't sure. So this is the thread of the editor for my branch.

Current features:
- Load and display tiles, yay!
- Save and Load palettes
- Next: Delete tiles

C'mon it was THAT easy. I plan on doing nothing but palettes for know, maps can be hand-coded somehow. Horadrim, you should definitely start creating some tiles!

PS: Gonna upload soon. You need wxPython, PIL, NumPy and PyOpenGL (all included for Windows).

First I need to know what exactly the editor does and what tiles it could work with (and what they must be). Could you upload some working or demo version of it?

Brafil
2010-09-27, 22:59
I will. For now, you can create blender files with:

One mesh (others are ignored for now), complete with normals and UV textures. Dimensions should be 2x2x1: the bottom should touch the xz plane and the top should be at Y=-1 (not +1). This should work quite fine. I'll upload ASAP.

Medur
2010-09-28, 00:22
I'm a Python programmer, but I have no idea what you're talking about

Brafil
2010-09-28, 00:24
Oops, I forgot.

Jasiek
2010-09-28, 01:52
Brafil let me get this straight...

You want to make a crapload of 2x2x1 bricks ?? That's the same size as LBA grids...
with grid sizes like that you might as well just use the originals...
Escaping limitations and the polygon count of such bricks was exactly why me and David went for modelled levels. Even with some way of optimizing you won't reach the polygon count of a modelled level...

I don't see any point for a grid based level editor. In fact any editor like that if it's not procedural - meaning basically an automatic uv mapper + texturer combined with a tool that allows you to use complicated meshes for cutting other meshes with the texture automatically rearranging itself to seamlessly fit the new shape. Scaling, rotation of course should be there too. If you don't have such an editor, and are aiming for anything more then a dull environment, you might as well use a modelling program.

Have fun with the tiny grids, count me out.

ambient
2010-09-28, 07:49
Have fun with the tiny grids, count me out.

Agree. It's easy to design hundreds of sprites (like Adeline guys did), but designing hundreds of small models which should seamlessly fit in various combinations is impossible.

First, you can look towards such great tools as Valve's Hammer or UnrealEd (yeah, they were initially made for FPS shooters, but level designing principles aren't much different) and borrow some concepts from them.

My suggestion: to provide some basic functionality that isn't redundant, editor should import previously modelled map mesh and then create its in-game representation (so editor should be able to add triggers, interactive objects, various "special" surfaces like water, etc.)

Brafil
2010-09-28, 17:36
Err... I was planning on including flexible grids: resizable, rotatable etc. It's just that I have to do some other things first before I try this.

I still believe that it's easier in the long run, though. Making things such as wall pieces fit together shouldn't be too hard if the textures are tileable, which they should be in any case. And the grids aren't really complicated. When I've enabled flexible grids, even trees etc. can be represented by one tile and the mesh data is present just once in the whole game.

Polygon count is not that much of an issue. Basically, it's 65536 tiles for a fairly large map (64 * 64 * 16) and most of these are just empty space anyway. Let's say, a third of these tiles are used (less in most cases) and the renderer can intelligently decide which ones to render. I'd say it's at most 250 non-empty tiles per screen. I even guess it may be faster, since lots of tiles are reused and a smart engine can cache tiles such as the floor tiles.

I'll just go on. You don't seriously expect me to rewrite UnrealED, do you? I think Blender etc. is just fine for most purposes. I wrote that all in three days, there's a lot of room for improvement. And the reason I'm doing this is to try out new ideas. Not to rewrite the thing in the same way.

Objects/Triggers will come later. You can write scripts yourself in the meantime, but hopefully there will be a better solution available soon.

Brafil
2010-10-01, 15:44
Hmm... The tile preview part is certainly very difficult if I'm aiming for a good user experience. It's really raw right now, you can import tiles up to 8x8x8 units in size (y-units are half as large like in LBA), but the grid gets messy while increasing the size and some tiles may get clipped out of the viewing area (working on the right display algorithm).

I will work on other things such as improved grid selecting and collision shapes later.


If you're a Python programmer and think you can help with this, just tell me. I'm open for anyone (you should have a little experience in one of the modules listed below).

You need: wxPython, PIL, NumPy and PyOpenGL to run the editor,and of course Python 2.6/3.0 (not sure about 3.x). The libraries are all included for Windows already.


Scrap it, I'm using C++ again. I just feel more comfortable and I don't have these huge performance concerns. So far the python version is actually OK, you can load tiles, adjust grid sizes, move them and scale them (rotation comes later) so I guess it shouldn't be as hard as Jasiek said. Matching neighbouring tiles should be trivial if you snap everything to grid.

What do you think is needed for a palette editor except these basic things? Grid properties like collision shape, multiple grid selection etc?

Brafil
2010-10-03, 22:15
I successfully managed to convert everything to C++. Check out the new revision and give feedback please.

EDIT: Can a mod please remove the python part of the title?

ambient
2010-10-06, 15:54
I successfully managed to convert everything to C++. Check out the new revision and give feedback please.


Please, include static libraries into your SVN branch. It seems like your SVN client ignores *.a files.
And do you use Cygwin for compiling? If so, can't you use MinGW instead? (for the sake of project uniformity)

Brafil
2010-10-06, 17:42
I recommitted the libs folder. It is in the root directory because both the editor and the engine sharesome libraries.

And yes, I am building with Cygwin. I did this because I had some problems with MinGW (Cygwin and MinGW don't mix very well) but I'll try and use MinGW instead.

Brafil
2010-10-08, 21:10
I recommitted again. You can now set grid properties for each grid in a tile (collision shape, solidity and deadliness) and save and load things. I'm about to add multiple grid selection. Still, ask me for things and I'll do them.

I think some sort of grid selection by mouse would be nice, tho it'd be nontrivial to implement.

Brafil
2010-10-10, 14:17
Update: Multiple grid selection works fine. The tile information shown is always the weighted sum of the properties, that means if one of them is solid, it displays all of them solid, though not all of them are. If you uncheck the box, all selected tiles become non-solid. Same if in a map two grids overlap.

Going to move to the map editor right now.

ambient
2010-10-10, 15:04
I think some sort of grid selection by mouse would be nice, tho it'd be nontrivial to implement.

Look at gluUnproject. Guess that would be trivial enough.

Brafil
2010-10-10, 19:54
Well, I can try. I think I can do without, since the projection layout is simple.

The only problem is that selection will be sort of confusing since you have 2 dimensions to move in a 3d isometric scene. Going to look at LBArchitect and see how they did it.

Brafil
2010-10-15, 13:55
Going on holiday for the weekend, still working but it's in a broken state this moment so I won't upload it.

Brafil
2010-10-22, 20:31
I'm back. I have made some changes, for example tile import/export works 100% stored with everything. These should be pretty final. Mostly architectural improvements, though.

I added a move function and will add a zoom function this evening so it's easier to see the tiles.

Note that I'm still waiting for Horadrim cuz if he doesn't like it, it wouldn't make any sense.

Horadrim
2010-10-25, 14:28
Mmmm, sorry, I didn`t saw it yet. Since all these changes in the SVN, I`ve lost the trace of your branch and until now, I thought that you`re just testing/making stuff without pushing in the SVN repository. So, would you please post a link to your current branch with all the stuff you made? I was also hoping for some screenshots from the editor :P.

Brafil
2010-10-25, 15:23
Nice to have you back, as soon as I have fixed some minor bugs you'll be abe to test it. Just give me feedback on the tile editor etc. so I can improve it.

Notes:
- I haven't found any real way to implement floating point input, so the position and scale parts work with whole numbers (in quarters)
- The auto-zoom heuristic is not that great. I will ditch it and just resize the image, you can scroll it anyway
- The layout of the tile editor is not great, not much more to add
- I wonder how grid editing works. Press left or right, up or down or shift-up or shift-down to change the selected grid and ctrl + these to extend the selection. I really hope it's manageable (should be, for smaller tiles).

I have yet to find a way to make the lines behind the mesh to be clipped, actually. Makes it easier to see IMO.

It's not perfect, I'm not a professional GUI designer, but I'll try and make it easier for users to use.

Horadrim
2010-10-25, 22:25
By the way, the editor doesn`t compile under linux. As long as I see what the errors are, the editor isn`t cross platform oriented, isn`t it?

Brafil
2010-10-25, 22:41
Oh right, had some problems with Linux, difficult to port GUI applications, I'll try ASAP. Can you use MinGW till then or give me some error messages?

Horadrim
2010-10-27, 16:17
I couldn`t start the editor, even under Windows. There`s an error:

The procedure entry point __wrap__ZdaPv could not be located in the dynamic link library cygwin1.dll

Brafil
2010-10-27, 17:38
Dayum. I have to build it under MinGW then. I'll upload when I've got time today.

Brafil
2010-11-13, 20:39
Holiday on Mauritius, I couldn't manage to inform you beforehand. Will be back soon, I decided I'd leave everything electronic behind, so patience.

Brafil
2010-11-15, 10:12
Back but busy, ported to MinGW. Next comes undo/redo.

David
2010-12-09, 12:57
how is the editor ? I'd need one to define brick position and shapes, like real LBA1 levels.