• entries
    436
  • comments
    1179
  • views
    763029

Bridges

Sign in to follow this  
JTippetts

750 views

Spent a couple minutes today implementing constructable bridges:

h6wSgLM.png

Unfortunately, due to the way I handle units occupying hexes, the bridges are permanent. Only one combat-enabled or targetable entity can occupy a hex, meaning that I had to implement bridges as actual changes to the structure of the environment. I am thinking about revamping it so that I can make bridges destructible as a tactical option. That would require a fairly significant change to the underpinnings of the hex map, though, requiring me to enable more than one combat-enabled unit per hex. This could get hairy, given the fact that so many other systems (spell targeting, etc...) would be affected.

I've begun the long, and long-overdue, re-design of the level generation system. The way I have begun to envision the gameplay is that you proceed through a set of missions, joinable from the mission map. At any given time there will usually be a fair variety of missions available, and they come in various shapes and sizes. One mission might be an exploration mission, with a relatively large map and certain objectives that must be found to complete. Another might be to clear a beast den; this would be a fairly small map with thematic monster placement and a final "den alpha" end boss. Another might be a treasure mission, with a tiny map and a treasure to loot. Ideally, I would like a variety of mission sizes and lengths, in order to accommodate various playtimes. If you only have a few minutes, you might want to do a small exploration or boss-fight map. If you have hours, a big, meaty dungeon-delve might be the way to go. Rewards, of course, would be proportionate to the size of the mission.

Toward that end, I've ripped out all the hard-coded level generation and have begun to design the modular system for generating a map based on location, theme, size, environment, and type. I still don't have the mission map system finished, though, so selecting new missions is still only possible via the console, and there is none of the coherence between successive maps that I (hopefully) will have once it is complete.
Sign in to follow this  


5 Comments


Recommended Comments

Ferrous maybe having to think about checking how much health the bridge has as to if you should cross or even stand on it whilst fighting? You could with this weaken it get into battle and use the bridge as a death trap

Share this comment


Link to comment
Okay, so I went ahead and implemented basically what you guys are talking about. Rather than adding indirection (bridge knows about who is on top of it), I simply added an Aux ID field to the hex map, to store auxiliary objects. When targeting, the target query system will try to grab the normal ID first, and if none exists it will default to the Aux ID. This seems to work pretty much exactly as described: a bridge (implemented as an aux object) is targetable only if nothing is standing on top of it. Preliminary tests indicate it works as expected:

GC builds a bridge, hover targeting finds the bridge:
rt2l9Bh.jpg

GC stands on the bridge, hover targeting finds him instead of the bridge:
2CrwTPg.jpg

GC burns the bridge with a fireball:
VfMKmlG.jpg

I am sure I'll probably deal with the consequences of this change down the road. It was a subtle one, yet not insignificant in its reach. Still, it wasn't as difficult as I had anticipated, and it comes with the additional benefit of giving me an idea of how I can implement doors and gates. I can implement a door controller as an aux object that controls the door itself, via the use command. I'm working on a prototype right now.

Thanks for the ideas, guys. This is why I love gd.net.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now