Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    16
  • comments
    0
  • views
    747

About this blog

 

You are a primitive in a burgeoning world of mystery. You are alone to survive the brutal wilds. Scavenge and harvest raw materials for tools and shelter. Hunt and gather food and water. Discoveries await, if you survive.

Entries in this blog

 

Crunch Time To-Do List

It seems as though we are a little closer than I realized to having a prototype of this game completed. So , I need to crunch to get this done. These next couple of weeks , I am going to try and do some double time and get this sheet done, so we can test and tune, and hopefully get a playable version up for all to play and give feedback on . Add “bush” tiles to aux terrain Add “Vine” tiles to aux terrain Add “berry” and “poisen berry” to items list ( harvested from select bush tiles ) Add “vine” item (harvested from vine tiles) message window setup the biome system ( at the least: biomes can be read in as the base of the terrain the player is in ) Prevent double jump Add energy depletion on all actions that require it Add “rock” to aux tile map Add “rock” to item list Add “stone hatchet” to item list Add “wood shelter” to item list Add “fire” to item list Delete “sand snake” and set up the fauna jake has designed finish inventory – make a ‘build’ button instead of insta-building. Do equip panel. make click and drag a thing
View the full article

davidkilmer

davidkilmer

 

Reworking Land Generation to include Landform types

So , I have spent some time on the land generation before, turning it from something smooth to something more organic, and then adding another layer with a tilemap for other landtypes such as trees and mountains. The problem is as it stands right now is that the world is fairly predictable and obvious. There is only one landform ; forest. Though there are other tiles, sand, water, dirt, snow,…. there is no absolute “oh yeah, I am in a desert now” or “damn, its snowy here” . First, I will need to create a scriptable object: Landform ; which will include the amounts of land tiles to be visible and the likelihood that landform will occur. This will be the easy part. The hard part, is trying to figure out how the landforms will fit together without looking like a damn puzzle. I guess I will cross that road later, for now, lets get the system working. I am wondering if the Landform object should include the perlin noise info as well, to really make it different from one another. Jake suggested having the landform tile ratios be variable, so water,sand,dirt,grass, and snow would have a x to y % instead of a flat percent. This would yield differences between the same landforms, which is great. If we placed the perlin info into the object and gave it the same variable range, we would end up with some varying landforms among the same type. But I think we will go without this for now. Or maybe not. I forgot about the smoothing that was occurring before, and this could be useful for deciding larger chunks of the map. Now i am lost in thought trying to figure out how to do this. The apex of this riddle is: how do we decide which landforms to use, and how do we blend them as to not end up with rough edges? Be back with a solution
View the full article

davidkilmer

davidkilmer

 

Regeneration and randomness

A big part of this game is randomness , which is obvious, since it is based on random generated terrain. I have my work cut out for me on that part, as I am going to have to eventually get the terrain generator to pick from terrain types in order to get it to get real interesting. For now, I want to focus on placing apples in trees, berries in bushes, and regrowing trees ( and burning trees ) . Right now, trees are being placed in the aux tile map. I think this should be the focus of where this action is happening. The aux tile map script really only holds its perlin noise info, and doesn’t do anything else – the main terrain generator script is responsible for creating that map, so the aux tile map script can be used for regeneration and random placement of things ( fruit, sticks, stones etc,… ) The first part of this should be regenerating trees after they are cut down. So within the aux tile map script, we will first have to create an array of tiles that are now cut down, that we will need to set a timer for and check when they can be regenerated. WHich is all fine and dandy, but now I am getting a null reference when trying to check the tile and so forth. What is odd, is that it is throwing the exception because there is no tile there, according to the reference, hence the throw. The process starts in the map generator by way of the player script after harvesting ( makes sense ? ). It calls into the map generator which has the aux tilemap itself , and that calls seems to be coming up blank. I checked the whole script and can’t seem to find the reason why the data would be gone or missing. After a couple more days, I have concluded that I somehow forgot ( lol, i know, right? ) that there was no “nothing” tile, which is apparently something I had programmed in before, with the intention of doing, but never did. Still not positive why the null reference, but when simply placing a different sprite on the tilemap, it drew underneath the trees, and in a different spot ( one square to the right ). So its possible it was grabbing a blank tile and then throwing the exception because there was in fact, nothing. SO! A couple days later and I got it figured out. Even though the aux_tilemap had a Zed of -1 ( to show above the base tile map ), the tiles were placed on the 0 Zed of the aux tilemap . So when I was grabbing the tiles, I checked the editor for the zed of the map , and I did not check the script for which zed the tiles were being placed. The nullreference was being thrown because there was no tile there, hence why the mountains tile was being placed below the trees. So now it works. Player harvests, the tile is replaced with a stump tile, time goes by, and it grows back. Freaking awesome!
View the full article

davidkilmer

davidkilmer

 

Manipulation of a sprite

I am thinking, that even though it is a prototype, we should build in the animation. Mainly, this is because I don’t want to do it later when we replace the graphics. So far we have the player attacking without any animation, and I am about to implement player jumping, again without the graphics. So, its a prototype, so we don’t want to waste time ( maybe looking for graphics, or building new ones ) , and we don’t want to invest into it ( buying premium assets ). SO, i am going to manipulate the ones we got. Boom, right!? I just found that the sprite pack we are using for the player actually has an attack animation, so thats great. I am going to make a jump animation for four directions and then implement it in the game, and then go back and do the attack animation. I am thinking that I can make the sprite have the shadow, and just move the image…and not the collider? I don’t want the player “bumping” into a mob that is two squares above the player because he is jumping into the ‘air’ . I had thought about having a tile map for representing mob and player locations, this way we could have a virtual ‘zed’ axis for the player to jump up into. maybe that would be overkill? And now I am realizing that if a mob was to fly, it would have to have location tied to the ground. hmmmmm Lets try just having the sprites be displaced from the collider ( so the image moves in animation but the collider stays put ). I think this makes sense. Other than missile attacks….. shit. Oh boy, two colliders? Why the heck not, right , I mean,…. I am not even sure that would work. How about we just go in that direction and hope it all works out for the best lol! HAHAHAHAHAHA So, lets do this beeeatcho machado ! First, the damn sprite. I hope this works lol front
side back Yeah, so …. a little distortion and a shadow?!////….. mmmmkay, lets see if it works lol A day goes by, and I am wondering if i might be doing this wrong. So just to recap, the issue is this: We want the player to jump. It is a 2d world, where everything is a flat image in the X and Y, and then there is some layering of images in the Z. If the flat image could jump, the change in Z wouldn’t really be seen. in fact, you wouldn’t see it. So the idea was to have the sprites image move/animate, keep the collider still as to not ‘bump’ into sprites to the north of the player, and probably create a DoubleZed variable holding the virtual Zed difference. So, mobs at ground level would be 1, and a jump would go to 2, and a bird could fly at 3-5 or higher…. things in the water and underground would be 0 or less. When I write it all out, it seems completely retarded, like I am overthinking something really simple. I do this a lot, hence my internal suspicion. The part of this I think I should change right now before implementing it in unity is not having the jump animation include a shadow, but instead, create a shadow in real time…. some way , some how…. maybe if using a light source and actual shadows, it might look really awesome. Or if anything else, it would be a object within the player object, that grows and shrinks depending on the jump height. Just frames, no shadow Ugh, just got the animation clips set up and then had unity crash, only to reboot and find I didn’t save . The clips are still there, just empty. Nothing quite like doing something twice. Okay, back to it. So when it crashed, the player woulden’t move, yet I hadn’t done anything in the code, only set up the animation clips for attacking and jumping. In my jumping animations, I had transform properties animated, which apparently is a no no if you are moving the player via other means. I think anyways. But this makes sense, and it is better. I am not sure what I was thinking. So, yeah, the script will control the jump – and this way we can turn the collider into a trigger while its in the air, which will be the solution for bumping into bad guys ( or untouchable blocks ) when jumping. I also don’t want to write a gravity script…. so, to use the Unity physics engine, we will turn on Gravity momentarily , take note of the jump off point, and when we reach it again, we will stop the player, nullify its velocity, turn off gravity , and make sure the player is where he jumped off from. Boom!
Two days later, and the player animates whilst attacking ( I think he is animated to shoot a bow, so reversing the motions kind of make him look like he punching – and then the weapon item can have a animation set, that should be able to append to the animation and play together – that is going to look crude as heck for the prototype ) and jumping!
attacks look good, jumping standing still or side to side is good, but jumping south and north??? not so much lolFocusing first on jumping north, we have to calculate where the ground is, or rather, where the shadow should be, minus the distance Y+ that is from jumping. I thought it would be as simple as the_ground = player_position.y – velocity.y if velocity.y is above zero. Close but no cigar. The shadow goes from bottom to the top of the screen with no real relation with the player, which ruins the illusion. So here, it works, pretty darn well, and honestly I have no idea what the #*@! is going on so now, jumping south. Basically, the shadow becomes the “landing” point, so going south was a bit of a challenge in the sense that the player doesn’t really show any kind of true movement, the shadow becomes the new “spot” to where the player is. So I simply make the shadow move to a certain point based on jump height ( a variable ) and then allow the player to “fall” ( in gravity ) to the shadow.
View the full article

davidkilmer

davidkilmer

 

A Brief Origin Story

“It’s a big idea, but we can do it.”
-Me, an optimistic idiot, paraphrased. Since 2014 I have had one night stands with programming and game development tutorials; only flirting with the journey of game development because committing to it meant work which significantly affected my privileged habits. Though I dreamt of doing so since youth, I never practiced the discipline required to do so. My responsibilities were and continue to be demanding as a husband and father, yet I believe something is better than nothing, and tortured myself over what could have been even with small portions of work. Summer 2018 was one such season; I loaded tutorials and thawed old ideas frozen in procrastination carbonite. I settled on a vision and got to work. By autumn I realized my insufficiencies meant an extensive timeline to accomplish all ideas in my large scope. I was going nowhere fast and considered giving up game development for good. Instead of following the advice of successful creators to simply narrow the scope, I banged my head against a wall I didn’t need to climb. Winter-ish 2019, I get a message: “I’m a dope programmer that can’t decide what game to make.”
-Dave, unsuspecting idiot, paraphrased. Dave and I became friends about 5 years ago when we worked together at a restaurant where we bonded as husbands, fathers, gamers, and other similarities. We’ve kept in touch since we left the restaurant now and again, but being in such a similar headspace still amazes me. He had the skill, but not the design.I pitched the idea, and God knows why but Dave agreed; a thrilling survival game set in the first era on a new world where you play as a primitive alone in the wilderness. It’s a ridiculous design for a first game. Every tutorial I watched preaches some iteration of “start small, learn, go bigger”. Perhaps if the prototype fails we’ll scale back, however this feels worthy of extra effort and delayed gratification. I believe with Dave’s and my talents combined, love from our family and friends, a God portioned miracle, and a little luck; we’ll have something worthy of your time that brings you joy. Or so we hope.
View the full article

davidkilmer

davidkilmer

 

My To-Do List

I was feeling a bit overwhelmed this last weekend, which is different. I knew that just getting to it would solve that feeling. And sure enough, here I am! So the player can now run and sprint via double and triple tap on the arrow keys. The spawner spawns the mobs in appropriate tiles, at mob_file set times AND the mobs move randomly, and if they are predators, will attack within eyesight of the player. Right now, collision is an attack on the player, where the player can attack a square in front of him. The intention here was to allow other weapons and what not to affect the reach of the players attack. So what next? A Notification System – so a way to deliver output to the user so they know what is going on as far as combat Jump – got to set the player to be able to jump, which will be great for avoiding fissures, and maybe bad guys, and maybe a different attack? Set Jakes Mobs – Jake has designed a few mobs, that need to be set and replacing the snakes, which was my idea just for testing. Items – mainly jakes designed items. Set Mobs to drop – they already have the vars in the mob_file, just need to implement it. Set Mob to avoid player – which is a feature I thought would make sense for huntable mobs that don’t really want to die. Like a deer. Set Mobs to hunt other mobs – this is a feature I thought would be nice to add a level of strategy for the player, may or may not be used. Set mobs to forage – which is something I thought would be cool for huntables, like a deer attracted to apple trees. Disasters – yes, I am trying to avoid working on inventory…. Want to add lightning to thunderstorms that could strike trees and start a fire, or even the player for instant death. Flash flooding that can remove camps. Earthquakes that can open fissures in the ground and start volcanoes. And I thought fog would be a cool subtle weather thing that could happen that would close up some visibility for the player, and finally a tornado that can displace mobs and the player and destroy camps. Regenerator – for regrowing trees after they are cut, and replacing anything over time ( maybe apples or berries after they are harvested ) Inventory – we need to have drag and drop be a thing. The builds list should give the option to build or not, instead of building on click. Arm items, use items ( like a potion ).
View the full article

davidkilmer

davidkilmer

 

Stuck on Setting Tiles in Run time

I am now stuck on why I can’t seem to change the tiles during run time, which is in theory, something that should be able to occur , but seems to be a little more difficult , or at least was at one point for people using the brand new Tilemap construct. So, it is now solved. Yeah, nothing a few hours of work will do at 3am. I noticed in the base terrain generator that even though I serialized the tilemaps and tilebases, I still loaded them in via GetComponant , which, gee, is starting to become a repeating factor in my issues. Yes, it only took a quick hour to figure this out, and all I did was put the highlighter in its own map and write the few lines of code, before I realized I wasn’t serializing the componants and instead loading them, it dawned on me, references that are passed between scripts will and can be blank. Sooooooo, either you are instantiating them, or loading them. Duh. Of course, the player might be an exception to this, and maybe other static objects. In this case, this game, the player is static. He can be loaded with the scene, since it is rogue like, there is really no point in loading him in ( which you would think is a good reason to not prefab the player object, but you would be mistaken there too…. i mean, what if you delete the object? ). The highlighter is showing the attack squares, the one the player is on and the one in front of him, since presumably, he is attacking unarmed.Now, back to the combat manager!
View the full article

davidkilmer

davidkilmer

 

Combat System Berth

So, the snakes are harmless, and there is a lot to be put into the system of predators, but they need to be able to attack, and ya know, the player can fight back. We must now place in the combat system, which i imagine will be a center point for all contact of combat type. Of course, my next question would be, where do I put it? For now, we will create another spine game object and let it gather the needed info. It will need the player and the spawn_controller. Somehow, I need to find the trigger between the two. And I need to think of how collisions of the main sprites will matter. For now, we will focus solely on deliberate attack, which means, only the player can kill them. I am learning that a system can be built to do just the most essential, and it is better to test and build upon from that point forward. Creating the object with the combat manager on their, this becomes an object that needs to be connected to other lists, inventory list so we can check for equipped items, and the active mob list so we can identify a target, if any, and then to do the math. Hence, why this is on its own. I have found that instantiated objects must find the components in the hierarchy, but these managers can exist from the start and therefore can have other components serialized . This does raise some questions about breakage occurring during testing and otherwise, no doubt someone will break a component by removing a serialized component, and all of sudden, something isn’t working right. SO that would be a good reason to have a constant manager be active in the hierarchy in the scene. When I was writing the code for the Item_Object, within the “as a weapon” section, I had thought about a variable for range of the weapon. I was thinking of using a bool list that would be in order of a 3×3 range of the player. This would only be for melee weapons. Each value of the list would represent weather or not the player would be able to reach that spot with its weapon. And then depending on the facing of the player, rotate that grid accordingly. Then check for mobs in the ‘danger zone’ . This makes me think about collision as well. Still not sure what we will do as far as collision is considered, but when I had the water tiles be collide-able , the players head would hit the water, preventing his feet from going to the edge of the tile. I think the solution for this is to change the collider to only be at their ‘feet’, or point of perceived contact with the ‘ground’. If the player is attacking facing downward, he might have more of a reach than attacking north, as he could hit a baddy that was halfway up a unreachable tile, yet his head was in a reachable one. Jesus, I am not even sure this is a good way of doing this ( using the tile grid at all ). Anything else seems like a lot of work for what we are trying to do atm. But we will have to revisit this in the future when development goes beyond a prototype. Anyways, for now, since we have no real weapon items, we are just going to do a single attack – since it is barehanded. In the midst of setting up the combat system, I decide that I want to the see the tiles that are being selected as attack zones, and though I do realize I did something wrong, and fixed it, I am no perplexed as to how I can change the tiles during run time. Simply setting the tile appears to not work, which is strange. Doing multiple google searches has shown that in the past, this may have been a issue . tilemaps are a fairly new class in Unity, so it is possible I am trying to make it do something it can’t really do, which would be a fine assumption until you see that the tilemap class has a function called settile, which takes an argument of vector and a tilebase, which would contain info to change the tile’s appearance. It is also possible that the way I am going about changing the tile is wrong, and somehow I am losing the reference to the tilemap. I reviewed the tilemap generator I made for the map, and there is no black magic or voodoo happening in their, and it is just making multiple calls to SetTile. The reference in combat manager is no different than that of generate_terrain, as it is just simply a serialized field…. so I am stumped. The player is successfully attacking though, so I am making head way on the combat manager, but since changing the tiles was something I was going to need to do at some point, I really need to figure this out first, before doing anything else. After many google searches, it seems as though I am doing something wrong ( of course ), as there are many pros on forums stating “yo, just set the tile, and send that tile via settile, and voila!” .
It
should
work
View the full article

davidkilmer

davidkilmer

 

Mobs and Spawning System

Yeah, I did say I was going to work on a few other things, but I was going to make the collector manager pick up items on the ground next,…. but what are we going to pick up? I will need to be able to allow the player to drop things from their inventory, but that sounds boring. And eventually we need to create the re-generator for agriculture to regrow trees, berries, and the such…. and set up the aux tile generator to throw in some good sticks and stones on the ground….. but yeah, boring, right? I think moving on to the next system and getting those foundations make more sense, and sounds more freaking fun, right? So lets do some predators and game, and of course, combat. Jake has done some work on designing the combat, so I got some notes on that, and he is in the works for mobs, so we are just going to make whatever, and skip animation for now. So, what the living hell do I need right now? OMG, I need another scriptable object, OH YEAH ——————————————————————————————————————– I got to admit, the slowness of developing a game is very hypnotic. Maybe cause that is how all programming is? no no, this is way more fun than a website lol

Anyways,. We have a snake, that spawns when a single condition is met ( X amount of certain tiles are present ) and within active times. And they move randomly .

The Mob object to contain all the base variables, which is then spawned by the mob_spawner, which is then controlled by its own prefab. SNAKES!!!!!!

View the full article

davidkilmer

davidkilmer

 

“building” system is good enough

So it took a bit, and I learned how to use the debugger for visual studio in order to find a infinite loop that was crashing unity. So thats awesome. The player can harvest, he can build, and I think that is good for now. There is a lot to be missing with the inventory panel, such as sorting the items ( drag and drop, moving around the items, seeing what a build option is before building it, etc,… ) but it is working, and for now, I think that is fine. Jake talked about wanting to have a crafting system similar to minecraft, which I love the idea, and so that means there would be a lot more to it than this. But I knew going into the inventory and GUI that I would be a bit challenged, and I was indeed. Most of the code ( 99%) is not a waste though, and adding a crafting system like minecraft would only require more code versus deleting any, so we are still on the right track. The collector manager needs to be able to pick stuff up as the player walks over it, and that will be a cinch compared to what I just did. Jake and I talked about having the player not be able to harvest wood with there bare hands though, and instead, maybe collecting an item like a few sticks and a axe shapped rock, or something like that, in order to harvest wood. essentially making this part of the game all that much more harder to deal with. The point of the game is to be hard, so this is perfectly nested in the tagline “survive until you die” versus minecraft’s “do whatever in this damn sandbox,…. oh, and survive” which gave more lend to the ability to take down a tree with your bare hands, you just had to hit it more times than with an axe. So the next stage, is to make the collector manager pick up items on the ground, which we should also make a tooltip like thing that will show a floating/rising message above the player for all kinds of things like “picked up a rock” and “picked up ____ meat ” or “can’t run do to exhaustion” etc,..
View the full article

davidkilmer

davidkilmer

 

Working on ‘building’

So the player can now harvest some wood, with his bare hands ( he is a mad man …. or she…it , even….. anyways) . And it shows up in the players inventory. So what to do with this wood? Well, how about make some sticks? This is where the “building_and_actions_manager” comes in. Of course, I named this file before really thinking about it, so for now, its just the building manager. Yes, my spaghetti is becoming more powerful, mwhaa ha ha ha. Currently, you can click on a item (wood) and it shows the sticks that you can build. you click on it, and…. viola!? …? it spawns one more unit of wood and… well, hell.
And then there is this freaking error
Finally got it subtracting the resources and adding the built item. Only problem now is the item list versus the display list. Once the wood is all used up for sticks, the slot that had wood becomes the old slot of sticks but still shows the next slot with sticks? and it crashed? WtF?

View the full article

davidkilmer

davidkilmer

 

Controllers and Machines

So its time to make this game actually start ticking. Well, I have actually been working on this part for a while, it seems, shooting from the hip, so to speak. Anyways. I have built a simple inventory panel, which will later show build options depending on inventory, clothing and armor, and player stats. Nothing is working as of yet.
I just now realized the inventory panel is casting shade on the ground LOL! Anyways, now we need to deal with what I will call the collector_manager . This script will react to picking things up ( say when a predator or a game leaves behind meat, or when the player leaves behind something like a resource or whatever ) which just goes straight to the inventory. Also for harvesting ( say chopping down wood, getting iron or coal from a mine, or harvesting wheat from crops etc,… ) and when dealing with inventory banks like a camp or….. well, a camp. Similar to the chest in minecraft. So here it goes…….First we got the collector manager to harvest wood, I added a timer indicator and a player state to the player script. We started the Item Object scriptable object , which will be the base of all items. I thought about having different scriptables for each type of item, but I think that by having one for all, they can be used as different types easier, since a stone could be a resource and a simple weapon as well. After a bit of some confusion, I got the dam thing working lol. Also, decided to start video logs of my work. Vlog intro! But it works now!
So next, I need to make the build manager. This is prompting quite a bit of thought on the inventory panel, and how it should look. Where should the build management be, and how it should look. We will refer to the panel as the player panel since it will obviously be displaying various things including the inventory of the player, the builds possible for the player, the players information, and wearable items such as armor and clothing and things that are equipped, like weapons. Of course I am not renaming anything right now, as it just seems to be getting more confusing at this point. Anyways, before I can set the build manager, I need to first be able to capture a click and decide how to handle it. So, lets get the click on a bundle of wood!
View the full article
 

Adding things….

This is where it gets tricky. In fact, if I blow something during this process, I could blow the whole project…. and that isn’t a positive thing Since this game is quite expansive , even in the prototype, I need this to be as modular as possible. I was originally thinking of creating scriptable objects, but now I am thinking of just creating the base prefabs, and then we could create variants and prefab those. So, lets think about the possible base ideas. Structures – lean-to , tent, cabin, fire, etc,….
Predators – monsters, dinosaurs, etc,…
Game – rabbits, bears, etc,….
Resources – wood, ore, twine/vines, rock, coal, bear meat, etc,….
Tools – traps, ax, saw, bucket, torch
Weapons – Spear, Sword, etc,…. I think that is it. The next part is actions which will definitely be a scriptable object. Things like Eating, Cooking, Building, Constructing, Farming Actions, etc,…. This will be quite easy, each object will contain the requirements, the time needed, and the outcome. The next part is the UI for these things. I am thinking we can have a bar at the bottom right which will contain items on hand (Resources, Tools, Weapons) and then can be expanded to see possible actions. Right above the collapsed item bar will be a prompt line for feedback such as “I can’t put that there” and “Go to sleep?” The first thing I need to figure out is the terrain and a way to interact with it. So as to be able to find which square we are on and react to it if needed. We dont want the player placing a tent or a fire on water and what not. Figured that out. For now, and this probably not the best way to do it, we can get the sprite names of the tiles we are on to find out what we are on. This makes me want to generate a better map. At least a base map. I think the best course of action is to create other maps on top of the base map for things like forest, tundra, canyons, mountains, volcano and flow, and maybe rivers? Part of me thinks we can use lines of the same value generated from a perlin. But it would have to be on a seperate tilemap and like the others, check to see if the base map allows it ( cant have forest growing in the oceans ). Now the maps are generated including octaves in the perlin noise. I sadly can’t seem to understand the concept of octaves, but it seems to be sampling from near by frequency of the same section of noise to give a more organic look versus the smooth look. If you increase the lacunarity , it begins to show the liquid look of perlin by itself. Again, I don’t really understand the math so its hard to explain exactly what I am doing. But it does look a lot cooler with it!
Before:
After:
Jake is working on UI concepts and the base interactive. I am going to attempt to add weather and natural disasters. Currently the weather controller is just using a rain particle system I found on unity asset store. Looks really cool, and adds some depth to the game, hopefully jake will like it too. I have gone back to trying to add a second tilemap to overlay the base one. So far, all I am getting is a big huge white field . Debugging shows I am cycling through the tiles, and everything seems to be in place, but both tilemaps are drawing just white tiles. After a lot of trial and error, and removing the code for the second tilemap, it appears as though the material I added to it to reflect the light is reflecting straight white. This was actually my first thought when both tilemaps were being drawn, but at least now I have the main map being shown again. Obviously, I don’t understand materials that well. So with the material removed, I am going to add the second tilemap. Boom! It works…. of course, it currently is not reflecting light so the land is glowing 24/7 , but the secondary tilemap works!
Aaaaaaand the graphics look like crap. There is five mountain, forest, and dead tree tiles. The graphics literally look like bird vomit. This opens up the idea of having deep water, lagoon/swamp, rivers, cliffs, etc,… and I think this map would be ideal to put user created items on – not positive on that as of yet, but I think that is how I will do this. Okay…. need to get the material back on the map. What is really annoying about this is when I first started doing the code for the second tilemap, it went completely white. I could tell it was working by muting the reflection material, but alas, i have spent seven hours over the last few days trying to figure out what went wrong. well….. there was a directional light i had set in the scene with a 1000 level intensity, originally intended to be a lightning flash…… problem solved *cursing in vulcan*
View the full article
 

Player is alive

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.
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.
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

View the full article
 

Building the map generator

I am still not sure how to do a infinite map, and more importantly, I am not sure how to limit loading to much map at once, except maybe only loading X tiles past the view port. If we were to allow more than one player in the same map, would each application have to load that map as well? I am not even sure its a feature, but I bet if we continue on to production, we are going to revisit that question. So first thing is first, setting up the first terrain map. The procedure for this is to load the map as a width per main types and length of interacting types. I found this huge ass tile map, which had a crap load of tiles mixing a few different land types in one. I think this will allow for a very elaborate map, but it will take time to add each interacting tile. I feel it will take a crap load of time, maybe not a shit ton, but enough to be substantial chunk. So for now, we will start off with only five types – top ( only ) row being the full tile of the base type. The map is generating in a somewhat descent way. Gonna have to tweak it later. Just a script that runs once on startup on the tilemap. Should be a whoot
View the full article
 

First steps

In my first project, I did half of the graphics, then went back and did more. This project has the intention of getting some better graphics in the future, so the ones for the prototype don’t have to be perfect, but I would like them to look a bit nice and be completely understandable . Since this project has a team, I think this time , I need to do a mock design of “screenshots” as to make sure we are on the same page as far as design. Just looking for graphics for the prototype is mind boggling. I am of course looking for free assets as I don’t want to spend money on them, not for a prototype. I found a really over complicated tile sheet for terrain, which made me think about the terrain generator. And no, I did not find any scripts or free assets in the unity store for terrain generation, so I am left on my own. When I was doing the first test, one thing I noticed right away was how the perlin noise would be very well connected in the tenths and hundredths – being a floating number from 0 to 1 , each consequent number is closely tied to the ones near. This means, you could have 1000 tiles that are related in the sheet, and have each one represented in the noise. Would that make it look cooler? hell if I know, but its worth trying out. I just now came across a very large tile sheet of somewhat descent graphics for the player, baddys, and objects. The only problem is they are not animated. I think I can manipulate them enough to make look somewhat descent in animation. If I am wrong, oh well…. its a freaking prototype. Anyways… I am going to set up some sheets and hopefully a few mocks , and a graphic for this dev blog.
View the full article
Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!