Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 10:32:16 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsProject Rain World
Pages: 1 ... 96 97 [98] 99 100 ... 367
Print
Author Topic: Project Rain World  (Read 1443642 times)
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1940 on: August 19, 2014, 11:47:07 AM »

Wow the ai and personality system have became so sophisticate that this lizard hung itself in despair as its thought lead it to realize he lives in a simulation ...  Screamy
Logged

JLJac
Level 10
*****



View Profile
« Reply #1941 on: August 20, 2014, 10:27:29 AM »

Stop me before we get there!

Update 293
Feet are in! And some more sophisticated tail animation.

This time around I decided I wanted to give the lizard breeds more characteristic walks. They are all a tad slow at this point I think, that is a gameplay balance question that will be tweaked a lot later. Quite a lot of the stuff that's supposed to be in isn't yet - for example they are supposed to move with different efficiency when occupying different terrain (pink can climb on poles, but it's somewhat slow and clumsy) and when moving in different directions (green is considerably slower in any vertical movement that requires it to lift its heavy body).

Here's the pink lizard with legs. It's a bit boring and anonymous in my opinion - which it's partly supposed to be as pink is the default, but it could have something more going on, definitely. Remember that this is just movement through the terrain, so they still don't have much to work with to convey personality.




Here's the green one. It's heavier, slower, and moving more unevenly. It also lifts its feet with each step, sometimes resting on its belly for a moment between steps. Green is also supposed to have a stiffer tail than the others, to give it a bit of an alligator feel contrary to the soft gecko bodies of most of them. Can you tell?




Blue has a rapid, even, smooth movement where all four limbs are constantly working. You might also notice how it's able to grab on to walls, and how it is more agile and more inclined to climb.




So much fun! I was dying to get back to this kind of stuff :D The feet still have some weird flickering at times, and I'm not sure how happy I am about when the legs overlap each other perfectly, so there is still tweaking to do. For fun, here's one of them moving together:



You might notice that the interactions still feel a little blocky and uneven. There are some getting stuck scenarios left, especially as the lizards are not aware of each other at this point. When two of them get in a deadlock pushing against each other they have no protocol for what to do in that situation. But you can see some interesting stuff too, such as how the green one is way heavier than the blue one and pushes it out of the way without any impact on its own movement. In the future I hope to create a really interesting dynamic between lizards, having them getting annoyed with each other and whatnot.
Logged
jamesprimate
Level 10
*****


wave emoji


View Profile WWW
« Reply #1942 on: August 20, 2014, 10:42:36 AM »

this is so massively exciting. i seriously cant believe this is ONE DAY after that last post.
Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #1943 on: August 20, 2014, 11:09:46 AM »

Feels like the only purpose in they life is to follow you endlessly x)
Are you planning on making them more dynamic, I thought about watching alligators and how they act in nature

I feel like when they see something, they stop to watch a bit, and then they evaluate the variables, you had that in in the old lingo version right, idk, anyways, looking good
Logged
JLJac
Level 10
*****



View Profile
« Reply #1944 on: August 20, 2014, 11:18:36 AM »

Yeah, this is not behavior, just movement. They have no AI at this point, so your observation is correct  Hand Thumbs Up Right
Logged
jctwood
Level 10
*****



View Profile WWW
« Reply #1945 on: August 20, 2014, 12:16:14 PM »

It is wonderful seeing you build up the layers of motion and animation. Very excited to see what decisions you make about variations!
Logged

jamesprimate
Level 10
*****


wave emoji


View Profile WWW
« Reply #1946 on: August 20, 2014, 03:02:24 PM »

one thing joar and i were talking about earlier is the difference in stride between the lingo lizards and these.

previously, locomotion was done via a sort of faked "ghost pull" situation, meaning that the lizard walk was basically the body being dragged along the ground. now in the new version there are nice actual legs to walk on, and so the stance and stride of the lizard has changed a little. HAS SCIENCE GONE TOO FAR??

this is all adjustable though, so your guys opinion on the "feel" of new lizards stride vs the old could be really helpful!

to me the new lizards look much more agile, which could make them appear even more threatening (and thats a good thing of course!) maybe a mix of some low and some high? keep the slower lizards close to the ground and the faster ones with the more agile stance? wot u think
Logged

Loren Schmidt
Level 10
*****



View Profile WWW
« Reply #1947 on: August 20, 2014, 03:36:44 PM »

Ha, I love the movement tests! The way they turn around is lovely. I don't know how you're doing your tail physics exactly but it seems to be a good fit for the way the lizards move.

Regarding overlapping feet:
One thing I've done in the past is a second layer over the individual foot behavior. I make paired feet check in with their partner when deciding whether or not to step. This way during normal walking I can force no more than one foot to be moving at any given time (while the other is planted). The problem with this is that sometimes the planted foot ends up being forced to stay planted for longer than it wants to be (competing pressures).
Logged
Kytin
Level 0
***


Just hatched


View Profile WWW
« Reply #1948 on: August 20, 2014, 04:14:53 PM »

The problem as I see it is this - we have the breeds of lizards. The idea is that the player should be able to learn the behavior of each breed. "Greens are slow and dumb" for example, or "Blues can't take much abuse, but can climb walls". What I worry about is two scenarios. One is that individual differences drowns the breed traits, so that everything becomes a random sludge. The other is that in order to not end up in the random sludge, we will need to make the individual traits so very small that they are actually not significant in any way, and then the effort was in vain.

One solution is to have the differences be purely cosmetic. Short tail, long tail, that sort of stuff. This is safe, so I think we might do this kind of stuff regardless.

Another is to have somewhat rare, but very clear unique individuals that appear late in the game when you've already come to know the categories. That would be stuff like "It is very clearly a blue lizard in every part of its behavior, but it's large as a green lizard". The kind of stuff that can be easily understood by an experienced player. This solution would probably take on a bit of a flavor of "bosses", as these deviant individuals are likely going to be mostly harder than regulars, and the element of unfamiliarity and surprise will play in their favor either way.

A third option might be to have one set of traits that varies by breed and a different set of traits that can vary by individual. So brains, toughness and speed could be determined by the breed, but the sharpness of their hearing and/or sight, or their agressivness could could be up to the individual.
Logged

Dragon's Wake - Devlog
JLJac
Level 10
*****



View Profile
« Reply #1949 on: August 21, 2014, 06:17:16 AM »

@Loren Schmidt, yeah, that sounds a lot like what I've been trying to do, but I might have to throw a few more counters in there to get a good rhythm to it o.0 Are you doing procedural animation too?

@Kytin, interesting idea! Maybe we could keep physical traits and "personality" separate, and only have the latter be individual...

Update 294

I made a couple of pretty big infra structure changes, such as moving all of the lizard breed definition stuff to the same place. Now there's a static class which is fed a lizard color and returns the complete template, all of it based on one huge enum switch. Maybe not the most elegant solution, but it works flawlessly and is only supposed to run once when the game is started up.

Also got the thing where lizards have different speeds in different terrain and when moving in different directions down. At this point it averages between the terrain type that each of the three body chunks occupy.

Oh, and sometimes you just have to do something that doesn't make any sense to the schedule, but you want to do just for fun! So I made the lizards' limbs have health, and go limp and useless if they're too low.



This is going to be really cool later, when spears and stuff is in... Note how one of the front legs is sometimes working, sometimes not - when they have low health, but not 0, they're switched on and off a bit like that.

The other thing I got started on today was an obstacle tracker. Because of the physics based nature of RW, not everything is very predictable, and even after me trying to eliminate all the getting stuck scenarios, there will be some obscure getting stuck scenarios left. The obstacle tracker isn't only there to patch over problems I'm too lazy to fix, though Wink It plays a part in making the NPC's seem more intelligent over all, and makes them able to account for some weird unpredictable scenarios that might occur in any game session. What it basically boils down to is being able to identify that a certain move is not possible after a number of failed attempts, and trying something else.

This (rather tragic) gif shows a lizard that tries to climb up to the player, but is rather unsuccessful due to its limbs being disabled. The gif is sped up, because without functioning limbs the lizard is really slow.



Whenever a move fails, the destination tile is reported (red in the gif). After being reported a certain amount of times, the tile is marked as an obstacle (yellow) and the path finder is told to restart. This time around the yellow tiles will have a higher cost assigned to them.

This means that after trying to climb a couple of times, the lizard concludes that "OK, this isn't working" and decides to take another way up. This system works no matter what the obstacle is - if it's lame limbs, a stream of water, some heavy creature grabbing on to the lizards tail, anything.

This multiusability is both its strength and its problem - the lizard still isn't very smart about cause and effect. A smart lizard would deduce that climbing was the problem, not these specific tiles. With this system it might very well go to another climbing pole and try that before realizing that it has to get up some other way.

The point is, however, that this is a fallback. If I want to make the lizard able to understand that it can't climb without functioning limbs, that's something I'd write specifically in the AI ( if (functioningLimbs < 4) noClimb = true; )  but for all the scenarios I won't be able to predict, this fallback solution is a lot better than infinitely trying to get past some impossible hurdle.

Before it's done I want the obstacle tracker to have one more function - it should be able to identify when the obstacle is in fact a creature blocking its way. When a huge green lizard is sitting in an opening and a tiny blue one is pushing and pushing in vain to get through, it seems kind of unreasonable for it to assume that "it must be something wrong with this specific tile!" Also, once the green lizard is gone, the blue one should really stop avoiding that tile. So I think a specific framework for being blocked by colliding in other objects might be in place.
Logged
joseph ¯\_(ツ)_/¯
Level 10
*****



View Profile
« Reply #1950 on: August 21, 2014, 06:51:32 AM »

Such a cool update. I don't closely follow the thread -- have you considered flinching/pain responses when injured lizards attempt certain tasks?
Logged

JLJac
Level 10
*****



View Profile
« Reply #1951 on: August 22, 2014, 11:03:03 AM »

Thanks! Yeah, there was a little bit of that in the old version. I don't want it to be too agonizing to watch them when injured, after all it's sort of unclear whether they are actually creatures like us capable of pain, but they should certainly react to injury in their behavior  Hand Thumbs Up Right

Update 295

Oh wow. Today was spent in vain. But it was awesome! But it was in vain. Basically I did what I do best, spent way too much time on monstrously complex AI machinery that no-one will ever notice.

Remember yesterday, when I talked about an obstacle tracker for other game objects? That's what I did, basically. The idea is pretty simple: On a "movement failed" call, first check if you have collided with any other creatures these last couple of frames. If so, don't write to the obstacle map (the one showed in the last post, where the lizard was able to figure out that climbing wasn't going to work after a couple of tries), but instead call the Obstacle Object Tracker, telling it which object you were supposedly blocked by.

The Obstacle Object Tracker has a list of suspected obstacle objects. It checks against that list, and if the object is already in there, it adds to a Reports integer. After a certain number of reports, the object is moved to the Confirmed Obstacles list. If it's not on the suspects list, it's added to it. All the suspects on the list that were not the right one this time around get a Lifetime counter decreased, and when it hits zero they are forgotten.

Whenever the path finder is asking a tile for its pathing cost, the Confirmed Obstacles list is checked, and if any of them are hanging out in that particular area, the cost is increased.

Simple enough!

Then it comes to my no omniscience purism. Say I'm a blue lizard. On my Confirmed Obstacles list is a green lizard, I've bumped into him 5 times and am frankly a bit tired of him, so whenever I'm pathing around the level I'd prefer not to run in to him again.

But... It was 240 frames ago since I saw him. And the creator of this little universe doesn't like omniscient AI, so I can't just ask the game engine for the position of the green lizard. Contrary, I have an AI component used for just that, the Tracker from a few pages back. I can ask the tracker where I think another creature is, but never ask for its position straight up.

So the Obstacle Object Tracker needs to be hooked up to the Tracker, with each object on the Confirmed Obstacles list having a reference to a Tracker ghost, so it can use that creature's supposed position when asking what tiles to avoid.

Problem is, that I don't want to have every creature track every creature - some creatures are not interested in each other as neither eat the other, and it would be total overkill for all of them to run 12 ghosts for every other for no reason. So I needed to make it so that when an object is moved from the Suspected Obstacles list to the Confirmed Obstacles list, the Tracker gets a call. The Tracker looks through its ghosts, and if it finds one for the obstacle creature, it returns it to the Obstacle Object Tracker to be stored. If it doesn't, the "A creature has been spotted" method is called, and a ghost is created and returned. In short, the tracker will start tracking that creature despite it being disinteresting because it has become interesting in the role of a physical obstacle to avoid.

[/insanity]

This means, if we return to the blue and the green lizard, that at this point a blue lizard can chose another path to its target because it's dodging a misconception of where it expects the green lizard to be. o_0

Do you think this comes across to the player? Hahahahahaha nooooooo it doesn't. But it was fun, and now it's in there, useful or not. At least it has helped dissolve huge knots of lizards being stuck in each other.

It does create some cool behavior though. When a big bunch of lizards are moving towards you, some of them will strategically take alternate routes as to not get stuck behind the crowd. This indirectly leads to some surrounding behavior that can be pretty nice. But boy, could it be done with simpler methods  Cheesy
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1952 on: August 22, 2014, 11:08:12 AM »

Lizard developing PTSD is next
Logged

JLJac
Level 10
*****



View Profile
« Reply #1953 on: August 25, 2014, 08:44:13 AM »

Update 296
Got a triangle mesh up and running for the lizard's tail. It's based on the player's tail, and was thus somewhat painless to get working. Paving the road has finally started to pay off. Also added a new function to my triangle mesh class - vertex coloration.



Because I've assigned color to the vertices, and the idea of this object is that triangles can share vertices, there are no sharp edges in the shape and the colors are stretched and bent like supposed to. When bent at very sharp angles you can see some edges, but I think it's acceptable for now.

I've also created a body for the lizard, which works similarly but also uses circular graphics as well. Basically it's a circle at each body segment with stretchable quads connecting them, expect it's not because there are also intermediary circles between the segments to smoothen the curve, and the very first segment is only rendered as a little stub because this is where the head is going to be.

The color might be a bit dark against the balck background - my monitor is brighter than most - but if you look at it at an angle you'll probably be able to see something  Tongue



A little slow motion and tossing around in there as well to show how the tails behave. I don't think all lizards will have colored tails like this - I kind of like the black tail - but maybe one or two might have something like it.
Logged
jamesprimate
Level 10
*****


wave emoji


View Profile WWW
« Reply #1954 on: August 25, 2014, 09:10:13 AM »

oh wow those look absolutely incredible. the black gradient has is very "deadly creature" feel to it, like a poisonous frog or snake. If you dont use that coloration for all the lizards (i vote for that), then perhaps as a distinction for the larger "adult" versions of each breed.
Logged

Rojom
Level 0
***


View Profile
« Reply #1955 on: August 25, 2014, 06:01:04 PM »

Those are so smooth...and terrifying. Loving the faint 3D effect when the tails change direction, even if unintentional. It's unbelievable how much you can do in a day.
Logged
Christian
Level 10
*****



View Profile WWW
« Reply #1956 on: August 25, 2014, 06:38:49 PM »

Tails look amazingly fluid. So are we going to have some

stalking action going on? Because that would be terrifying to think you're safe, only for the scenery rustle and see the tails flick around and then disappear again
Logged

Visit Indie Game Enthusiast or follow me @IG_Enthusiast to learn about the best new and upcoming indie games!
JLJac
Level 10
*****



View Profile
« Reply #1957 on: August 26, 2014, 10:00:19 AM »

oh wow those look absolutely incredible. the black gradient has is very "deadly creature" feel to it, like a poisonous frog or snake. If you dont use that coloration for all the lizards (i vote for that), then perhaps as a distinction for the larger "adult" versions of each breed.
Haha if you think so, we can keep it! But then I don't know about the little fin the blue one used to have, maybe we'll have to come up with something else there...

Those are so smooth...and terrifying. Loving the faint 3D effect when the tails change direction, even if unintentional. It's unbelievable how much you can do in a day.
Thanks! Yeah, I like that effect too - it's just a side effect of the tail triangles having been added root to tip - the brighter tip segments are rendered on top.

Tails look amazingly fluid. So are we going to have some

stalking action going on? Because that would be terrifying to think you're safe, only for the scenery rustle and see the tails flick around and then disappear again
That exact scenario can hardly be recreated in our sidescroller view, but we could definitely have them hiding in vegetation at times, with only the tail spottable!

Update 297
Spent most of the work day on a train, which doesn't lend itself well to graphics work as I can't use the mouse - instead I did some re-structuring in the creature templates and other less exciting stuff. I also made a few changes to the lizards, moving all of their behavior to a new method call that's only called from the main update call if the creature is neither dead nor stunned - in those cases it'll just lie limp. Got the limbs' deactivation behavior respond to that as well, making the whole creature relax when stunned.

When getting home I did get around to converting some sprite sheets though, and now I have most of the head graphics over in the Unity version. I've managed to implement head rotation, but not really any other behavior - it's still just staring straight forward with a dead gaze. I will be able to animate what the jaw looks like when opened and closed etc, but having the creature actually do these things by itself is for when I'm writing the AI.



The head consists of 5 sprites - the eyes, the head, the teeth in the upper jaw, the teeth in the lower jaw and the lower jaw itself. I'm happy to see all of these align, one worry was that there would be little gaps between them at places. When the lizard bites a creature, that creature is supposed to be displayed below some of those sprites, and above others, to make it look like it's stuck between the jaws. I still haven't figured out how to make that happen technically. One idea is that each lizard could have its own sprite container (similar to a movie script in flash) between its jaws, where all the sprites of the bitten creature could be moved. But when to move them there? You don't want the jaws to snap shut and then have the lower jaw blink and disappear behind the bitten creature...
Logged
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #1958 on: August 26, 2014, 11:31:58 PM »

Quote

woah, fun! great to see this is still going strong jljac Smiley
Logged

JLJac
Level 10
*****



View Profile
« Reply #1959 on: August 27, 2014, 11:37:40 AM »

Always and for ever Grin

Update 298
Did a lot of work on the head today - made it so that it can look at an arbitrary point in space that isn't necessarily the pathing target or straight forward, made it so that the head can collide with terrain, and got the jaw opening motion down. Many of these animation quirks are based on values defined in the breed object, meaning that the different breeds will have subtle differences in how they move. Still not happy enough with the head to call it done, but it's good enough until I have the rest of the creature animated and can get to the polish phase.

I also ported the lizard leg sprite sheet for the unity build, and have been fighting with some pretty ... interesting animation.



What do you say guys, still not really there yet?  Cheesy

At the end of the day it looked a little bit more civil:



But the legs still need a lot of work. A dirty secret of my trade here is that the legs never really have looked substantially better than this, but the fact that everything is merged into a flat-color silhouette has really helped obscure some of the worst part (the joints where the legs connect to the body) while bringing forward the better parts (the tips of the limbs). I'll keep working with it until I find it acceptable with the legs visible like this though, and hopefully it will all look really cool when the final coloration is in.

One thing I've started to notice is that the lizards probably take too small steps, this tip-toeing doesn't really look very menacing. This problem is in the "search for a grab point" code though, which is a pretty messy chunk of logic, so that will take some deep diving to sort out.
Logged
Pages: 1 ... 96 97 [98] 99 100 ... 367
Print
Jump to:  

Theme orange-lt created by panic