It starts...

Share your Lufia fan fiction and artwork in this board.

Moderator: Moderator Team

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Thu Aug 13, 2009 6:15 pm

I've been away for a few days, family vacation (don't ask :D). After the exam on tuesday, I'll be free to work on it again though :)

Variables have been bugging me as well, but I came up with an idea in the vacation for my own usage; might be that it could help you guys as well. Say you enter a dungeon, and clear a puzzle where you have block X fall through a hole in the ground to the floor below, where you can continue using it. If you want to keep dungeon design as modular as possible, how would I keep track of that block? I could think of situations where I'd want to use those variables in environments outside of the dungeon as well- the king wanting to know if boss Y has been slain, the water on the worldmap being drained if you flipped a switch, etc.

What I'm introducing in my game is pretty simple, but pretty strong as well; a map container with pairs; the first half of the pair is the variable name; a simple string. The second will probably be a string representation of whatever you want to store, not sure enough on that yet. It allows near endless variables, allows growth when I need it, has every gameplay variable neatly in the same place, and can be stored to the HDD for later usage. If mapmakers name their dungeon smart enough (I'll make sure each gets a random ID), a variable could look like this:

{"1238975438.IsDamOpened","1"}

The odds of two mapmakers using the same variable for their dungeon is nearly zero this way, and they can make as many as they want. Perhaps it's possible to do such a thing in RPGMaker as well? I don't know the program, so it's probably a hollow suggestion. I do know that it's possible to extend GameMaker with DLL's though; this principle should work in a standalone library as well, if you need it.

Anthony
http://ti83magic.wordpress.com/
Any help, comments, suggestion or any other form of feedback is heavily appreciated :)

waveflux
Villager
Posts: 27
Joined: Fri Jul 17, 2009 11:00 pm

Postby waveflux » Thu Aug 13, 2009 7:49 pm

Hey Tony,

What you're describing is basically what you already need when you choose to save a game. A file containing all of the variables and their status. As for the block falling through you have a choice of 2 things. You can either have the block on both maps, with one of them being visible at a time, or you can change the map location of the block. It would all depend on if you're using one list pair for the whole game, or one list pair per map.

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Thu Aug 13, 2009 7:59 pm

Exactly- the class would make it very easy to serialize it all into a file, be it XML, or whatever :) I think I'm keeping the list global for the entire game, with some distinction to indicate if pairs belong to the same map or not (like the ID I mentioned). You could argue that a lot of the variables you'd use in a dungeon aren't worth saving though; the state of an unsolved puzzle, or which enemies are already vanquished on this floor. I'd keep a seperate, smaller list for those variables, but they don't need to be saved like the boulder would have to.

Tony
http://ti83magic.wordpress.com/

Any help, comments, suggestion or any other form of feedback is heavily appreciated :)

waveflux
Villager
Posts: 27
Joined: Fri Jul 17, 2009 11:00 pm

Postby waveflux » Fri Aug 14, 2009 3:38 am

Anthony wrote:Exactly- the class would make it very easy to serialize it all into a file, be it XML, or whatever :) I think I'm keeping the list global for the entire game, with some distinction to indicate if pairs belong to the same map or not (like the ID I mentioned). You could argue that a lot of the variables you'd use in a dungeon aren't worth saving though; the state of an unsolved puzzle, or which enemies are already vanquished on this floor. I'd keep a seperate, smaller list for those variables, but they don't need to be saved like the boulder would have to.

Tony


exactly. Why would you want to keep a list of the enemies that you've vanquished though?

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Fri Aug 14, 2009 8:09 am

Could be anything- a door that opens when all the enemies in this room are killed, for example; easiest way I can think of to do this is to increment a global variable each time an enemy is created, and decrement it once you kill it. On zero, open the door :) But it is but an example; I want to give the mapmaker the option to introduce his own variables, and this would enable him to do so :)

Tony
http://ti83magic.wordpress.com/

Any help, comments, suggestion or any other form of feedback is heavily appreciated :)

waveflux
Villager
Posts: 27
Joined: Fri Jul 17, 2009 11:00 pm

Postby waveflux » Fri Aug 14, 2009 7:46 pm

Anthony wrote:Could be anything- a door that opens when all the enemies in this room are killed, for example; easiest way I can think of to do this is to increment a global variable each time an enemy is created, and decrement it once you kill it. On zero, open the door :) But it is but an example; I want to give the mapmaker the option to introduce his own variables, and this would enable him to do so :)

Tony


ah ok i didn't think of enemies needed to be killed to open a door :)

User avatar
DarkMaster2101
Arek's Apprentice
Posts: 1703
Joined: Wed Jun 04, 2008 2:14 am
Location: Wavespace (where the sinistrals were born)
Contact:

Postby DarkMaster2101 » Fri Aug 14, 2009 9:20 pm

When programming a game, remember to keep the steps simple when writing a complex process. Let's say that the entire dungeon area(s) is a process on its own. It will keep tabs of all variables, global or not, inside that dungeon. Unless stated otherwise, variables that aren't changed globally (like exp and treasure chests) will reset at the end of the dungeon.

The boulder idea can work perfectly if and only if its detection and such is on a local scale via the dungeon its in. I do believe that when a player leaves a dungeon, the puzzles inside reset.

This way in case you want to re-use cache via different dungeon processes, you can. Every dungeon ought to be unique with its own variety. But this way you can re-use empty memory within that dungeon. I mean, you aren't going to be in two dungeons at once are you?
---DarkMaster2101

"Nonsense was beginning!"

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Fri Aug 14, 2009 9:31 pm

I work on a local scale, except for the changes I want to have permanently; I can think of situations where a solved puzzle should stay solved; one that opens the way out, for example, or a puzzle like the world's most difficult trick. Once it's solved, I should keep record of that. Until that time though, it's all in a locally, and trashable instance of the aforementioned class :)
http://ti83magic.wordpress.com/

Any help, comments, suggestion or any other form of feedback is heavily appreciated :)

User avatar
Lêi_Trigar
Sinistral Slayer
Posts: 770
Joined: Sun Feb 22, 2009 1:33 am
Contact:

Postby Lêi_Trigar » Wed Aug 26, 2009 3:37 pm

anything new going on Ant?
My username is pronounced LEE-EYE_TRY-GAR.

Lufia World Lotteries Won; 16, Tickets Bought; 68.

My other home... My Profile

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Wed Aug 26, 2009 5:14 pm

Nothing; way too much going on at the moment, celebrating continuously it seems :D Won a national competition at work, granting me a scholarship, so that's already a big whoop... redoing my room, which is taken me a big part of the week already, still not done... passed all my exams so far- and the classic 'I met this girl' argument, hehe :) But it's reasons like this why I want to keep it a solo project for now; no time constraints, no other people to satisfy regularly... but it will not be cancelled, no worries :)

Anthony
http://ti83magic.wordpress.com/

Any help, comments, suggestion or any other form of feedback is heavily appreciated :)

User avatar
Lêi_Trigar
Sinistral Slayer
Posts: 770
Joined: Sun Feb 22, 2009 1:33 am
Contact:

Postby Lêi_Trigar » Wed Aug 26, 2009 6:14 pm

ok cool just checking in. :)
My username is pronounced LEE-EYE_TRY-GAR.



Lufia World Lotteries Won; 16, Tickets Bought; 68.



My other home... My Profile

User avatar
Anthony
Hero of the Lufians
Posts: 434
Joined: Tue Jun 21, 2005 7:20 am
Location: Netherlands

Postby Anthony » Wed Aug 26, 2009 6:52 pm

Haha, np :D I started working less on it when the time came to finally implement external scripting- had a lot of trouble about understanding it all, then choosing which method to use, etc. I haven't got it working yet, but it's been a while since I could actually try :P

Tony
http://ti83magic.wordpress.com/

Any help, comments, suggestion or any other form of feedback is heavily appreciated :)


Return to “Lufia Fan Works”

Who is online

Users browsing this forum: No registered users and 2 guests