—    —  Home

   JLJac on November 08, 2013, 09:58:58 AM:

That's actually both awesome and easy to do! Might give that a go Smiley

Update 196
I'm at crossroads again. Have I been talking about how I feel about single player, with it being a bit goalless and all? In case I haven't, quick recap:
(For those of you who know the basic premise of the game, jump to "jump to here" further down")

Rain World is set in a rainy place, where the rain is intense enough to kill a creature. Whenever the rain stops, for just a minute, creatures emerge from hiding to hunt for food. You are one of these creatures.

Single player is about surviving a certain amount of days (might be called "the rainy season", but might also not. I haven't decided on if every season in rain world is rainy season, or if it gets extra bad a few months). The catch is that most days it's raining, so when there's a hiatus in the rain you have to go out and catch enough flies to survive in hibernation until the next dry spell. This has been simplified to the creature digesting exactly one fly per day. So, if there are five days of rain ahead, you need to catch five flies.

Then there's another factor - you can't hunt in the same place twice. Next time the flies will not be there. So you have to go further and further from the shelter to hunt.

The amount of extra flies you catch, on top of the ones necessary to survive, is your high score.

JUMP TO HERE.

I like this game set up, because it has an element of old school infinite games like Pac-Man. It's a story in itself, you're introduced to a world and you'll just have to try to survive. The story isn't stitched on, it's in the game, self-contained. Problem is, Pac-Man, Snake and the like are infinite games, where you are destined to fail and it's just a question of how many points you can get before that.

For Rain World I want to have some sort of winning condition, mostly because it has metroidvania elements and a game session is much longer than in Snake. In Snake it's OK that you die, but imagine having an rpg where your chararcter will die... I guess we all know that everyone dies eventually, but if you've spent some time with a game character you feel good to have a story ending where the character survives to die another day when you aren't watching.

These two things make Rain World single player a bit of an awkward hybrid. It's a simple-goal game like pac-man or snake. "Survive! It will get harder and harder," is that simple goal. At the same time it has an ending. We are used to endings as devices to frame narratives, but here we only have a gaping lack of such a narrative. There's no personal development or anything, just survival for an arbitrary amount of days and then a lame "congrats!" screen.

I have been thinking about what sort of narrative I could insert into Rain World, without breaking the things I do like about it. A while ago I had a conversation with James, and he gave one specific type of narrative a name: "Silver lizard stole your girlfriend"-narrative. Rain World should NOT have a "Silver lizard stole your girlfriend"-narrative. Everything about it is wrong. I think what bugs me the most is the anthropomorphization of the bear creatures. Waaaay to many human qualities implied. Girlfriends. Individual villains. Revenge motifs. The bear creatures actually have very few human qualities. They obviously utilize simple tools, but they don't seem to be able to manufacture them, and there's no indication that they have a language.

"Silver lizard stole your girlfriend"-narratives also have another problem, that they're linear in just the same way as every other game out there. That's not very interesting. We've all defeated enough girlfriend-stealing last bosses, who are evil for no reason or for bad reasons.

Rain World is not about those kind of stories. Rain World is about survival, in a nature-like setting. The world is harsh and dangerous, but there's no evil or sadism. No-one want to steal girlfriends. Everyone just want to eat. There are no opposing wills or political clashes, just the harsh conflict of who gets to eat tonight.

When the "Silver lizard stole your girlfriend"-narratives were dismissed, I had another idea. This one would be that the environments would tell a story of the past of the place. This could potentially be cool, though a bit disconnected from gameplay. It would be like playing the game, and have a parallel and optional little story going on at the side.

Problem here is that this would, once again, go against the core of the game. The core of the game is that you're an animal trying to survive.

I'm interested in the industrial environments of rain world, obviously. I spend quite a lot of time creating them. There's a reason why I didn't just have the game be about wild animals in a tropical jungle (though there are references to that setting - for example the levels set high up among the chimneys are called "canopy area" in my dev documents. I'm also pretty sure that the original biome of the place, before becoming an industrial area, had rain forest characteristics). But would they be enough to tell a story? Perhaps not. And most importantly, that would be the story of someone else, of those who built the place. For some reason, if there's anyone in Rain World I'm not very interested in, it would be those forerunners. They came, built their industries (changed some life forms?) and now they're not around any more for whatever reason. Probably economic reasons. There's no interesting apocalypse that we are post- , and Rain World is about the now, not the past.

The environments are industrial because I'm fascinated by the idea that animals interact with artificial environments. I'm interested in how those environments are perceived by animals. I'm almost 100% sure that animals don't ponder too much about who built what and why. So if my goal is to re-create the experience of being an animal in an industrial landscape, past mysteries are not the way to go.

So that brings us to my current idea for a story. The story is extremely simple, but as of now I like it.

There are a few shelters around the map. In one shelter, you find three pups. Their mother has not been able to make it back with food, or at all for that matter. Now you can choose to take care of them. It's not a menu choice in a dialogue box or anything, it's just a question of giving them some food or not.

They are a burden. They eat,sometimes you have to move them to another shelter, and then they're in danger and you have to lure lizards the other way etc etc. Maybe the amount of food you have puts you in a situation where you have to choose between giving all of them too little food, or give enough food to only one.

If the pups die, they die. It's up to you whether you want to load your last save. It's always a possibility to abandon them all together.

This means that there is a story, with narrative, but it's not stitched on, it's all in-engine. No events are scripted. Also, the entire story is optional. If it's too hard, you can just skip it. Maybe save it for your next play through.



What are your opinions?





   JLJac on November 08, 2013, 10:43:39 PM:

It will be an optional main mission, so to speak. The "main story" is just about surviving, so I guess it would technically be a side mission, but it would be the only side mission.

Update 197
Started working on the pup object. I'm basing it on the player object. This happened:



 Who, Me?





   JLJac on November 09, 2013, 01:02:04 PM:

@Slader, yeah they can certainly starve - that's the main problem. I think they will also have a bit of different personalities among the three of them (and slightly different colors to set them apart). One thing I have planned that might be interesting is that one of them is extra bad. Either it's just not very good at surviving, or it has a wounded leg or something. That would really put you in some difficult moral dilemmas.

@Artemi, I think that as the game is now, trying to stay alive yourself is plenty enough reason not to save the pups. The game is haaaaaard. You don't at all need any extra handicap, even without worrying about anyone but myself even I have trouble in single player, and I don't even want to think about what it has to be like for a beginner.

@Christian, damn, stop pleading to pay me money... The temptation... Actually I'm in a pretty bad place economically right now, but hopefully that won't affect rain world too much. It does however affect how sensitive I am to temptation like that...

I want the game to be free because I remember being in my lower teens, and loving little downloadable games, and exclusively playing ones that were free. I liked it when they were free. It's another kind of atmosphere around a game that's free.

Also, if I charge people, there are expectations to meet. Fact is, I have no idea how I would put together a mac build, I have a super low-fi 2D game that runs super slow on any PC that is not very powerful, etc etc. That stuff won't fly if I charge people.

What I could do, is I could take donations. I could do it through kickstarter, perhaps. I work as a freelance graphic designer, and one idea is that people who are enthusiastic about rain world could donate some money, and effectively buy hours from me. So, I work on the game like I normally do, but if people put in some money I can work some extra, because I don't have to work on my actual work. Would anyone be interested in anything like that?

Drop a post if you'd donate something small.

Update 198
Started on (and almost finished)the first milestone in the AI of the pups - the terrain mapping. That's basically an algorithm that goes through the level and marks tiles as walkable, creates connections between them etc. For example, you might see little red arrows at the ledges. Those are "ledge drop connection", that flag that from this tile you can drop down to the floor below.



There are other connections except from ledge drops, there are jump-and-grab, short cuts, etc. They are sorted into incoming and outgoing categories. So, for example, a tile from which you can drop to the floor below has an outgoing ledge drop connection. The tile below has an incoming ledge drop connection.

This is because the A* path finding will work backwards, from the goal to the start. That works better for some scenarios, because then you can abandon a path finding session part-through, and keep all the direction flags in the tiles. This means that a creature that doesn't have a fresh path will follow an old trace in the level, meaning that it will be headed to wherever it was headed last time it passed by those specific tiles. The alternative would be that creatures without fresh paths would head towards where they were standing last time the path finding algorithm passed over these tiles which makes less sense. Not a big problem though, as most of the times they have decently fresh path to follow.

So, the path finding fill will start at the goal, and crawl outward looking for connections. Maybe it crawls across a floor, and comes across an incoming ledge drop connection. This means that you can drop to this tile from above. Then it goes to the ledge that connection refers to, and continues to crawl from there. Then, perhaps, it runs into the creature pathing - and the path is finished. The pathing creature will now follow the path, to the ledge, find the ledge drop connection, jump down, and proceed to the goal.

Basically it will work like the lizards already do, but simpler since I don't have the horror of not being able to turn around in a corridor to worry about.





   JLJac on November 10, 2013, 01:51:49 AM:

What would be in it for the sponsor? I won't add dr. pepper power ups to the game hehe... Art grant is a really good idea actually! I should look into it.

Update 199
The second big mile stone of pup path finding done. Now it actually finds paths! I can click the mouse somewhere on the map, and it'll look for a path from that place to wherever the pup is at the time.

Pups probably have the most limited movement of all creatures in the game. They can run, climb, and perhaps jump a little, but they can't reach a ledge that's two tiles high. This is because I plan to make the player able to pick them up - they'll follow you, but some times you have to help them across some obstacles.

This means that their pathing map is a bunch of scattered islands that are not connected. For example, they might be able to move around on top of a specific platform, but not able to jump to the next platform.

So what behavior should they have when they're trying to reach the player, and the player is out of reach to them? It would be stupid if they did what lizards do in the same situation, which is basically "screw it, I can't get there so I won't even try".

Say that you're up on a high platform, and you call the pup to come to you (more on communication with pups in later posts). There is a path from the pup's location that's unbroken almost all the way to where you're at. But before reaching you there's a big jump or something, that the pup can't do by itself but needs some help with.

In this situation it would be very stupid for the pup to just shrug and stay put. Frustrating for you, too. Instead, you want it to move to a position where you can help it. In this case, you'd want it to move all the way up to that last obstacle, and then wait on the other side of it for you to come and get it.

The solution I have for this is that when the pup path finding crawls outward, it is not restricted to tiles that are walkable for the pup, but it always prioritizes walkable tiles. So, in the above example, the pathfinding will start at the player location (remember, I work from the goal to the start) and quickly flood the platform the player is standing on. Once the entire platform is examined, and the pup has still not been reached, it'll resort to flooding into un-walkable air tiles. After a few tiles of moving through the air, it'll connect to the walkable tiles on the other side of the gap. Once it has walkable tiles, it will always choose to explore those rather than un-walkable. So, it'll flood the walkable tiles, and reach the pup.

The pup will then have a path, though not a path that it can actually follow all the way. But, it will be the path were it gets as closely as possible to where it wants to go, with the least amount of help.  It'll run along this path until it reaches the point where it can't proceed, and then wait. Unless the situation changes while it's running, which is pretty likely to happen with the player running around and all.

One frustrating situation that might occur is that the pup finds a path that leads to where you are, but that path takes it on a safari around the entire lizard-infested level. Like, you and the pup are standing next to each other, and you jump up the tiniest little ledge. Suddenly the pup decides that it can get to you through this huge detour, and you actually just wanted it to stay put. I don't have an immediate solution for this, but I can think of a few things. One would be that it simply doesn't bother to path to you unless you are a certain distance away.

The next step in the pup pathfinding development will be to make it actually follow the paths. That one also includes a lot of engineering of its movements, so that'll be interesting.





   JLJac on November 11, 2013, 01:10:45 PM:

Thanks guys!
So, when you back a game on kickstarter, is it about the things you get from doing that, or is it about bringing the game into existence? If, for example, I were to kickstart it to support myself during development, and then release it for free when I got done, would that be a good deal? Or would you think "But I payed! Why is everyone else who didn't pay also rewarded?!"

The way I understand it to work in most cases is like what Johnki mentions, you kickstart it and thereby pre-book it, some times with early access. If I were to kickstart something that would later be released for free, it would be the exact same situation for those who pay, with the difference that you don't get any special privilege for paying - you could as well just wait and hope for other people to pay. Would that be a huge turn off? What about donators getting the game a little bit earlier than the rest of the people? Would that work? I'm kickstarter illiterate, so I'd be happy if anyone with a little more knowledge of the psychology behind it could tell me what's up  Smiley

Update 200
200! Woooo!
About halway through making the pup follow the paths the pathfinder finds. The code for just going to the next tile and the next tile is done, but what's lacking is some specific movements, such as jumping up and grabbing a horizontal beam etc. Those actions have to be programmed event-by-event, and they have to be able to interrupt at any point without something too bad happening. The environment is unreliable, and sometimes another creature will push the pup mid-action, in which case it needs to be able to pulling itself together and start acting accordingly to its new situation.

For example, the "jump up and grab" animation is done in two steps - but it's not as simple as an animation. If everything was just some kind of linear animation, weird things like being pushed and pulled in different directions wouldn't be accounted for. Then it could end up stuck somewhere, because the AI can't think about anything else but "I should have grabbed on to that beam by now! Where is the beam??" That would be a bad hopeless situation. Rather, the pup has to position itself on the tile, and decide that "now I will do the jump and grab thing". Then it has to jump - and not forget what it was doing. It knows what tile it's going to jump to, keeping that in mind too. During the jump it'll check if it's in the right tile, if so, it'll go into the "grabbing" mode, and the animation is over.

But, it doesn't know when that's going to happen, or even if it's going to happen. It's not counting frames. When it jumps, that's a leap of faith. It could be 4 frames until safely grabbing the thing, or it could end up not happening. It's an adventure, baby.

If something weird happens, it'll end up in another tile, and ask the pathfinding what to do. As soon as it gets a clue, it'll start moving according to the new situation.

Dynamic AI like this is an asset to rain world, because it allows for a lot of fun interaction. The lizards already use similar stuff. For example, all the creatures in the game (except the flies) collide with one another, which enables stuff like lizards pushing at each other as they're both hurrying to get into the same small opening. And things like one lizard throwing out its long sticky tongue against the player, but missing and latching on to another lizard instead, pulling it in some weird direction. For stuff like that the AI has to be able to re-consider its situation dynamically. Hopefully the pup will tie in nicely with those Interactions.





   JLJac on November 12, 2013, 11:52:35 AM:

From you guys it sounds hopeful! Maybe donators could get the game two weeks in advance or something, as a gesture of gratitude. Or the impossible-to-use level editor could be included for them. Early access is another idea - then they could double as beta testers. Thing is though, I don't really want to beta test etc, I want to release and move on. But James has recently been trying to convince me that the game could be bigger, better, and maybe we should pursue that. The pups certainly are an epic feature creep.

I imagine a patron/sponsor relationship could work like in the art world. You find someone enthusiastic about games and culture, and (like an arts grant) you ask them for money to make your game. I think Jason Rohrer used to have a patron, but it's definitely not wide-spread.
This would be a perfect situation, but I don't really know if there are people interested in games like that. My prejudice is that the kind of eccentric old rich people I imagine doing something like this aren't all too interested in the indie game scene.

~$10k is about the amount of money I spend in... two life times, so if I could raise an amount like that I think that would be plenty enough to finish rain world and take me a healthy chunk into the next project. But, I might be optimistic.

Update 201
More pups following paths. Made a little "training level" with a lot of difficult situations (poles sticking out of slopes etc) and have just been having the pup run around chasing the mouse pointer - whenever it encounters a situation it can't handle I try to come up with a solution.

For most situations the AI actually looks at neighboring tiles and then emulate input, and then the input controls the pup through the remains of the original player code that are still hanging around. I can hijack this input and play the pup with the keyboard as well, for debugging. In some situations though, this doesn't really work. Either because the situation is too fiddly, with a lot of small, well coordinated movements, or because it's a situation that isn't possible to deal with given the pup's limited repertoire of movements. For example, while the player is able to balance on top of a horizontal pole, the pup is only able to hang below it. In some situation the pup isn't supposed to be able to go where the player goes (see previous posts), but in some situations it's just too annoying. For example if a horizontal pole connects with a platform just one single tile below the edge, it doesn't feel reasonable that the creature isn't able to climb that tiny distance to get up there.

For situations like this I've created something that's called "magic movement" in the code, which is basically a cop-out when I don't know how to make something happen by simulating input. When entering "magic movement" mode it designates a position it wants to end up in, and what mode it should enter when it gets there (modes are thing such as "standing", "crawling", "climbing" etc). Then it just kind of floats to the desired location, at an even speed, with the force of gravity severely reduced.

This might sound like it looks bad, but remember it's just a question of moving one single tile. For a distance like this it could just snap into its new position and you'd still be able to keep track of it, but I prefer to have this <1 second cosmetic little movement going on. It's very useful for situations when I'm not exactly sure of what to do to get the pup into the right position.

Once the movement is somewhat done, I'll work on the "puppet" of sprites that's rendered on top of the pup. Right now it's basically just the player graphics code, but with a smaller body, making it look like an adult bear creature with some horrible disfiguration. When I have some new spriting code I'll upload a gif of the pup moving around.

PS: working with the pup is fun, because I copied the code from the player and have seen some oooooold stuff that I had almost forgotten commented out in there. Like, today I found this piece that made the player able to fly, back from when he was a bird Cheesy RW has come a long way!





   jamesprimate on November 12, 2013, 09:45:13 PM:

I want pup plushies.

this is being looked into!  Gomez





   jamesprimate on November 20, 2013, 08:56:00 AM:

so since i have some time and there is cool new content worth showing off, im going to have a go at re-doing this trailer.



armed with some new hardware and video stuff, hopefully the framerate will suck a bit less.

other than that, was it effective? anything else that you wanted to see more of?



also
The obvious idea to me is to have them be the other three colors for the multiplayer bears. A) so you don't have to have a brand new color set for them, and B) when you get to multiplayer you get the idea that 'hey! I SAVED you guys, and now your all grown up!'

I love this idea.






   JLJac on November 20, 2013, 09:50:51 AM:

Go James! :D

Something to note, for the pups, what colors are they? The obvious idea to me is to have them be the other three colors for the multiplayer bears. A) so you don't have to have a brand new color set for them, and B) when you get to multiplayer you get the idea that 'hey! I SAVED you guys, and now your all grown up!'
Hand Thumbs Up Left

Update 202
I have nothing to say in my defense concerning why I haven't been writing updates, except perhaps that it has not been very visual stuff and would become walls of text. Like that ever held me back in the past.

I have, however, been working on the game! More or less the entire pup creature is built now, but it still doesn't have a lot of interactions. It moves around somewhat intelligently, and can do a lot of tricks like jumping and climbing and crawling in order to get from one place to another.

It also has a mad complex brain, which is still not entirely finished, but is pretty sweet. This brain works like the lizard's brain, but this second time around I was more orderly about it. What's basically going on is that it has a mental record of where it believes all other creatures to be. When they see another creature, this "brain ghost" is updated to the position of that creature. When it doesn't see the creature, the brain ghost goes on for a bit, simulating basic movement such as turning in corridors etc.

This means that if it sees you go into an opening, and then you're out of sight, it will follow through that opening. Seeing the room on the other side, it will assume that you probably went straight forward to the opening on the other side of the room. In reality you might have taken a turn to the left or something. This means that they can be annoyingly confused sometimes if you hurry too much and outrun them, but that's kind of cute as well Smiley They do this for all other creatures, including lizards and each other.

If they can see the place where they thought you were, but you aren't there, they'll go looking at the place where they last saw you, as a last resort. Then they'll tag you as "don't know where this entity is" and will maybe look around for you for a little bit, or go hang out with one of their siblings whose position they are aware of.

They have a kind of complex pack behavior, where they prioritize what to do, like such (if I remember correctly)

 1 - follow a player I see with my eyes
 2 - go look for a player whom I think I have an idea of where he/she is
 3 - follow one of my siblings whom I can see, and who looks like he/she knows where a player is
 4 - follow one of my siblings who is as clueless as I am
 5 - keep my head down and hope I won't get eaten, maybe do a little cautious looking around for pack mates

You guys will have to educate me on who/whom/whose later.

Players can also communicate with them, through moving around in some specific ways. I won't go into detail on that, because I want to send it to James and have him try it out to see if it's possible for him to figure at least some of it out by himself, or if we need some sort of tutorial.

They have behavior modes such as "follow player" or "lie low". They can be picked up, and then they climb to your back and allow you to use both your hands for hunting/wielding weapons. Later I plan to give them an unconscious mode, where if you feed them too little they might still survive a while, but you have to carry them around cumbersomely, with your hands. They can be thrown, which is kind of fun. When thrown, they will grasp anything they can, meaning that you can throw them to a platform above or some other safe space to get them out of danger momentarily.

They still don't interact with quite a lot of objects, most notably the lizards. Lizards and pups are invisible to each other, and in fact live in different planes of reality. That has to change. They also need to be hurt by rocks and spears, flies need to flee from them, etc.






   JLJac on November 22, 2013, 01:10:30 PM:

Update 203
Pups are now hit with rocks and spears. A grim feature, but it had to be put in. I'm thinking about whether they should survive a rock to the head... I'm leaning towards a 50/50 chance of survival. You shouldn't be throwing rocks at them anyhow.





   JLJac on November 25, 2013, 02:18:40 PM:

Hm, that's very interesting. The very first thing that went through my head reading that was "if not for mistakes, then what should I punish the player for!?"  Cheesy

In one way I think you're right. In one way I think you're not. It's interesting. I guess it is, as all design choices, a good or a bad design depending on what you're designing. If I we're making a futuristic racing game, that was all about the super smooth, trance-like flow of gameplay, I would totally agree with you. Then it would be all about designing an experience around the player, and that experience should be as slick and enjoyable as possible, with no weird annoying things happening such as mistakes having consequences.

Now, on the other end of the spectra we have dwarf fortress. I've always thought DF is kind of awesome because it isn't a slick gaming experience. Misunderstand me right, horrible UI is horrible, and would be better if improved. But the difficulty curve, the unforgivingness, is really appealing to me.

For two reasons - the first one is what I believe is the reason it is in DF, in-game narrative. Mistakes are stories. Losing that one goblin somewhere in your fortress, and have him trash a lever or whatever which in turn floods everything, is a story. It's punishing a mistake, and according to the "slick gameplay" philosophy shouldn't be there, but if it wasn't there wouldn't be a story.

The second reason is the sense of world it creates. A "don't punish mistakes"-game world is a show put up for the player. It might be a good show put up for the player, and some games should be like that, but it will make you feel like the world is an illusion only for your eyes. An unforgiving world, like that of DF, has much more of a sense of existence of its own. It's "Welcome, fool, let's see how you can handle this world." There are rules, and interactions, and the game doesn't care about what might be better for the player, much like our world doesn't care about what we would prefer. Gravity will do its thing, even if you, the "player", makes the mistake of stepping off a cliff. DF giant alligators will destroy doors, even if it floods the player's fortress. Rain World rocks will hurt creatures, even if you might not want to or might have made a mistake.

A world like that feels like it exists, it's not just a show for the player's enjoyment.

RW is a little bit in between, I guess. It's very good that you brought this up, because it forces me to think more about it. Is RW a play for the player, or a pre-existing world that the player is allowed entrance to? I have actually battled many design choices directly related to this, most notably the linear/open world decision, where I went with the open world. Still there are a lot of show going on, such as whenever you enter a room in that open world there just happens to be a lonely fly that's on its way to the closest swarming area, for your conviniece to follow. Maybe I should abolish those things as well, go all the way to the "simulated world that you're allowed in"? Or maybe I should drift more towards the middle?  Huh? One thing I'm pretty sure of though, is that in RW, if you throw a rock at a creature, that creature is hurt whether you want it or not...

Update 204
Making lizards see pups was surprisingly easy. I contemplated making a custom-tailored solution for pups in the lizards AI, but I'm happy I didn't. Instead I created a "pupsAndPlayersGlobalList" which has all pups and all players in it, then did an automatic replace everywhere in the lizards AI code changing "playersList" for the new one. Voilá, the lizard booted "brain ghosts" for all of the pups, spotted them, kept track of them, hunted them, and even carried them back to their dens more or less flawlessly.

One intersting feature is that a player can tug at one end of a pup while a lizard pulls the other. I think I'll keep it, with some adjustments, it has some really intense visual/emotional qualities to it.





   jamesprimate on November 26, 2013, 05:27:13 AM:

This game...

i like every single thing that you said.





   JLJac on November 28, 2013, 07:13:44 AM:

@artemi, actually I think of it the other way around - single player is Canon, and the rules there are the official rain world rules. Multiplayer sometimes deviates from that, because of Fun. I also expect the player to play single player first, then multi player.

The single player rules of friendly fire is that everything hits everything, whether you like it or not. RW doesn't have a health meter for players, just dead or not dead, and stunned. Rocks stun you for a while, spears kill you. Note that in single player none of these effects are wanted, as the you are on the same team.

In multiplayer you can switch spears off, which means that rocks still hit, and spears still hit lizards, but spears don't hit players. This is because the insta-kill spears tend to makes competitive games rather short, but you might still want to be able to use them on lizards. That's not Canon, it's just Rule of Fun.

@bandreus, this is yet another game vs simulation situation. As you say, it would make logical sense for them to pursue pups before players. On the other hand, from a game perspective, you want to be able to lure them away from the pups. If they follow a pup, you have an interaction between two AIs that you're not able to change, there's no "play". If they prioritize the player, you can save the pups by playing well - your actions matter.

Maybe the best balance would be to have them prioritize players and pups equally. But I really like your suggestion of having them differ depending on color as well.

@Dayvi, the consequences are not that grim, the "punishment" is only very temporary (the pup being stunned a little while) so in this case I don't think it's very unfair. If you hit them with a spear though...
 





   JLJac on November 30, 2013, 01:14:13 PM:

@ Bandreus, thanks! It's really nice to know that someone likes the project enough to know as much about it as you do Smiley Right now I don't really remember how the lizard prioritization works, but I know it's based on distance somehow. However it doesn't do the distance calculation every tick, so sometimes a lizard can actually ignore a closer player. I think the system has a little commitment, like if it has started hunting one player it will continue for a while even if another player is closer. This is because otherwise two players would too easily be able to game a lizard by standing on each side of it, and quickly approaching it one by one, keeping the lizard bouncing back and forth without being able to decide which one to pursue.

You should be able to throw pups at flies to catch them.
This goes straight in the game. Excellent idea.

Update 204
It's really interesting to try to create intelligent behavior, because it certainly puts things in perspective. With a loooooot of work I've managed to lift the pups' intelligence level from -say- beetle, to -say- fish or perhaps chicken. Creating a system like this makes you realize that the intelligence of an average mammal or bird is truly staggering. The intelligence of that super slow guy in the back of the classroom in middle school is incomprehensible vast.

Still, it's a weird chimera of intelligence levels. It's more stupid than a chicken in regards of being able to understand what jumps it is able to make, but on the other hand it can flawlessly solve mazes that would be a challenge even to a human.

The lizards had the huge difficulty of them not being able to turn in corridors, making path finding at least four times as difficult. But other than that I think the pups have a more complex AI. The fact that they have to be able to flee as well as pursue added an entire dimension.

Having a game AI flee away from a particular coordinate is a lot more complicated than having it pursue a particular coordinate. The reason is pretty simple - because if you just back away from it you will almost always end up in a corner.

When trying to get to a coordinate, the question of where you want to go is obviously answered. When fleeing away from a coordinate, you have to figure out where to go instead. This new "defensive destination" (defensive because it's not where you really want to go, it's just where you want to go right now in order to put some distance between yourself and the coordinate you're fleeing from) has to have a few parameters be correct. It has to be in a direction which is away from the thing you're fleeing from, it has to be a place you can actually go to, ideally it should be a place which offers further fleeing possibilities, ie not a dead end.

Luckily the pups' AI doesn't really have to be perfect, it just have to look like behavior that is somewhat reasonable for this particular imaginary creature. They will run into dead ends etc, and when a lizard is very close they go into panic mode and just run away from the lizard, whether that'll get them into a corner or not. As I said, they're fish smart, not cat smart. But because of their complex way of handling information on other creatures they still manage to surprise me some times.

I did a test where I stood on one side of a divide with the pups, like this:


That's a lizard down below!


I jump across, but the pups can't. They're still in "follow mode", so they'll try to figure out a way to get to me.


After a while of thinking, the path finder gives them a path and they start to move. They have still not seen the lizard.


Because the path finder is aware of the level layout, but not the lizard's position, it gives the shortest path, which happens to come across the lizard. When they see the lizard their internal image of what creature is where is updated, and they flee back into the corridors to the right. In a normal game situation they would have pretty much no chance from here on, but for testing purposes I held the lizard in the courtyard to see how the pups would react.


With their internal maps containing the information "there's a lizard in the courtyard" the next round of path finding tries to avoid tiles close to that area. The next attempt at approaching the player gives a much longer path around the top of the level, but still a path that takes them to their destination.


Sadly, this won't help them much. They just die and die and die and die and die. The game is very hard for you, and you're a much more able creature, with a much more powerful brain behind it. The pups can't do half of what you can, they're extremely stupid, and they don't have the advantage of seeing the entire level as you can.

They're truly pathetic, so I'll just have to hope that looking at them will induce the desired protection instinct haha! At least I'm proud to have taken them to a level where they not (very often) literally run into the gaping jaws of a lizard.

In fact I don't think the AI will show much in the game - you can carry one pup on your back, and grab one with your hands, and move around that way, so you don't really have to rely much on them moving around on their own. When it comes to actual game play, I think you'll not even bring them to a level where there are lizards, but rather have them wait outside for you to hunt. Or back in the shelter, hehe.

But it was a lot of fun to program Smiley Not implying that I'm done  Tired





   JLJac on December 03, 2013, 01:06:34 PM:

Can't record video Sad

@artemi, yeah, we're on the same page then!

Update 205
With the pups' behavior somewhat done, I've started to look at their appearance. Picking apart the two year old animatronic doll of the player character in order to adapt it for smaller size is very interesting. Honestly I had forgotten my solutions for many of the problems, and now have to discover them all over again. Also it's a challenge, because now we're down to a size were every pixel counts, and things like pixel displacement because of sprite rotation can have a huge impact on the general appearance.





   JLJac on December 05, 2013, 08:48:50 AM (Last Edit: December 05, 2013, 01:20:17 PM):

Should've left yourself better notes!  Tongue

Heh, actually I don't comment at all... This is just a two week project anyways, why bother Wink

this game is fucking amazing, one of few games i am actually genuinely looking forward to playing, massively inspirational as well thank you for making this game man
Thank you! Remember that it's extremely difficult and frustrating though Tongue

Update 206
Finally have something I can show:



Not much to add really, this is what I've spent the last couple of days doing. We started out with the pups just looking like squashed versions of adults, now most of the sprites they're compromised of are unique and not shared with the player. Other than that they work pretty much exactly the same, just simplified.

You can pick one up on your shoulders - the animation solution might be a little wink to the puppies in cave story. The one sitting on your shoulders doesn't affect your movement at all, which doesn't really make sense, but I have to go with the less frustrating solution sometime, don't I? You also have both hands free.

When you have a pup on your shoulders, you can "pick up" an additional one, by just grabbing it. The pup will run next to you, and you can pull it up ledges etc. This is what happens when I have the black pup on my shoulders and the yellow pup attached to my side, in the gif. This pup will also weight you down, and make climbing and jumping slower and less effective.

This last mode also works for stunned/dead pups. The idea is that when they're sitting on your shoulders, they are holding themselves in place, but if they are unable to do that you can still drag them along in the second mode. If you for example drag an unconscious pup with you, and it wakes up, it will jump up on your shoulders shortly if that spot is free.

You might notice that the pups cut into each other a little bit - some of their sprites are below the other pups, some in front. This is an issue when they grab free sprite channels, because they all want to have channels as close as possible to channel 400 or something like that, which means that the first to spawn gets 400, 399, 401 etc, and the next one gets 395, 406, etc. That's pretty easy to solve, I'll just have to get around to it.

Also the framework for pups holding flies/objects is in, and if you throw them at a fly they catch it and eat it. While the player can carry two objects, a pup can only carry one at a time.





   JLJac on December 05, 2013, 01:21:33 PM:

Aaaaaah!  Epileptic
Fixed it! Strange though, it was broken on my phone but not on my computer... tried a new host, this is definitely the last time ever I try something new!





   jamesprimate on December 05, 2013, 02:59:42 PM:





OH. MY. GOD. that is next-level cuteness.





   JLJac on December 07, 2013, 02:09:49 PM:

Hahahaha! In the next shrek movie my characters will be featured, promise!

awwww you held that little guys hand awwww
This game is becoming a very strange mix between ultra-violence and a hand holding-simulator! The project is officially out of control...

If the hand holding pup only takes one hand, can you still hold stones and spears with the other? How do you juggle between throwing the pup or throwing the spear?
I've been thinking about this, and while it would make sense to be able to hold a spear in the other hand, that would kind of make you question why you're not able to hold a pup in each hand - and then you would be able to carry all three of them around, which wouldn't be as fun gameplay-wise, as you pointed out. So for now holding a pup in one hand takes up both of your hand slots - that's not set in stone though. If it's just too annoying I might allow you to carry a spear or something simultaneously.

Thank you everyone for keeping my motivation up Smiley

Update 207
Made a new version of the pups' path finding, that works in one single calculation, contrary to the ordinary path finding which ticks along in real time as the game is running (to save framerate). The one-shot path finder will be used for when you exit a level, and the pups following you to the next level need to calculate if they are able to follow you, and if so how long it will take them to reach the short cut.

This path is saved as an array of all the tiles the pup has to pass through in order to get to the exit.

I also plan on saving the time when a pup is offloaded. That way, if you exit a level while a pup is running towards you, and then quickly re-enter before the pup has caught up, I can calculate how far along its route it will have gotten, and load it on that tile. That way I can fake some activity going on in rooms you are not currently viewing.

The lizards should probably get some similar treatment. Right now they're just re-loaded in the same general area where they were offloaded, but not much else is saved. Except their health, of course. Ideally I'd want to be able to exit a room, as I see that a lizard captures a pup and start off towards its den. Then return to the room, and have the lizard and the pup re-loaded, with the pup in the lizard's mouth, in a reasonable position you might expect it to have reached in the time it was off screen.

Gah, today I totally broke my rule of "write what you have done, not what you plan to do"... But well. Planning to do those things is the reason why I made a new path finding function for the pups today. More to come, stay tuned.





   JLJac on December 09, 2013, 03:22:46 AM:

Update 208
Ok, so here's why it's not a good idea to promise things in advance... You know those things I wrote about last time? I did some of them. Nothing new to write Tongue

Actually what I've been doing is making the pup an object that exists consistently between levels. Like, its position is saved when you exit a level, it can follow you to the next level, etc etc. It's also capable of some very abstracted movement when off-screen.

Generally if there's anything I'm not extremely happy with in my game it would be how inactive the world is when off screen. Everything just goes into stasis, and is basically just saved as coordinates to later be loaded. This is because the game engine was originally written for a single-screen, multiplayer game - and when you maneuver between rooms it basically starts a "new game" for each room you enter. It has gotten a little bit more dynamic, and at least there is a pretty decent illusion that the entire world exists simultaneously, but part of that "each room is a new game" skeleton is still around.

Maybe I'll write a little engine that's capable of moving off-screen entities around and even have some very basic interaction between them. It's just a question of whether the current illusion of consistency is solid enough - it might be to a player that's not actually aware of what's going on under the hood.