Aller au contenu

Photo

Dynamic areas?


19 réponses à ce sujet

#1
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
I've been reading on the toolset wiki about the level editor and the area editor, and I thought of a question.

As I understand, the level editor is for laying out all the static, non-interactive, non-scriptable elements of a region of your game world. You can then partition your level space into one or more "areas" which contain all of the interactive gameplay elements via the area editor.

My question is about the feasability of making an area appear to change based on player actions. Say for instance, a town or a castle that starts out as an empty plot of land and gets built up over time. Obviously you could build several versions of the area and load different ones to give the appearance that things are changing, but that forces you into a linear set of states. I assume there is a way to place an object in the area editor, set it invisible, then use a script to make it appear. The object would need to be big and have dynamic collision, but it shouldn't light up when a player mouses over or be interactive in any way.

Does anyone know if this sounds feasible?

#2
CID-78

CID-78
  • Members
  • 1 124 messages
only the part involving multiple areas as a work around. DA:O is quite static in this sense and only minor details will work dynamically.

#3
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
"I assume there is a way to place an object in the area editor, set it invisible, then use a script to make it appear."



This much is true though right? I mean there must be a way to spawn things, even if it isn't buildings and what-not. Can I have a lever that when pulled, causes a chest to appear?




#4
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
Yes, you can spawn objects. They will have collision when activated and they don't have to have mouse over.



However, they are not lit the same way as the static background art, so your dynamically spawned buildings will not blend perfectly into the environment, and will not cast shadows. If you place dozens or particularly hundreds of placeables in an area, you may also see performance issues on slower machines.

#5
Proleric

Proleric
  • Members
  • 2 350 messages

FalloutBoy wrote...

...Obviously you could build several versions of the area and load different ones to give the appearance that things are changing, but that forces you into a linear set of states...

That's the best way to handle the lighting issue. Each area would have a different version of the level. This could be non-linear, within reason. For example, if you had 5 potential changes to the level, you'd need to build 32 versions to cover all possibilities. Changes to dynamic objects - e.g. NPCs leaving town - could be handled by scripting on entry to each version of the area.

#6
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
It sounds to me like it is possible to spawn buildings as long as you can forgive the graphics anomalies. I guess I'll just have to decide when I see it in action. I just thought it would be a neat feature to design some gameplay around. If the only way to do it is to design multiple versions of the area, then I'll scrap the idea and do something else.


#7
Adinos

Adinos
  • Members
  • 341 messages
It might be possible to get around some of the issues with shadows with a little layout trickery (basically preventing the player from getting to locations where the problematic shadows would be obvious).

However, if you need two versions of an area, with, say...a building in one, and a burnt'down version of that building in the other, it is better to just create two "almost identical" areas.

Still, what you are talking about should be doable - I haven't tried it, so I'm not sure how it will turn out, though.

Modifié par Adinos, 27 octobre 2009 - 05:26 .


#8
Shadow180

Shadow180
  • Members
  • 109 messages
Right - depending on how good you are with modelling and custom content there may be a way to get around this. The problem we are facing is that the models basically wouldn't cast the correct light onto the ground and may also not receive shadows correctly from other objects.



What can we do about this? Instead of using a variety of objects use custom content that has had the shadows baked onto the texture in a modelling program such as 3Ds Max. You could then disable and enable models seamlessly. This means you would also have to model the floor.



The only other lighting problem I can see is that characters would not be lit correctly when moving through the shadows. However, this doesn't seem to be too big a problem as the character lighting doesn't change much anyway.



So the biggest question is, is doing that worth the effort?



In cases such as one large building which could be destroyed in a cut scene for example it may be worth the effort but for "strategy" type modules where the city builds up over time it probably would not be worth it. So that is probably the most advanced method and the most dynamic method, using separate areas and variables may work but not to the same effect as that.



Also, we have currently not had any work about any CC tools, so it could be a while before we can achieve this method and it would also take some skill to achieve it.

#9
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
I guess what I was thinking of was that there would be build spots and a player could click on it and select which building type to build at that spot. Then some time later, that building would appear. If you can't make spawned buildings look right, you'd have to go with the linear set of states. It would still be good for story advancement, but wouldn't give the player the feeling that they actually built anything. Instead it would feel like canned plot advancement.



Generally speaking, for a user module, If it is fun, no one will care if there are graphical issues.


#10
Niko Daemon

Niko Daemon
  • Members
  • 124 messages
An easy work-around would be to make a small 'area' that contains your variable content. Then make a transition to the area in your main module.



e.g., have a path to the building, set a transition in the path, use script to send characters to the new 'area' depending on what variables you select, then have the characters appear at the new area. You could even at an entry cutscene, to smooth the switch. When they exit, they use the return transition, and your module area will be unaffected.

#11
ModWriter

ModWriter
  • Members
  • 55 messages
Like the others said before and i did it in NWN too, you can only fake this. I have had 3 areas, 2 as copies. 1. original, 2. Burn down area, 3. rebuild area. But in NWN you have had a timeline and day-night-cycle, in DA:O you have to fake that too...

#12
BFBHLC

BFBHLC
  • Members
  • 373 messages

ModWriter wrote...

Like the others said before and i did it in NWN too, you can only fake this. I have had 3 areas, 2 as copies. 1. original, 2. Burn down area, 3. rebuild area. But in NWN you have had a timeline and day-night-cycle, in DA:O you have to fake that too...


Which renders a lot of things about this toolset obsolete. But we'll cross that bridge when we come to it.

#13
EdwinPF

EdwinPF
  • Members
  • 3 messages

ModWriter wrote...

Like the others said before and i did it in NWN too, you can only fake this. I have had 3 areas, 2 as copies. 1. original, 2. Burn down area, 3. rebuild area. But in NWN you have had a timeline and day-night-cycle, in DA:O you have to fake that too...


I used this for a module where;

1. Play started at a village where a baron was building a castle (AREA 1)

2. If Players stopped a plot to sabatoge the construction of a castle when they returned to the map of the village (after completing another quest in a distant land) a Castle (and its inhabitants) now stood - with new Quests and New NPCs - alongside it. (AREA 2)

3. IF players failed to stop the sabatoge and no castle arose in the village when they returned (after completing another quest in a distant land) they found the village partialy burned down and overrun by giant spiders and their Drow masters. (AREA 3)

#14
ModWriter

ModWriter
  • Members
  • 55 messages
@EdwinPF



yep, that way. I will miss the 'get year, month, hour,...' function. It will be more difficult for daily routine of the npc's...

#15
BFBHLC

BFBHLC
  • Members
  • 373 messages

ModWriter wrote...

@EdwinPF

yep, that way. I will miss the 'get year, month, hour,...' function. It will be more difficult for daily routine of the npc's...


Unless we use a script to change the skybox of the area. (sunrise, morning, afternoon, sunset, night) If not that, then we could just setup a variable checker on the area transition triggers to check for a variable on the PC.

Example : Player is in Town 1, Day. Player does some stuff, etc. then goes inside another building or something. Based off a timer/variable, when the player leaves the building they'd transition to Town 1, Night.

#16
FalloutBoy

FalloutBoy
  • Members
  • 580 messages

BFBHLC wrote...

ModWriter wrote...

@EdwinPF

yep, that way. I will miss the 'get year, month, hour,...' function. It will be more difficult for daily routine of the npc's...


Unless we use a script to change the skybox of the area. (sunrise, morning, afternoon, sunset, night) If not that, then we could just setup a variable checker on the area transition triggers to check for a variable on the PC.

Example : Player is in Town 1, Day. Player does some stuff, etc. then goes inside another building or something. Based off a timer/variable, when the player leaves the building they'd transition to Town 1, Night.


That's a very good idea. To take it even further, consider the game Dead Rising. Time passes normally and whenever it is time to switch between day and night, the game just fades out, plays a cutscene, and fades back in with the new area.

That game had static areas also, despite having a plot where areas change constantly. The only time anything in your current area could be changed was at a load screen. So the time-change transitions also served as a way to make sure the world could change over time, as the plot demanded. A player couldn't break the plot by just sitting in the same area and refusing to ever transition anywhere, because time would eventually force a load screen.

That was a brilliant game by the way.

#17
BFBHLC

BFBHLC
  • Members
  • 373 messages

ModWriter wrote...

That was a brilliant game by the way.


Ehh, it was alright at what it was meant to be... A zombie hack and slash on the console. :D

#18
johnbgardner

johnbgardner
  • Members
  • 185 messages

Adinos wrote...

It might be possible to get around some of the issues with shadows with a little layout trickery (basically preventing the player from getting to locations where the problematic shadows would be obvious).

However, if you need two versions of an area, with, say...a building in one, and a burnt'down version of that building in the other, it is better to just create two "almost identical" areas.

Still, what you are talking about should be doable - I haven't tried it, so I'm not sure how it will turn out, though.


This begs the question: Will you be able to "duplicate" an area in the toolset instead of recreating it, so that only the building/burnt-out building needs to be changed?

#19
Proleric

Proleric
  • Members
  • 2 350 messages

johnbgardner wrote... Will you be able to "duplicate" an area in the toolset instead of recreating it, so that only the building/burnt-out building needs to be changed?

Yes. You'd make a level for the initial state, then make the changes on a copy. Each version of the level would be associated with a different area. You'd probably use plot flags to determine which area to load, and any changes to dynamic objects required (e.g. an NPC has left the "initial" area, so they need to be removed from the "final" area, too).

Obviously, once the level has been copied, any further changes will involve rework on both copies of the level, so it pays to ensure that the original level is absolutely right first time.

Modifié par Proleric1, 02 novembre 2009 - 01:24 .


#20
ModWriter

ModWriter
  • Members
  • 55 messages

BFBHLC wrote...

Example : Player is in Town 1, Day. Player does some stuff, etc. then goes inside another building or something. Based off a timer/variable, when the player leaves the building they'd transition to Town 1, Night.


that should work.