Pony vidya
Christmas gift?

current goal is to have a working sun cycle and simple weather by christmas. the sun will rise and fall at different rates depending on the month (to follow the solstice, shorter days in winter and longer days in summer).

weather will be a bunch of dicerolls and probability tables. first a diceroll for the current weather based on month, then another compounding diceroll based on the time of day, and then a final one using what weather was running previously. This will create semi-realistic “weather patterns” with the possibility of freak weather like two-day-long snowstorms or a whole week of sun. This is in addition to the very small chance of powerful weather like tornadoes, hurricanes, and blizzards. 

Later once villagers are working, i’ll add some flavor behavior for the pegasi, who will all fly upwards before some new weather is about to take place, and maybe even the ability to nag them to change it (with restrictions)

but for christmas day, i hope, you’ll be able to walk around an almost featureless wasteland and see shadows change as the sun moves, and probably see some snow.

PROGRESS!

Back at it, after a year no-less

finishing college and starting a professional career is about as much trouble as it’s worth really (dat paycheck)

but back to the races, the show must go on, etc.

I’ve ditched shiva3d entirely. I liked lots of things about it, but the complete lack of community means it has almost no growth potential, and going to the forums to ask for help was sort of like going to northern canada to ask for information about living in florida. There aren’t many people there, and they have their own problems.

So, back to Unity, which has improved immensely in recent years and the C# script community has grown a lot (death to javascript!). I’m basically starting from scratch in there and have collected a sizable selection of community made add-ons and tools. The crown jewel being a rather fantastic AI toolbox that will make villager pathing and wandering a cinch.

CURRENT EXCUSES

might as well compile a list of why i haven’t posted anything in over a month

1) finals/final projects (now over)

2) job hunting, 20 resumes sent out every few days. holy shit job market, why?

3) the remodeling of my house

4) building and configuring brand new PC (it cost a grand in parts, and it blows my old system out of the water by orders of magnitude)

but i did manage to make some baller AI. they’ll follow you around corners, but obey line of sight and stop chasing if they can’t see you anymore. i’ll upload a video in a little while.

not dead just busy (tm)

Better follow code, just about done

i fixed a lot of weird bugs with the villager’s movement system, they now properly follow you around when you get close enough, and then go back to their spawn point and wander around when they stray too far.

the last bit is adding little triggers so villagers either wait or loiter when reaching their targets. this is so events passed from completely separate functions can dynamically make the villager either

1) wait and stare (at the target)

2) stop and wander around (the target)

once it’s given something to run towards. the villager will usually wait and stare at a player like in animal crossing, but wander around when it runs towards a structure like its own house.

there are still one big problem though; It only “looks” for the player after it’s successfully reached a new nav node. this means there’s often a delay between getting near the villager and the villager actually starting to chase you. This is a consequence of how the navigation system works at a fundamental level, since it’s based on a little navigation sample included with Shiva, and doesn’t actually move towards something until it’s successfully moved to a new node.

Later on once i revisit pathing, i’ll base the navigation on The Hunt, a little zombie game sample that has active pathing per-frame so the villager’s “lag time” will be zero. It’s much more complex and convoluted (like dynamically enabling or disabling nodes along its path, some ray-tracing, self-checking..) but has more natural behaviors.

but for now i’m turning my attention back to “that damn Sun Cycle”(TM) problem. looks like it’s trig time..

I’M NOT DEAD

just busy.

this is the result of some additional labor in the navigation system. i basically just took a huge navigation code example, then broke down each line and added comments. it makes much more sense now but it’s still a little weird, specifically how the navigation system really works with nav targets and the distinctions between nodes. i’m not 100% what is being automatically handled, or explicitly defined.

anyway, above is a simple little diddly. the villager will follow me if i get close enough, but otherwise go back to their house and just wander around.

i’m focusing on using the state system to switch between complex behaviors, and further abstract stuff, which will make the crazy event scripting later on (like holiday events) much easier to code, as i’ll just be calling states instead of explicitly making huge switch statements.

Fucking navmesh, how does it work?

for all i praise Shiva, it’s navigation toolset is very difficult to wrap one’s head around. This is made all the worse by there being absolutely no tutorials, videos, or wiki articles describing it in any detail. the forum posts are sparse as well. The documentation is a series of one-sentence descriptors for functions with no elaboration beyond that.

the only thing i really have to go on is the code from this demo game that came with the shiva engine, called “the hunt”. it’s some generic little zombie shooter, but it shows off a couple key shiva things (like the nav mesh).

I’m going to spend tomorrow cracking this bastard open. I’d be happy if i could simply set up a “look at player when in range, pause, run towards player until within a certain range, then stop and look at the player” behavior.

actually i’d be happy with “chase after player when player is in range”, since a chase behavior is like, one of the most fundamental AI behaviors.

ffffffffffffffffffffffffffffffffffffffff

I believe in you Dinobro
Anonymous

that makes one of us

WILL THERE BE DIAMOND DOGS
Anonymous

most likely. They’ll probably be part of the random villager rotation, and i might throw in some special stuff if all three of them are in town (like random holes opening up)

Fixed the flicker FOR REAL, sun solution?

turns out the flicker was due to a hasty prototyping decision way early on. I originally had the ground set as a very thinly squashed cube with a Collider attribute attached. This is great and all, but light going through this flat cube behaves very strangely. it’s like putting water between two pieces of glass and squishing, it flows all over the place in strange, unpredictable patterns.

SO!

i just make a Y+ normal plane (that means it renders straight “up” in the game world, but is invisible when looking at it from the bottom), and put the grass texture+a collider on it. boom. It actually looks really nice around sundown now, great shadow play

but remember that sun problem i had? read more for a possible solution.

Read More

Fixed the flicker, another problem

turns out the flickering was due to the light source being “too perfect”. it would only bug out at 15 degree increment angles, which is curiously the increments i was using for each hour in the day (360/24=15). just adding 2 degrees to the rotation fixes it, and the difference isn’t even perceivable to the player. days and nights work correctly now yay!

but here’s where things get really mind-bending. 

Read More