Egoboo Community Forum

The Legend of Egoboo Sporks of Yore
It is currently Sat Nov 01, 2014 5:02 am

All times are UTC




Post new topic Reply to topic  [ 183 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 13  Next
Author Message
PostPosted: Thu Dec 22, 2011 6:15 am 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Mon Dec 26, 2011 4:38 pm 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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.

_________________
Two beer or not two beer... rather a malt whisky


Last edited by bitnapper on Tue Dec 27, 2011 12:23 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Dec 27, 2011 1:13 am 
Offline
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
User avatar

Joined: Wed Jul 23, 2008 1:27 am
Posts: 3787
Location: Norway
Nice :)

_________________
http://egoboo.sourceforge.net
Image

"Always trust a grinning fox. Trust me."


Top
 Profile  
 
PostPosted: Wed Dec 28, 2011 1:02 am 
Offline
Protector (Senior Member)
Protector (Senior Member)
User avatar

Joined: Wed Jul 23, 2008 8:46 pm
Posts: 8390
Location: Australia
This is going to be great. Props to you, man. :D

_________________
"The why-dunnit is equally as important as the who and how. Never ignore the heart!"

Facebook: Trilby


Top
 Profile  
 
PostPosted: Fri Dec 30, 2011 10:21 am 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Mon Jan 02, 2012 2:14 pm 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Tue Dec 25, 2012 10:32 pm 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Tue Dec 25, 2012 10:55 pm 
Offline
Lumberjack (Developer)
Lumberjack (Developer)
User avatar

Joined: Wed Jul 23, 2008 6:56 am
Posts: 7271
If feedback is what you need, I'll feedback you so hard your face will melt off.

_________________
Image


Top
 Profile  
 
PostPosted: Fri Dec 28, 2012 3:02 pm 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Fri Dec 28, 2012 5:16 pm 
Offline
Sheep (Developer)
Sheep (Developer)
User avatar

Joined: Wed Jul 23, 2008 1:39 am
Posts: 2974
Location: Best Southwest
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.

_________________
...


Top
 Profile  
 
PostPosted: Fri Dec 28, 2012 8:28 pm 
Offline
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
User avatar

Joined: Wed Jul 23, 2008 1:27 am
Posts: 3787
Location: Norway
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.)

_________________
http://egoboo.sourceforge.net
Image

"Always trust a grinning fox. Trust me."


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 6:06 pm 
Offline
Lumberjack (Developer)
Lumberjack (Developer)
User avatar

Joined: Wed Jul 23, 2008 6:56 am
Posts: 7271
Speaking of the SVN, how do I access it?

_________________
Image


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 7:23 pm 
Offline
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
User avatar

Joined: Wed Jul 23, 2008 1:27 am
Posts: 3787
Location: Norway
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.

_________________
http://egoboo.sourceforge.net
Image

"Always trust a grinning fox. Trust me."


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 8:24 pm 
Offline
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
User avatar

Joined: Fri Jan 30, 2009 3:33 pm
Posts: 131
Location: Somewhere near the alps
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


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 9:10 pm 
Offline
Lumberjack (Developer)
Lumberjack (Developer)
User avatar

Joined: Wed Jul 23, 2008 6:56 am
Posts: 7271
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?

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 183 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 13  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Get Egoboo at SourceForge.net. Fast, secure and Free Open Source software downloads