Entry 62 with things that make mobs better

I guess it’s that time again — coding. Oh and I wish it was the exciting kind…

Leave as you entered

I hate to cheat, but… consider current keep implementation. Mobs (blue) spawn at a certain point on the map and then proceed to the target keep. They spawn at regular intervals and thus preserve the same distance between each other (green). The target keep assigns each mob a “keep spot”, where they will stand once they arrive (cyan). This is a per-designated circle around the keep to make it look pretty. Some time later the keep needs to send the mobs away for further attack. The problem is that the distance from the mob spots to the road obviously varies, whereas the attack frequency doesn’t. So mobs end up at different distances from each other (red). Here the image:

I hate to cheat, but… I have to. It’s a little too much to do a path-finding to the road to determine when to release the mob just so they group nicely. So instead I just teleport them to the keep exit, so they “spawn” roughly at the same spot. But now it’s all kinda crap. They arrive nicely, but leave messy. So might as well make them all arrive nicely. This also solves a couple other issues, like what happens when the keep runs out of spots for incoming mobs.

Well isn’t this exciting! </sarcasm> On the plus side, this means I could have custom spots on the keep itself, like guard units or something (since there isn’t a valid path “over” the keep). That would be pretty cool.

Welcome to the party

Everyone say “hi” to Blob and Delta:

Phil’s made two new mobs in Maya, and with some clever toon shading and UVing made them look almost not out of place. I guess it’s time I implement shadows for mobs to make them sit proper.

Button shadow

So here’s blobie with a button shadow:

You can actually now tell which frames are above or below ground, i.e. when he’s jumping. Comparing with the previous image you’d almost think how could we not have shadows before. Yep, the power of “small” things. Obviously, the button shadow itself is just a simple sprite:

I resize it based on mob (type) size, so different mobs get differently scaled shadows:

There are 2 alternatives for button shadows. One is that each mob type gets their own shadow, which is probably more work than it’s worth. The other is that each mobs’ each sprite (or at least each direction) get their own shadows, making them very realistic. Unfortunately, this is definitely more trouble than it’s worth. (And I won’t even mention shader based shadows or whatnot.) I think simple drop button shadow works pretty well.

This entry was posted in Uproot DevDiary.

Leave a Reply

Your email address will not be published. Required fields are marked *