Player is alive

posted in davidkilmer
Published June 18, 2019 Imported
Advertisement

he moves, and he animates, and he totally does not look the part. We are using a ‘link’ like character, and he so damn cute, but definitely not a caveman. Oh well, this is just for prototype ?

So now, lets apply health, energy, hydration, and hunger bars. This will be the introduction of the UI. Since there is no other bad guys or players, the first danger to the player is starvation and thirst. Looking it up, it can take 72 hours to die of dehydration in hot weather, and five to six days otherwise….. hmmmm, lets keep that in mind. Looking it up, starvation takes 8 to 12 weeks . I didn’t know that! lol!

So, some more questions arise. What is the day cycle time? Well, minecraft has a full 24 hours in twenty minutes. Maybe that is too fast? Jake feels running a 1:1 game time would be best, accelerating game time for mundane actions , such as foraging, eating, sleeping ect,… This might get changed later, but this is going to be the start.

So first I need to set up lighting and cycling ( the action of the “sun” moving around the “world” …. which, funny enough, is a flat earth lol ) . Since I plan on making the world infinite, the light source should follow the player, and I am thinking that the sun will just move from one side to another, moving in a spherical way and going dark after it moves behind the world plane ( because the tiles will block the light ). This will of course make it pretty darn dark, so a moon will have to exist on the same orbit, exactly 180 from the “sun” . I guess it will emit a blue-ish color, but we can play with this. Maybe just a very faint glow of white to give it a “moonlight” effect.

Messing around with it all day, it is now two directional lights facing 180 from each other, rotating around an axis representing the day and night. It isn’t ideal, but it is working for now.
day_night_birth-1.gif

This does create a slight issue with the 6pm and 6am times where the light seems a bit unnatural, which could be solved with a few extra lights showing dawn and dusk light reflections . It makes it look darker at 6pm than at midnight. We could also set the moon on a slightly different speed making it to where it is super dark all night. But for now, this works.

Next, I wanted to make the world infinite.
infinite_map_birth.gif

Next we implemented starvation and dehydration, which is just a matter of waiting a variable amount of time before eating away at those levels until zero and then taking away from health.

Then energy regen, and energy cost for walking and running
energy_costs_walking_running.gif


View the full article

Previous Entry Adding things….
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement