Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   Dungeon Craft - RPG Game Maker (http://www.ironworksforum.com/forum/forumdisplay.php?f=20)
-   -   Simulation of darkness in dungeons (http://www.ironworksforum.com/forum/showthread.php?t=100560)

Uatu 03-09-2009 10:43 PM

Simulation of darkness in dungeons
 
I've an idea to simulate darkness in dungeons... Basically:

1. Create TWO identical dungeon maps, using different graphics for each (basically dark and light versions of the same).
2. Put an event on every step of both dungeons that checks if the party has light (spell? item?) or not; depending on the result, teleport party to the correct dungeon.

Anyone have any idea as to whether this would work? :D

Dinonykos 03-10-2009 06:22 AM

Re: Simulation of darkness in dungeons
 
It would definetely work. You could also combine that approach with a quest. Per step, 1 is added to the quest's value, and after reaching a certain value, the torch (as an example) is extinguished. I remember that ST discussed something similar in another post, and probably you can find similar ideas in the FRUA newsletters.
However, it would certainly be a lot of effort - depending on the size of the level(s) and additional events to happen...

Uatu 03-10-2009 07:42 PM

Re: Simulation of darkness in dungeons
 
Cool... ;) Well, guess I will keep that in mind then (I am not good with using quests yet)...

SilentThief 03-25-2009 06:21 PM

Re: Simulation of darkness in dungeons
 
The problem comes in the transfer from day to nite. Currently, there is no way to use a "variable" in a teleport (or other event, and this is one of the reasons I put a request to be able to). For example, if you have a grid that is 10x10 you need a set of events to determine the daylight/darkness for EACH AND EVERY STEP as well as teleports for EACH AND EVERY STEP. You would have to, at the minimum; set up a test for and teleport for every location that you could enter. With a 10x10 grid, you have to chain 100 events that are teleport only. SquareX,Y coordinates like this: 0,0 0,1 0,2
ect all the way up to 9,9.

I was trying to figure a way to do something similar to this and ran into this problem. Here is an idea I came up with that may work better: Set up the "autodarken" with the darkness time to be between the hours of 23:00 and 0:00 only, and use a quest to count the daylight hours. If the desired condition is darkness, then auto-adjust the time to 23:00 hours. If the desired condition is light, adjust the time to 1:00. And after leaving the dungeon, update (auto-adjust the time) with the quest value.

This way, if your torch burns out, the time is set to the darkness time and it gets dark. If its dark, and you use an item (torch) or a spell (light) then it adjusts the time to the light time. When you leave, the time (that makes no sense while the party is in the dungeon) is corrected.

ST
ps, I wouldn't mind writing out each and every script (cut and paste style) and step for how to do this if anyone wants.

Uatu 03-25-2009 09:58 PM

Re: Simulation of darkness in dungeons
 
Hmm... Some of what you are saying is over my capability to understand :D What is autodarken? Does it work?

Dinonykos 03-26-2009 06:48 AM

Re: Simulation of darkness in dungeons
 
Well, I am also not sure if I understood completely.
Let's see: The level is generally bright, but dark form 23:00 to 0:00. And while running around in the level, if the torch is extinguished (after a certain amount of hours), you "time travel" to the interval from 23:00 to 0:00? Is that the principle?

SilentThief 03-26-2009 09:55 AM

Re: Simulation of darkness in dungeons
 
Quote:

Originally Posted by Uatu (Post 1227890)
Hmm... Some of what you are saying is over my capability to understand :D What is autodarken? Does it work?

autodarken is a built-in level setting (a checkbox that defaults to not-selected) that has the effect of darkening the 3d view for a selectable time. You find it in the area of the setting the time to display-alternate-background-for-night area when you select the properties of the level or the properties of zones (I forget as I'm not on my computer at this time, but using a library computer)

Quote:

Originally Posted by Dinonykos (Post 1227903)
Well, I am also not sure if I understood completely.
Let's see: The level is generally bright, but dark form 23:00 to 0:00. And while running around in the level, if the torch is extinguished (after a certain amount of hours), you "time travel" to the interval from 23:00 to 0:00? Is that the principle?

yeah, that is how it SHOULD work (I haven't tested it out). You'd want to make it so that the "normal" passage of time doesn't turn your dungeon dark. Instead of using a pass time event, you would have to set the time using scripts (this way it would just set the time to the desired value instead of possibly advancing a day forward. The quest is used to maintain the actual time, and would have to adjust the date if necessary.

Hmm, dealing with the actual passage of time doesn't sound as easy as I first thought tho. You'd prolly need a quest for the time, and another to include the number of days.

ST

Dinonykos 03-26-2009 10:10 AM

Re: Simulation of darkness in dungeons
 
Quote:

Originally Posted by SilentThief (Post 1227909)
Hmm, dealing with the actual passage of time doesn't sound as easy as I first thought tho. You'd prolly need a quest for the time, and another to include the number of days.

Yep... and you have to control somehow that the party is not walking around between 23:00 and 0:00 with the torch lit (certainly also via the quest and a time travel).

I generally am not so happy with the time travel idea, since the player will surely recognize the shifts in time, but I must admit that I don't see a more elegant solution right now. I have to think that over... :D

manikus 04-01-2009 03:29 PM

Re: Simulation of darkness in dungeons
 
Here's my two coppers...

The time travel method does not save coding for events, in fact there would be more scripting etc. It does require less art.

The autodarken feature is an alpha channel that is applied to the 3D view. It is able to be set form 0 to 255, being completely transparent to completely black. It can only have one setting, so everything in the game that is autodarkened is at the same level. The main drawback to this, in my opinion, is the darkness of a star-filled night is different from the darkness of dungoen tens of meters underground where the lights have gone out... :D (Not to mention the quality of light and color shift, etc.

Here are two things to think about~
You can cut and paste events (you would just need to change the coordinates of teleports).
Not every square of a map is used. A 10x10 dungeon may only realistically have 60 to 65 spots a PC can be in, and a 10x10 forest may only have 10 to 20.

For further thought~
Light and Dark are not the only options. :) Why not consider infravision as well?
This would be a third set of art and a check to see if a dwarf, elf, etc was in the party.

Here's a couple of concept pics of the differences I imagine.

day/night
http://one.xthost.info/elminster/day-night.png

light/dark/infrared
http://one.xthost.info/elminster/light-dark-infared.png

You could use all of the above in the same design by using the graphics trick, but only the light/dark pair (not infrared) using the autodarken feature, though of course you could decide on the level of darkness.

SilentThief 04-01-2009 10:39 PM

Re: Simulation of darkness in dungeons
 
still would be nice to have a script of your X,Y coordinates and the ability to use X,Y (variables) in teleport...
:D

ST


All times are GMT -4. The time now is 05:04 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved