Egoboo Forum

The Legend of Egoboo Sporks of Yore
Module linking
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help
View previous topic :: View next topic  
Author Message
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Thu Dec 06, 2007 4:08 pm    Post subject: Module linking If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Hello everyone,

I am currently trying to get into Egoboo development, because I wanted to start an own little game project based on Egoboo.

One basic requirement for that project is module linking.

I already looks around the net, but I didn't find anything useful.
There seems to be a version of Egoboo called "Randegoboo" with module linking. Sadly, the page seems to be offline and I was not able to find any alternative download.

Does anyone still have the source code of "Randegoboo"?

If not, I'll have to code it by myself.

I already looked at script.c, where all scriptable thing are defined.
Do I have to care about something special for module linking, or does it work like the following:
- Create a new valuecode "SWITCH_MODULE" for run_function()
- Save some player data (health, items, ...)
- Call release_module
- Call load_module
- Load the player data again
- Call an own function that teleports the player to the right location (like the top of the module if you left the previous module at the bottom)

Thanks for your help!

Greetings,
xenom
Back to top
View user's profile Send private message
PurpleSquerkle
Supreme Cookiemancer
Supreme Cookiemancer


Joined: 28 Oct 2007
Age: 17
Posts: 4370
Location: Midwestern US

PostPosted: Thu Dec 06, 2007 4:42 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Module linking isn't working, currently, but I think it's fairly high on the todo list.
_________________

+ PurpleSquerkle

--My website--
Latest update= 7/15/08; Three new midi loops.

{new Squerkle coming as soon as I stop being lazy}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Thu Dec 06, 2007 5:01 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Oh, it isn't even working with Randegoboo?

Ok, so I'll have a try by myself on the weekend Smile
Back to top
View user's profile Send private message
PurpleSquerkle
Supreme Cookiemancer
Supreme Cookiemancer


Joined: 28 Oct 2007
Age: 17
Posts: 4370
Location: Midwestern US

PostPosted: Thu Dec 06, 2007 5:06 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I believe Randegoboo doesn't use the new source thing with the better menus and everything; the one we use now.
Out of curiosity, what is your "little game project?"
_________________

+ PurpleSquerkle

--My website--
Latest update= 7/15/08; Three new midi loops.

{new Squerkle coming as soon as I stop being lazy}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zefz
Lead Designer
Lead Designer


Joined: 16 Sep 2007
Posts: 2305
Location: Norway

PostPosted: Thu Dec 06, 2007 5:33 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Randegoboo does support Linking. Linking should not be too hard to add. We plan to add it into the game at some point...
_________________
http://egoboo.sourceforge.net

"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Chainsaw
Lumberjack
Lumberjack


Joined: 20 Oct 2007
Age: 15
Posts: 2378
Location: Israel

PostPosted: Thu Dec 06, 2007 5:55 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Module linking was possible at some point, i remember the world map module that let you enter the palaces by bumping into them on the map, but i think it won't work with the current version of Egoboo.
And i can't find that map anywhere either, just the test module without the linking.
_________________
"To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
Back to top
View user's profile Send private message Send e-mail
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Thu Dec 06, 2007 7:30 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

PurpleSquerkle wrote:
I believe Randegoboo doesn't use the new source thing with the better menus and everything; the one we use now.
Out of curiosity, what is your "little game project?"

Maybe it is possible to port the module linking to the newest code base (with a patch)?

Btw:
Planned Key features for my project:
- Optimize the game for one player (Singleplayer only)
- Only one character class (hero)
- Own storyline
- Own characters & world
- ~5 weapons (sword, bow, bomb, whip and something else Very Happy)
- The game will be split into several islands, so I can extend it any time
- Disable item dropping / camera rotation
- Enemies don't drop weapons (only potions / money)
- Make heavy usage of module linking

So, I don't need to change that much on the code:
- Add Linking between modules
- Adjust the main menu for my needs
- New in-game icons (health, current item, ...)
- Maybe work on a dialog system, but that is not very important for my plans


The rest will be scripting / mapping / modeling.
I know that's still much for a single person, but the whole thing is more a learning project than a real game project.


Zefz wrote:
Randegoboo does support Linking. Linking should not be too hard to add. We plan to add it into the game at some point...

Does anyone still have the Randegoboo code with the working module linking?
I'd like to have a look at the code to have a better understanding on how linking can be implemented. If I can get it to work, I could create a patch for you.

Thanks!
Back to top
View user's profile Send private message
PurpleSquerkle
Supreme Cookiemancer
Supreme Cookiemancer


Joined: 28 Oct 2007
Age: 17
Posts: 4370
Location: Midwestern US

PostPosted: Thu Dec 06, 2007 8:28 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Hm, sounds fun.
_________________

+ PurpleSquerkle

--My website--
Latest update= 7/15/08; Three new midi loops.

{new Squerkle coming as soon as I stop being lazy}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Agent of Dread
lolwut?? (Moderator)
lolwut?? (Moderator)


Joined: 23 Sep 2007
Age: 11
Posts: 4347
Location: FACEPLANT

PostPosted: Thu Dec 06, 2007 9:21 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I like your ideas.
_________________
FACEPLANT
Back to top
View user's profile Send private message Send e-mail MSN Messenger
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Fri Dec 07, 2007 1:14 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I have the source for randegoboo, but the problem is that it depends on code written in C++ and integration with an older version of Lua.
Back to top
View user's profile Send private message
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Tue Dec 11, 2007 6:02 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Ok, here is my concept for handling the whole linking stuff.

This version of module linking requires two new entities (don't know how they are called in egoboo):
link_source
This works like a trigger box (call an event when you step onto a certain fan / tile).
If the player steps into this box, he will get teleported to another module.
To get more accurate linking, a link_target is placed into the link_source.

The link_source entity has the following options:
- "mod" - specifies the name of the target module to load
- "target" - specifies the name the link_target in the destination module


link_target
This entity marks the spot where the player will be after switching the module (like the player start position).

Options:
- name / number - specifies the name of the link_target (I don't know if you can specify a string in a script. Maybe you have to specify a number here)

An improved version will be a "per-pixel" linking:
This method requires an extra link_target which is placed in the link_source box. Then the engine will calculate the difference between the player's coordinates and the coordinates of the link_target in the source module. This allows the engine to place the player relative to the link_source at the target module.

When this improvement is implemented, it should be allowed to switch it off. So the player will be directly placed at the link_target (useful for stairs / doors).


Procedure of the module linking
The following things will happen if a player enters the link_source:
- Save the game data* using a save() function
( - Improvement: calculate the needed coordinates relative to the link_taret for much finer placement at the target)
- End the current module (without a winning messace Wink)
- Load the module specified in the link_source
- Look for the link_target (don't know what happens when none is found. Maybe exit the game with an error or load the old module again)
- Load all game data*
- Place the player at the target location
- Return playing Wink

*The module linking will depend on save / load functions. Everything you add to the save / load function will be transported to the new module. Another improvement would be to specify different save / load functions (like saveplayer(), saveallies(), savepets(), savemonsterinrange()), so the module developer can choose what to save.

Any comments on this? Very Happy
Back to top
View user's profile Send private message
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Tue Dec 11, 2007 7:06 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

The old method used the existing "passage" system with a script that initiated the module swap. There was also an additional data structure(s) that kept track of the character spawning and what modules were connected to the current module.
Back to top
View user's profile Send private message
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Sun Dec 23, 2007 6:03 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

bgbirdsey:
Thanks for the hint of the passage system. I took a deeper look into the randegoboo source code, but (as far as I've seen) that code is only useful for random generated maps. My version will be a bit different (so it fits my needs), but it will be based on the passage system, too.

Those "linking passages" will be a bit different from the existing ones. Those passages are always open and they don't have any special masks.
Once a player enters this linking passage, the module swap will get triggered.

The linking passages are generated using a link.txt file (one for each module). In this file you specify the shortname of the new module and the object id of the link_target for each passage.


The only thing that currently works is the generation of standard passages with predefined attributes based on the link.txt file.

I'm currently creating three small test modules for working on the module swap.

What comes next:
- Trigger the module linking
- Teleport the player to the defined link_target
- Don't loose player info / stats at the module swap

I hope I can finish a first working version at the end of the week.
Back to top
View user's profile Send private message
xenom
Tranch
Tranch


Joined: 06 Dec 2007
Age: 23
Posts: 84
Location: Germany

PostPosted: Sat Dec 29, 2007 9:50 pm    Post subject: Status update If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Status update
I now got a first working version of the module linking (at least I don't get any more segmentation faults when triggering the module switch Wink).

How does it work?
"My" implmentation is similar to the one in randegoboo. The main difference is that the module developer can specify the target module / target position via an external file called links.txt.

The links.txt file has the following layout:
Code:

// This file contains all passages that link the current module to other modules
//             Target-module  TargetX TargetY TargetZ
0 Advent:      advent.mod     2       2       1
1 Healer:      healer.mod     3       3       1
2 Elf:         elf.mod        2       2       1
3 linktest1:   linktest1.mod  3       3       1
4 linktest1:   advent.mod     2       2       1

The first number is the linking ID the module developer specifys in tmpargument.
The module name is the name of the module that gets loaded at the linking.
TargetX, targetY and targetZ will specify the new player position in the target module (unused yet).


The module developer can call a new function called SwitchModule. This module activated the module switch.


Test module & was does not work yet
I created a test module with a test passage. If you step into this passage, you will get dropped into the adventurer starter. Smile

Things that don't work yet:
- Teleport the player to the new location (you currently start at the normal spawn point)
- Restore player info from the old module

I don't want to post code yet, because I first want to implement those other two points Smile
Back to top
View user's profile Send private message
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Sat Dec 29, 2007 10:17 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Cool good to see you've made a simple implementation for the linking code. I want to add randegoboo back in, but that may be a while because of some complexities.

How does the code know that a given passage is a module linking passage? Are they completely different structures, or are they a mod eot the existing passage system?

My simple idea was to add a bits to the "passmask[]" variable to flag certain special kinds of passages. Right now, they only contain mods to the meshfx bits for the tiles inside the passage.

I was also wanting to attach a script to the passage itself. Right now, I think you can only make a shop passage and have the "moduletool.obj" as the owner, or something. There is no real reason that passages could not have their own scripst, though.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
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 vote in polls in this forum


© 2007 Informe.com. Get Free Forum Hosting
Powered by phpBB © 2001, 2005 phpBB Group

RedSilver 1.01 Theme was programmed by DEVPPL HTML Forum
Images were made by DEVPPL Photoshop Forum