EGOBOO -- Another editor

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

The work for the last adjustments for the reduced edit-modes comes along nicely.
I use a new module 'sewers' as test for the editor. I plan to have it a full blown new map for egoboo. I need an example how easy it is to create a module using the new editor :)

Now I do some tests in a testbed for adjusted code of the 'wallmaker'-code.
Two beer or not two beer... rather a malt whisky
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Hooray :mrgreen:
After al lot of fiddling around with the wallmaker code in my testbed I think at last I found the solution for perfect map drawing with right mouse button for floors and left mouse button for walls.
Now I have to move it to the editor code.

I have uploaded the changes. Next step is to choose areas for editing/add or delete areas and spawn points.
Some more edit modes will be moved to the main input module.
Last edited by bitnapper on Tue Dec 27, 2011 12:23 pm, edited 1 time in total.
Two beer or not two beer... rather a malt whisky
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

Nice :)
User avatar
Agent of Dread
Protector (Senior Member)
Protector (Senior Member)
Posts: 8991
Joined: Wed Jul 23, 2008 8:46 pm
Location: Australia
Contact:

Re: EGOBOO -- Another editor

Post by Agent of Dread »

This is going to be great. Props to you, man. :D
- Linktree: linktr.ee/trilbs -
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Work done
A big update on the documentation of the editor.
The newest description is available here http://fraueschueh.ch/egoboo/howto/index.html

Simplified the code for the editing tools.

Next steps
- Work on the 'sewers' module for tests how it works to 'add' passages and spawn points

If it'll become late: Happy new year to everybody :mrgreen:
Two beer or not two beer... rather a malt whisky
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

For private reasons I'm off developement of the editor for the next few days. :|

I return to work as soon as possible.
Two beer or not two beer... rather a malt whisky
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

So, here I go again. Hope there will be some feedback about my work. Try to add loading characters and display its models...
Two beer or not two beer... rather a malt whisky
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Re: EGOBOO -- Another editor

Post by Cimeries »

If feedback is what you need, I'll feedback you so hard your face will melt off.
:wink:
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Three functions a day... :|

This morning I removed the compiling errors from the new files with the basic functions I ported. I'll add some more stuff for basic viewing characters/objects with inventory. After that, I'll add these files to the SVN. I changed the characters to have the inventory as an array instead of a linked list, because it's much easier to handle for loading, display and writing it back to a 'spawn.txt' file.

The editor has now a strange display of the map if textures are switched off, but I don't care at the moment. It displays correct as the map is drawn textured.
It also has an own working directory 'editor' in the games directory. And I'll add a menu point 'play it!' ASAP. With this one I add a stub to the 'play'-part of the editor for easy extension.

@zefz:
'PLAYER 1' to 'PLAYER 4' are placeholders with positions for characters exported characters from another map, is that correct? And where (in which directory) do I find the exported characters?
Are the empty slots needed for the default players in the 'spawn.txt' file ?
I think about a 'savegame' directory for the exported characters, what do you think ?
And how should I display the 'random treasure' in the Inventory of the editor (Name and Icon)?

Using SDL: I invested a lot of time into the functions to work with SDL, so I have no desire to change that. I don't like to load multiple libraries either. That's why the editor only supports bmp-files at the moment.
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

bitnapper wrote:'PLAYER 1' to 'PLAYER 4' are placeholders with positions for characters exported characters from another map, is that correct? And where (in which directory) do I find the exported characters?
Yes; they are currently in %appdata%/Egoboo/players on Windows, ~/.egoboo-2.x/players on Linux, and ~/Documents/Egoboo/players on OS X. It's moved to (userdata)/import on loading though.
bitnapper wrote:Are the empty slots needed for the default players in the 'spawn.txt' file ?
Yes, as they are the inventory slots for the players.
...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

We should change how objects are loaded and spawned. All global objects should be either loaded on-demand (lazy loading using a resource handler) or all loaded on game startup. That way we even eliminate most loading time of all modules in-game.

When spawning stuff either in scripts or in spawn.txt it makes more sense to use the actual object name rather than some arbitrary slot number. Also hard-coding players and their inventories into specific slot numbers is also a bad idea, since this means number of players and inventory size will for ever be hard-coded.

So to spawn a sword we use "sword.obj" instead of a random number like 68. This will ensure less bugs since everything is same across modules and also make it easier for developers to add new content! I think we would need a simple converter to convert from old format to new format (something that could easily be done run-time so we support old legacy type modules).

As for random items in the map editor:
We could create a couple of icons, one for each treasure group indicating a random item type. (Potion, Weapon, Spellbook, etc.)
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Re: EGOBOO -- Another editor

Post by Cimeries »

Speaking of the SVN, how do I access it?
:wink:
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

http://egoboo.svn.sourceforge.net/viewvc/egoboo/

Although I would recommend using Mercurial or GIT instead of SVN. I have hosted an empty mercurial repository on the Egoboo project site at sourceforge.
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Additional code is up in SVN:
- Basic function for loading objects and put them, using 'spawn.txt' on the map or in a characters inventory
- Ported code for Character-Inventory. Simplified it.
- Simple loader for MD2-Files (for character icons, code from 2.8.x can be ported in a later stage)
- Additional value in "config" file for the game-directory, needed for loading objects from the GOR

Known bugs:
The wrong spawn-position desriptions are returned because a the new object-struct is used without reference to the character loaded. This will be fixed by the next SVN-update.

Infos and other thoughts:
Objects are loaded by object name and only once. Then there are spawned on the map or put in a characters inventory. "Player 1" - "Player 4" are put in empty reserved slots to be filled by exported data after the level is loaded. If the characters are exported with a 'spawn.txt' file besides the character profile, then it is possible to carry 'GOR'-items in hands and inventory of the character to the next module.

Character-/Object-Data and all other object data are loaded by name and then attached to a general 'Display-Object'-struct which is used for movement by the engine. Particles will be attached to this general object too after implementation.

'Display-Objects' are moved by the engine and will be used for collision checking (they hold the bounding box). Attaching the 'Display-Objects' to the tiles they are on (as basically done now by the editor code -- later in a single linked list) makes collison test easy, because only the characters and the eight adjacent tiles have to be tested for collision.

There will be no 'attached' code be needed anymore. 'Hands' are the first two slots of the inventory. These have to be displayed with the character, if there are any. If there is a character you can ride on, the 'rider' is the first character in the inventory of the 'mount'. So there is no separate 'rider' code needed either.

Messages are sent to all players using a MSG-struct. These are translated to strings for the human player for display and used by the AI to running its script accordingly). This approach can also be used for logging purposed by sending it to a character with a special - probably negative - number.

Rough display order ('Display-List' having a link to objects and tiles which will be depth-sorted):
- Water-Tiles bottom
- Normal Tiles bottom and water-top
- Walls and objects (Characters and particles)

Game code need for display:
3D:
- 3D-Engine code
- Map desription
- Character description/data
- Particle description/data
2D:
- Character description/data
- Message handler
(Menu is created using global 'sdlgl' functions as in editor)

The code is written top down, starting with @todos in 'stub'-functions with description what they should do.
After that the original code is ported (I use version 2.8.x, the last 'non-C++ version as basis).
There are no header files included in other header files, wherever possible (except 'definition' headers with no related code)
Two beer or not two beer... rather a malt whisky
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Re: EGOBOO -- Another editor

Post by Cimeries »

bitnapper wrote:If there is a character you can ride on, the 'rider' is the first character in the inventory of the 'mount'. So there is no separate 'rider' code needed either.
If my memory serves me right, we never spawned riders in the mount's inventory (something about having an inventory inside an inventory, I think), riders were simply placed on top of the mounts so that they fell and got 'saddled' as soon as the module loaded.

I downloaded bitnapper's directory with all the editor stuff...
I see the sln file, but I don't have visual studio to open it with. Is there some other way to run it? If I understood correctly, it needs to be compiled, how do I do that?
:wink:
Post Reply