—    —  Home

   JLJac on November 26, 2014, 12:47:40 AM:

Update 364
Messing around with glitchy lizard behaviors. Introduced a few countermeasures against different getting stuck scenarios, and they do seem a little bit less prone to end up wiggling in some corner. Still a lot of those to hunt down though.

When I made levels, I'd keep the lizard AI in the back of my head and adapt the layouts quite a lot to cater to lizards. James, who hasn't programmed the lizards, made a bunch of levels that were more free-form, and he naturally gravitated to adapting them for slugcat platforming rather than lizard movement. This meant that the lizards would oftentimes end up isolated in sub sections of the rooms, because the intended connection to get out of there was designed for slugcat jumping and not accessible to the lizards.

Yesterday we had a little talk about this issue, and decided to work on it from both ends. So James has been adapting the level layouts a bit, and I have been doing some additions to the lizards movement. Among those additions are a few new ways for lizards to move between tiles that are available to them. For example, earlier a lizard could stretch across from one tile it was allowed in to another, across a third empty but non-allowed tile. This was very blocky though, as it would only be allowed in perfectly vertical or horizontal cases. Today I added a connection that goes 2 tiles vertical and 1 tile horizontal, or vice versa (like the knight in chess). These kind of additions enable the lizards to traverse more different kinds of terrain, and opens up the maps to them.

With James' level design adaptions and these changes, I think the lizards are going to become quite mobile throughout the world. However, we noticed that the isolated lizards had some benefits as well, as they gave us more control over lizard encounters. So now we'll try to find the perfect balance between penned-in and free roaming lizards.





   JLJac on November 26, 2014, 05:03:40 AM:

Update 365
Not been many gifs lately, so here's a little bonus. After digging in the lizard AI all day I decided to do something more fun, and implemented this hanging animation for the lower end of vertical poles:






   jamesprimate on November 26, 2014, 09:55:39 AM:

Update 365
Not been many gifs lately, so here's a little bonus. After digging in the lizard AI all day I decided to do something more fun, and implemented this hanging animation for the lower end of vertical poles:



oh man i love this so much hahah

SOME NOTES FROM THE LEVEL GEOMETRY SLAVE-PITS:

doing this first batch / region of rooms has been a really interesting process! in the previous build, the game was pretty simple structure-wise: gameplay was limited to 1 room at a time. those rooms are either platforming rooms or swarm rooms where you hunt bats. lizards were placed in a room and would stay there, sort of like a hazard, or they would be in swarm rooms to chase you around.


(from lingo build)

but now the lizards (and everything else) can move freely between rooms, so choices have to be made in level design to either box them in to certain areas (to create "an encounter" scenario) or to just let them do their thing and run amok. there is definitely a discussion like  "whats the point of this open-world "terrarium" concept you've been working on if you just box them in?", but probably for the first region at least we want to have SOME semblance of a difficulty gradient! we have a bit of a halfway mark in this first region because the species of lizards you encounter there have somewhat limited movement compared to the ones encountered later on, some of which can climb on structures that arent even accessible to the slugcat, etc.

But still its pretty funny because if you change ONE tiny thing in a room geometry (extend a pole here, or switch the order of room exits, etc), suddenly lizards over-run a whole new territory that you hadn't predicted:


(new build 141125)

So you have to make a tiny little change, then play through the build a few times to get a sense of how they are reacting to that change, then repeat. over and over. lizard herding! they are stubborn and temperamental just like cats! if you build them some nice room to play in, instead they go climb your drapes, hahaha!





   JLJac on November 27, 2014, 03:17:51 AM:

Update 365
Item placement in the world... Made it so that the level editor saves item placements, and the game then puts the items in the level. The system isn't entirely done yet, as it can't differentiate between rocks and spears. What I have been able to finish is some re-working of the entity ID stuff. The reason this was needed was that for items, I wanted to be able to delete the item entirely, and re-create it, having the game still be aware that it's the same item.

My solution for this was to assign items ID's based in their placement in the world. So the item ID is just an integer that's 10 000 times the room index, plus the item placement in the room. I calculated that the 32 bit integer range should be larger than 10 000^2, meaning that the system would allow for ten thousand rooms with ten thousand items in each without mixing them up. Am I correct?

Then the ID also has the old system running in separate, which just ticks up as new objects are instantiated, and for an ID comparison to return true both the "original spawn location number" and the "ticking upwards number" have to match, meaning that the game can't mistake some spear for some bat or something because of random chance.

Ok, so why create this elaborate system? The idea is that now I don't have to save the position of every rock and spear in the entire world, I can just save the fact that they're moved when they're moved. The system works like this~

As a room is realized, it goes by all the rocks and spears that are supposedly in that room. It creates an instance for each of them, giving that instance an ID based on the spawn position. Then it adds them all to a global Misplaced Items list.

When the room is again abstracted, it checks all the items in the room - from the item's ID it can calculate the item's supposed spawn position. If the item is on its spawn position, the item is removed from the Misplaced Items list, and then the instance is removed as well. But say one item has moved, a spear picked up by the player. As that one isn't on its correct spot, it will remain on the Misplaced Items list. The room is then unloaded.

Later the same room is loaded again. As it goes by the items that should spawn in the room, it checks the missing items list for each one of them. The spear is on there! So the spear is not placed in the room. Instead, the game is keeping track of the spear somewhere else.

There's one of each item, and only one, but always one! At least that's the idea, after all the bugs have been squashed. The cool thing is that as the random seed for the items' look is based on the ID, the same item will always look the same.

Other than that, I've done a little bit more of lizard behavior cleanup. It really gets to me not being able to save and load the state of a lizard. Whenever they do some buggy behavior, I have to guess what they're doing, and then guess the solution, and then hope that whatever I did actually solved it. In the lingo environment (which was worse in every other way, but this one thing was cool) I could save every variable in a lizard object to a text file, meaning that when I saw a lizard doing something stupid I could hit a button to save that stupidity, and then have that little moment captured. I could then load it and diagnose it, and mess with it until it worked again. Really nice!

I know that in theory I could do that here too, if I made the lizard class serializable. Problem is that last time I tried serialization, every object that was referenced by the serialized object also had to be serializable. And my game is super interconnected, so I see no way of accomplishing that without making exactly everything serializable, and just save the entire game state.

Maybe that's a good idea? Is that how quick save works? Is there some quick way of trying that out, that doesn't mean pasting [Serializable] in every single class?





   JLJac on December 01, 2014, 12:48:49 AM:

The difficulty of distinction between rock and spear makes me interested in the underlying system, code-wise.
As they share basically all behavior, except from some getting stuck stuff with spears, I didn't bother with any inheritance or stuff like that, but just made them have a parameter deciding which one they are.

Your text editor doesn't do multi-file search/replace?

Also it looks like C# has a [NonSerializable] attribute, so you could mark only a couple of fields serializable, and expand it later...?
Hm... you mean I should search for "public class " and replace it with "[Serializable] public class " everywhere? Seems a bit risky, but if I do a backup of my project first it might be worth a try!

Update 366
Got rid of a weird bug where a lizard would get stuck on top of something, typically like a box, and never jump down. The code was meant to make it so that they shouldn't jump off ledges to places from where they wouldn't be able to get back to their den - but they should only be concerned about getting back to where they are if there's actually a den where they are, the barren top side of a box should be left behind without second though. It seems to have worked out, now they don't hesitate to jump down and continue hunting you.

Also did some work on their behavior in relationship to going into their dens as rain approaches. Basically what happened was that they have a simple AI for when they're abstracted, and a complex one for when they're realized in the room - these two would disagree some times. The "actual" AI would tell the lizard to go home to its hole, but once there the abstract AI would spit it out in the world again, and so it would continue. My solution was making it so that the abstract AI asks if there is a realized AI at play, and in that case outsources the decision to it. Only if the creature is fully abstract the abstract AI makes the decision itself. It seems to work, but I haven't done enough observation to know 100% just yet.

Oh, and the stunned face/dead face are back in:








   JLJac on December 02, 2014, 05:10:50 AM:

Update 367
Remember the bat chains? They're working their way back.



A tad too elastic-looking, probably? Will need some tweaking.





   jamesprimate on December 02, 2014, 09:53:48 AM:

Update 367
Remember the bat chains? They're working their way back.



A tad too elastic-looking, probably? Will need some tweaking.

looks great! i dont mind the elastic quality at all. LOVE the ceiling to pole chain transfer though! WOW





   JLJac on December 03, 2014, 12:18:24 AM:

Update 368

The little blinking number is back:



Together with a whole bunch of other stuff. We're working on a somewhat playable alpha, so I got some introduction screens in, as well as the game recognizing when you've died, displaying a message and restarting if you hit enter. There's also a win condition that's as simple as can be - return to the starting room with a certain number of flies eaten.

Also, flies + rock/spear collision finally in, that was a long time coming! Still don't have it so they can be impaled on the spear, but there are so many little details like that so it doesn't really feel smart to get caught up in them. Game relevant mechanics first, then details.






   JLJac on December 04, 2014, 03:08:49 AM:

Update 369
Messing about with the lizards for most of the day, just trying some stuff and fixing little details. Then I moved on to drawing some sketches of a new creature (!) but I still don't feel ready to start implementing it. However, I do feel ready to start implementing leeches in the water, because I basically know what I want them to be like - so I got started on that. No gifs yet as they still just look like red swimming boxes, but maybe tomorrow I'll have something fun to show you Smiley

The next area James is moving on to is one with some water stuff going on, so I might do a few water related things now for a couple of days to give him the tools to play with that.





   JLJac on December 04, 2014, 07:47:48 PM:

Yeah, the idea of leeches came up when James and I discussed the implications of the recently added water. We really liked swimming around, but we wanted the water to be an exception from ordinary gameplay - we didn't want the game to become a Swimming Game. So we decided to add some creature that is in most of the water, and makes it a bit uncomfortable and dangerous to be there.

Update 370

Swimming just became a whole lot less comfortable  Shocked



I originally planned to make them more as a fish/leech hybrid, with a bit of a head, but when I got the triangle mesh for the body in I liked the leechy softness of it so much that I went with a more conventional leech. Too boring? I could spice them up a bit with some more alien element as well.

They're not entirely done, but pretty much so. I want to have them crawl along floors if they end up out of the water, and they should air-drown after a little while as well. Also they need to respond to the rain cycle, and they need to forget targets that have been out of the water for a little while. They should also probably give up on a target that has been dead and leeched for a while, or one single dead creature will make an entire body of water safe for ever.

Aaaand the big, boring thing - I need to write some kind of framework for "a thing being stuck to another thing" in order to have these leeches follow you between rooms. That same framework would then be applied to make bats stick on spears, and then it'd probably make sense to throw out the old "spear stuck in creature" hack and use this new thing instead.

I thought I could make a special case for only spears, but I've come to realize that the game has quite a lot of things being stuck on other things, so the engine probably needs to be able to handle that.

Back to the leeches - they don't actually hurt you themselves, they just weight you down. If enough of them attach you'll drown. On one hand I like this, because it creates a very visual "health" system where you can see how many of them are attached - 4 or 5 is usually enough to do you in. Once you get out of the water your "health" is reset by the leeches detaching themselves. The problem with this system is that 1 or 2 can never be an actual threat, only an annoyance as they impede your movement a bit.

Maybe that's not too big of a problem though. Especially as I imagine a situation with 1 or 2 of them as being pretty rare, in most cases I imagine a body of water as either having leeches or not, and if it has them they'll appear in schools of 10-20 or the like.

Catch ya later, I'm off to feed some lizards to the leeches  Evil





   JLJac on December 05, 2014, 02:07:54 AM:

Update 371



Leech land behavior is in now, though very simple. This creature really has no AI, it just works on some very simple rules and has some swarming behavior going on. On land it moves either left or right, hoping to fall back in the water. If it hits a wall it'll reverse its direction. After a while it'll dry out and die.

In the gif you can kind of see how I'm having trouble getting out of the water. This is the main danger of the leeches, they'll weight you down. The effect gets a bit of a bonus in water, but is also present when you've gotten out - jumps are a little weaker, you glide down poles, etc.





   JLJac on December 05, 2014, 02:36:08 AM (Last Edit: December 05, 2014, 02:48:53 AM):

That sounds like a good setup!

Hahahaha yeah, the bats sometimes play at the water surface, and several times I've seen the leeches get them  Cheesy
It's really funny, because the bat will try to fly a little bit but the leech is way too heavy. I should probably add a weak "afraid" relationship between then bat and leech.

Edit: Gif! Added the little afraid relationship, as you can see by the first bat which almost gets caught and then freaks out and gets out of there.





   jamesprimate on December 05, 2014, 03:05:05 AM:

OH MY GOD. leeches eating bats. this is amazing.





   JLJac on December 08, 2014, 03:20:04 AM:

Thanks Smiley

Update 372

Waterfalls! Note, work in progress ~ I could still be happier with how it looks under the water line. Things are becoming tricky, as I have like 4 different shaders colliding and overlapping here. The dark bubbles under the surface would be a lighter color if I could choose freely, but I have to draw them in the default sprite layer, and then they'll also get the default underwater color. I'll try to mess around with it some more in the future, but this seems good enough as a place holder to get James started with the new watery area.



The left one is a standard waterfall, as I imagine most of them will look. The right one is a weaker one that's a bit broken up, I want this for cosmetic purposes. The standard one looks very square, so the weaker one can be used to make a room look more alive. Both of them could use some more work though! Let me know if you have any tips Smiley

Right now the waterfall affects you while you're in the water - if you're close to the surface it'll pull you in and push you down, further down it will push you down and away. Above water it's purely cosmetic, you don't collide with it but move "in front of it". I'm contemplating making it so that the waterfall hits creatures above water as well, and pushes them down. There are a few things to consider here though. First of all, could I make the creature/water interaction look good enough to be happy with it? It'd want some kind of water splatter, and that seems very difficult to implement in a way that looks good. Also the waterfall should probably be affected somehow. This could probably be accomplished by breaking the sprite up in two where the creature breaks the waterfall, and use the weak shader (right in the images above) below that point. But there are also gameplay implications. Waterfalls generally cut rooms up horizontally, and if they are (somewhat) an obstacle, rooms might feel claustrophobic as you'll find yourself locked into little cells without freedom of movement. This might be okay for the player, but lighter creatures such as bats will get pushed around more by the waterfalls, and be even more limited as a consequence. Bat movement might be incredibly limited if the room is cut up by vertical barriers that the player can move through but the bats can't. So, still thinking about that one. Will consult with James and get back!

In shader news, you might notice a some water glimmer on the walls. Adds some atmosphere according to me! I'm really going crazy with the shaders here, but this one is actually not baked into the main shader, it's just a sprite that's placed on top of everything. So some graphics options can easily be implemented where that sprite is simply not created, and the GPU can be spared some pain and suffering. The effect is not for an entire room, but only above water surfaces and extending a few hundred pixels upwards.

And yeah, I made the leeches red!



An artistic decision I guess. Almost every creature is black already, and it felt nice to spice the leeches up a bit. I really like the contrast between the red leeches and this green water here - it feels a bit more fun and unexpected than just black. Also, the leeches spend most of their time deep under water, where you won't see their color, so it becomes a bit of a surprise when they get closer to the surface.

When they're out of the water for a while they slowly turn black before dying of dehydration.

We were talking about perhaps having both black leeches and red leeches, and giving them slightly different properties, and that's not entirely out of the question, but probably a later issue.





   JLJac on December 08, 2014, 04:34:53 PM:

Hm, well, rather the opposite in that case. When the cycle starts all the rain water would be draining away, so then you'd see a lot of running water, but later it'd be less and less during the dry spell. This would require the waterfalls to be no-collision though, as we took the decision to have static terrain a couple of months ago when the AI started using pre baked map data.

Bringing the update to the next page.

Thanks Smiley

Update 372

Waterfalls! Note, work in progress ~ I could still be happier with how it looks under the water line. Things are becoming tricky, as I have like 4 different shaders colliding and overlapping here. The dark bubbles under the surface would be a lighter color if I could choose freely, but I have to draw them in the default sprite layer, and then they'll also get the default underwater color. I'll try to mess around with it some more in the future, but this seems good enough as a place holder to get James started with the new watery area.



The left one is a standard waterfall, as I imagine most of them will look. The right one is a weaker one that's a bit broken up, I want this for cosmetic purposes. The standard one looks very square, so the weaker one can be used to make a room look more alive. Both of them could use some more work though! Let me know if you have any tips Smiley

Right now the waterfall affects you while you're in the water - if you're close to the surface it'll pull you in and push you down, further down it will push you down and away. Above water it's purely cosmetic, you don't collide with it but move "in front of it". I'm contemplating making it so that the waterfall hits creatures above water as well, and pushes them down. There are a few things to consider here though. First of all, could I make the creature/water interaction look good enough to be happy with it? It'd want some kind of water splatter, and that seems very difficult to implement in a way that looks good. Also the waterfall should probably be affected somehow. This could probably be accomplished by breaking the sprite up in two where the creature breaks the waterfall, and use the weak shader (right in the images above) below that point. But there are also gameplay implications. Waterfalls generally cut rooms up horizontally, and if they are (somewhat) an obstacle, rooms might feel claustrophobic as you'll find yourself locked into little cells without freedom of movement. This might be okay for the player, but lighter creatures such as bats will get pushed around more by the waterfalls, and be even more limited as a consequence. Bat movement might be incredibly limited if the room is cut up by vertical barriers that the player can move through but the bats can't. So, still thinking about that one. Will consult with James and get back!

In shader news, you might notice a some water glimmer on the walls. Adds some atmosphere according to me! I'm really going crazy with the shaders here, but this one is actually not baked into the main shader, it's just a sprite that's placed on top of everything. So some graphics options can easily be implemented where that sprite is simply not created, and the GPU can be spared some pain and suffering. The effect is not for an entire room, but only above water surfaces and extending a few hundred pixels upwards.

And yeah, I made the leeches red!



An artistic decision I guess. Almost every creature is black already, and it felt nice to spice the leeches up a bit. I really like the contrast between the red leeches and this green water here - it feels a bit more fun and unexpected than just black. Also, the leeches spend most of their time deep under water, where you won't see their color, so it becomes a bit of a surprise when they get closer to the surface.

When they're out of the water for a while they slowly turn black before dying of dehydration.

We were talking about perhaps having both black leeches and red leeches, and giving them slightly different properties, and that's not entirely out of the question, but probably a later issue.





   JLJac on December 09, 2014, 12:25:31 AM:

Update 373

Making tiles for the new region. It's very time consuming, because of of the several layers of each tile.





   jamesprimate on December 09, 2014, 12:46:59 AM:

Update 373

Making tiles for the new region. It's very time consuming


SOOORRRRRYYYYYYYYYY





   jamesprimate on December 09, 2014, 02:15:33 PM:

CHRIS!

You've been doing hard work and we appreciate it man  Toast Right





   jamesprimate on December 10, 2014, 02:51:58 AM (Last Edit: December 10, 2014, 03:06:07 AM):

Little update: bad week edition

Had some minor disasters hit the rain world team the past few days. Joar is out sick, so he's taking some time off, and I got a little taste of rain world in real life with... my apartment flooding Cry Yikes! All is well now, but things may be a little slow this week

So anyway, in the mean time let me go into what I've been up to with the levels and world design. We've made some solid progress into the second region of Rain World, "Drainage System", which as the name implies is a kind of pervasive sewer that spans the near-surface subterranean and connects a few key regions. It is huge rusted pipes, aqueducts and contained water elements, etc., to creep and crawl through.


(Larger: https://i.imgur.com/iJ1i7MC.png)

We've been spending some time getting the mood right, showcasing Joar's work with the water physics, ambient water lighting, the new waterfall element, etc., and i think it has paid off hugely, producing a really distinct vibe


(Larger: https://i.imgur.com/Y8rQ4JO.png)

and then of course we infest the area with nasty leeches!


(Larger: https://i.imgur.com/2phC9zC.png)

Lizards will also be in this area, but probably confined to the parts closest to the surface, as they are afraid of water. (with very good reason  Evil)

Heroically, even after getting sick Joar was able to send me a new tileset for larger "inside pipe" environments, so I'll be experimenting with them the next few days. This is the principle area that will have "water surrounded by tiles", so Im trying to make the most of it!

edit: after posting one of the screenshots and then previewing the post, i noticed a tiling goof and corrected it. so thanks???





   jamesprimate on December 10, 2014, 03:29:23 AM:

no way man, thats gross