About this blog
Development blog of my 2D sandbox game
Entries in this blog
Spent some time yesterday doing updates to the shops, they now appear dark when closed and also have a nice light that comes on outside too.
Creatures passing the shops comment whether shop is open and if so, they may possibly go in - at the moment this is done randomly until I come up with some
attributes for the creatures as to why it may enter a particular shop.
Some more gfx updates also on the blocks, see what you think.
Showing the many creature tab you can spawn:
The new blocks and one shop appears to be open while another is shut:
Shop closed showing light on outside:
Well today, I had a little bit of time so I've updated the shop object - they now have opening and closing times, who the shop keeper is and items they sell. If the shop is closed it is drawn darker than normal, although you
can click on it and will be told so. Creatures that walk past shops sometimes show speech bubbles about the shop and at the moment I'm implementing letting them actually go inside the shop.
The speech bubble class allows you to set a delay of when bubble disappears, the text you want in it, work very well. Going to use them to allow the creatures to do some conversations - they may say hello, stuff like that
and I've now added a list object in the creature main abstract class where now creatures have a list of friends, if they see these, they will use the speech bubbles to talk to them :-)
Added night/day cycle to work with the game time - the game time is 1 minute is 1 hour, works very well, creatures also age against the night/day cycle adding to the realism.
Lastly today i added dynamic weather, so it may rain, snow or be dry for random periods of time, seems to work ok.
Next up is to do the inside of the shops...still thinking of how this should look, want it to show any creatures that could be inside as well as shop keeper.
Happy coding til next time.
I've finally added some shops to the game, at the moment I have petshop, armour and a weapon shop. Each shop when double clicked on opens an inside view of the shop with the items that can be bought. All the shops
are randomly generated within the world and even the shop keepers are. I created a nice building factory class this process and it works very well.
Also added another 50 blocks and some decorations (furnitute).
I am next working on allowing some flood fill when building for speeding up the building process and also be adding some scenery to the underworld to make it more pleasant on the eye.
Please visit my website for further updates.
Added some procedural hill biomes today, not sure what to do with them as of yet but do think they make the landscape a little more interesting...
Looking at adding shops to the land at some point this week, should be interesting, quite looking forward to coding this up. Each shop will have a random character
serving in them, when you enter the shop I possibly will open a zoomed in version of it where you can then browse the goods for sale, may even let you kill the character in
the shop and just take everything!
Major overhaul on the gfx resolutions - looks a lot better now.
Also added more attributes to creatures (pet, swim, life span...)
My website has also been updated showing latest screen shots and latest video (please go see!)
Will be working on vehicles this coming week and teleportation...
Added a couple different light torches that can be used, these emit different coloured lights, looks ok, not perfect but for now with time running low I think it is pretty good.
Maybe in time the lights will emit more than others and shine brighter.
Also added crops and food to the outside land, these are randomly added depending on how difficult the world is, thus, if hard world, not as much crop/food can be easily found.
Treasure chests have also been placed within the world, each chest is of a certain type and has certain items within them, the deeper down in the underworld they are, the more items will be in them - kind of makes it worthwhile digging deeper and deeper.
Now going to look at allowing the creatures to potentially pick up food depending on how hungry they are - they also need to eat in order to survive...
Was watching a video last night on twitch of terraria, unbelievable how this game has come on since it first came out, I just wished I had some devs to help me with my game to get it near this standard, sometimes makes you get a little dispondant and makes you think 'how can I compete with this?', anybody else get this feeling some times?
Just implemented life spans for the various creatures in the game. Each creature have their own attributes such as health, age, aggression, if the can drive vehicles, if they can be pets etc. What I've done is to make them get older, thus their age changes which can be viewed when clicking on a creature. The age increments in line with a day/night cycle and when the said creature reaches a certain age, they pass on. Now, this certain age I've set for the various different types of creatures, thus rabbits don't live as long as crocodiles for instance. I'm thinking of making all this customizable at some point allowing the player to change attributes of each creature.
Looking at implementing some visuals to show the different aging of the creatures today if have time and then adding more dangerous creatures to the lower levels of the underworld in the game...
The Sentry cops will always shoot at the player if they see him, otherwise they have a chance of shooting at any of the creatures
on the land, kind of adds more personality to the Sentry cop (makes them very nasty characters!). Was wondering if I maybe should only allow them to shoot at certain creatures? This is simple to implement but not sure as of yet if I want to do that. The creatures who are being shot at have a flag as one of their properties which when being targeted gets set, meaning they need to try and move quicker to avoid being shot!
All in all, happy it is working. Next is possibly to put in the age attribute of the creatures and visually show this happening too!
Please follow the website for Project Life at: http://www.sdggames.net
Finally got the shooting in on bad guys such as Sentry Cops - these basically fly around and if they see you they open fire, at the moment they have an infinite amount of bullets but this could change...
Added some simple math so the cops target player, something like:angleToPlayer = Math.atan2(Math.abs(y-ty), Math.abs(x-tx));xVel = (float) ((speed) * Math.cos(angleToPlayer));yVel = (float) ((speed) * Math.sin(angleToPlayer));
Of course, more work is needed dependent on which bad guy is shooting, some will fire quicker, others slower, different types of bullets too.
I'm also thinking of allowing some of the flying shooting bad guys shoot other creatures on the ground just for the fun of it...
I've also added an age attribute to the creatures, the older they are, the slower they will move, their jump height will become less, their eye sight will also become worse (eye sight is used in my line of sight). I really want the world in the game to just evolve, making it more and more realistic is what I'm attempting.
I'm hoping to do an early access release via steam Feb 2017, hoping to get some support from here ;-)
Screen shot showing sentry cops firing a simple red bullet in the direction of the player, again, they only do this if they can see the player, so better hide!
Til the next blog, keep developing!
Just been optimising the code today in the little time I've had. A lot of the code was sloppy so simple to make more efficient. Started to implement the AI for one of the enemies in the game, this is named SentryCop (see image), his job is to fly around and shoot at anything that moves which includes the player. This was quite easy to do due to polymorphism and my use of generic classes. Got the sentrycop flying on a simple sine wave, got it to target various creatures/player on ground and fire! Not fully implemented yet but not bad for an hours work.
My top level creature class does implement line of sight using ray casting, this makes the creatures seem a bit more intelligent when chasing you (only aggressive creatures do this) , if they can't see you they slow down :-)
When sentrycop AI completed, the next on the list in no particular order (a mixed up list!):
Teleportation - Add teleporter, this needs connecting to another teleporter to work
UFO's - drop aliens, aliens move possibly shoot creatures and player - if kill alien, alien drops random weapon
Add random treasure blocks
Random name generator for creatures
Random attribute generator for creatures
Lift shafts - move up and down tunnels
Bomb weapon - throw and blows up blocks around it
Decoration objects, plants that grow very very slowly
Mobs who cannot swim and fall in water there energy should go down...
I also got some pictures printed out today at my local Boots shop of the game, they look really nice, really want to do some canvas large ones very soon...
Off to do some coding...
Oh, the sentrycop:
I've decided to put a blog together for my game I've been working on for around 10 months on and off (time permitting). The game is around 65% completed and I am hoping to have it completed February 2017.
The game is a 2d survival sandbox game where the landscape is generated procedurally and can be extremely large. The outside landscape contains trees, shrubs, grass, many, many creatures, ufo's which drop down aliens who are to be avoided, planets, vehicles such as rockets which can be entered and maneuvered (even the creatures may enter them!). You can build to your hearts content with the many, many building blocks that can be sought throughout the land and the caves below. At the moment I have around 200 blocks to build with which I'm hoping will get to around 500 by time of release with over 150 decoration items, there are over 100 creatures which inhabit the game (many with different AI such as being able to swim, drive, fly, attack, become pets). The game features dynamic lighting, dynamic water flow, many hidden treasures, dynamic plant/tree growth, dynamic weather, day/night cycles and plans for lots more such as lift shafts, teleportation, ability to drive ufo's to other planets, make friends of creatures as well as enemies and more!
I've attached a few screen shots and hope you like, the development of the game as all been written by myself with graphics being purchased as assets. Game is written using Java 8 and LibGdx as the graphics engine.
Today as I've a little time I will be adding some AI to the flying objects - these will hover around and if they are set to aggressive they will fire at the player and creatures they don't like. Then next on the list is allow the many creatures in the game to have their attributes edited, such as their health, aggression, damage, if they can swim, if they can drive etc.., this will allow the game to be customisable in some way.
Showing creature attributes when clicked on: