GreenSlimeGames http://blog.greenslimegames.com Indie Developer seeks world domination Tue, 14 Aug 2018 18:04:15 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.20 16007614 Farming in Fringe Planet http://blog.greenslimegames.com/2018/08/14/farming-in-fringe-planet/ http://blog.greenslimegames.com/2018/08/14/farming-in-fringe-planet/#respond Tue, 14 Aug 2018 18:02:29 +0000 http://blog.greenslimegames.com/?p=1151 Farming in Fringe Planet

Hi folks, I’m fairly busy with Fringe Planet – the game is coming along really nicely ๐Ÿ™‚ I’ve got a bunch of really interesting ideas for the green slime games blog, but currently all my blogging is going on at the Fringe Planet development blog! Here are a couple of useful links:

Please feel free to check them out, and let me know what you think!

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2018/08/14/farming-in-fringe-planet/feed/ 0 1151
Storing 3 dimensional data in a 2 dimensional format http://blog.greenslimegames.com/2018/05/14/storing-3-dimensional-data-in-a-2-dimensional-format/ http://blog.greenslimegames.com/2018/05/14/storing-3-dimensional-data-in-a-2-dimensional-format/#respond Mon, 14 May 2018 15:51:16 +0000 http://blog.greenslimegames.com/?p=1137 Hey everyone!

I’ve had few questions about how I store 3d shapes inside a 2d texture. Or in other words, how do I turn this :

Into this:

Let me preface this by saying that all structures are contained in a 32x32x32 voxel cube – I’ll explain the reason for this later.

So where do we start? Let’s look at a graphics file. My method of storing data uses a PNG file, and the reason for this is simple – every pixel has four channels associated with it. A red, green, blue and alpha channel. Each of these channels can contain a value from 0 to 255. Depending on these numbers, the pixel will be a different colour (or transparency). So that is already a fair chunk of data that can be held in single pixel – but how can we use these pixels to actually store 2d data?

Well, it is easy to imagine how to store 2d data in a picture :

Now one solution to this problem would be to have slices of 3d data, each one over laid onto the other. And this would look something like this :

However, I didn’t want to use that approach – it works, but seems clunky to me. So I decided to go in a different direction. There are four whole channels per pixel to play around with, so it seems like a sub-optimal solution not to use them all.

So, a tiny bit of maths. Let’s look at the number 255 in binary:

11111111

Well, that was exciting ๐Ÿ™‚

Let us imagine the lightest pixel in the universe, where all the channels are set to 255 – pure blinding white with no transparency, it would look like this:

r(255) , g(255), b(255), a(255)

Now if we translate this into binary (and this is the most important part) we get the following:

11111111 11111111 11111111 11111111

Now lets imagine the most pathetic of all pixels, where all the channels are set to 0

r(0), g(0), b(0), a(0)

And if we convert that to binary, unsurprisingly we get four sets of zeros:

00000000 00000000 00000000 00000000

Hmmm, lets try something else, let us imagine a light grey which is kinda transparent.:

r(170), g(170), b(170), a(170)

Translating that into binary, we get the following:

10101010 10101010 10101010 10101010

Now wait a second! what if we represented empty space as a 0 and a voxel as a 1? Suddenly, BOOM, you have a data structure that can hold what voxels are occupied in a row. And this is in one pixel – so if a I have a 2D set of different colours that represent different rows of voxels, I have 3d data in a 2d image! This is why I take things in a 32x32x32 cube – everything meshes together to make a nice optimal solution!

Now this is not an old trick ( the BBC used a similar idea to hold level data in hex values – I wrote about it here many years ago ). But it does mean that you can store 3d data in a png file. There are a couple of additional things that I do. Firstly you will see that though the width of the file is a sensible number, the height is 33. This is because I use the last row (or the first row depending on your conventions – I don’t judge!) to hold material data. The very first pixel on this row is the index I use to represent an empty voxel, and the first mini image is used as a checksum – it is the empty space in and around the 32x32x32 cube. If I find any of the subsequent images trying to write in that area, I know something has gone horribly horribly wrong. The second and other pixels in that row are used to indicate what material the voxel I’m placing in each one should be (earth, copper, lavarite etc; ). Once I’ve gone through this row, I know how many images I’m going to need to process, and perform a quick check sum to make sure that I have the same number of mini images as I do last row pixels.

And that, my friends, is how you can store 3d information in a 2d picture ๐Ÿ™‚

A quick confession however – the image at the top of this blog post actually has the alpha channel removed – because otherwise when your browser tries to display it, it will look like this :

But assuming wordpress hasn’t done anything to garble the image – you should be able to download it, open it up in a graphics editor of your choice and see the invisible pixels ๐Ÿ™‚

If you have any questions or comments feel free to use the box below, or hit me up on twitter. Hope you have a fantastic day!

Nic Nic

Share

]]>
http://blog.greenslimegames.com/2018/05/14/storing-3-dimensional-data-in-a-2-dimensional-format/feed/ 0 1137
Guess who is back? A small life update http://blog.greenslimegames.com/2018/03/26/guess-who-is-back-a-small-life-update/ http://blog.greenslimegames.com/2018/03/26/guess-who-is-back-a-small-life-update/#respond Mon, 26 Mar 2018 10:59:02 +0000 http://blog.greenslimegames.com/?p=1122 So obligatory: it’s been a while since I’ve posted/spammed the interwebs with my random musings.ย Life sometimes gets a tiny bit crazy. However, I’m back now with a small update with what is new with my life.

At the end of last year, I lost my job (boo! hisss!) – and after the initial shock it suddenly occurred to me – I was in a financial position that would allow me to focus on my real passion, game development (yay!).ย I sat down in a dark, candle lit room and started drafting down ideas: gameplay concepts, themes, badly drawn stick figures doing things to each with weapons of mass destruction.ย  That kind of thing.

And from those scribbles an idea started to solidify. I’ve always loved simulation games, a hobby that started many, many moons ago with SimEarth. Since then, I’ve played a lot of them: RimWorld, Dwarf Fortress and Prison Architect, to name a few. I dread to think how much time I’ve spent commanding virtual people to build/slaughter things [edit: I just checked my steam stats for RimWorld and Prison Architect and can confirm I’ve spent *way* too long playing both].ย There is something supremely satisfying watching your people work with blue prints you create in order to build something magnificent. Seeing how they interact with each other, watching behaviours and friendships form. Poking one place in a simulated world and watching something happen. Slowly, but surely, FringePlanet started to take shape.

Concept Artwork
Fringe Planet is a simulator game. It’s set in a universe where both science and magic co-exist. It’s heavily voxel inspired. It has quite the grand road plan (which will be appearing on it’s homepage: http://fringeplanetgame.com). It’s aimed at the single player PC market place (via steam) but a Mac/Linux version is fairly high on the priority list as well.

It has been under development for about three months now, and I’ve got to the point where it has actually started to look and feel like a game.ย That re-assuring feeling you get when you’ve taken an idea, written a bunch of code, and got it into a playable state and a little voice in your head actually says “wait, this is actually really fun”.

So, I then took the next big step, and formed my own company. I’m a director of a company now – it’s a bit weird thinking about the reality of that. I even had to record the official minutes of the meeting where the company was formed. Attendance of which consisted of the Director of the company (me), the shareholder of the company (me), the secretary of the company (me) and the company mascots (my cats – though they were busy playing at the time so may not have been paying that much attention).

I’veย  applied for funding from various sources, and will be blogging about that process in the future – alas, my funds are not infinite and the earliest realistic release date for FringePlanet will be early next year (though I am planning to run a private alpha before that).

I’ve got into a regular schedule of development work: Mondays are “code clean up” days – refactoring code, documenting things, cleaning up any debug code, fixing any bugs that occur during the daily play through. Wednesdays are “idea” days – fleshing out game mechanics, working on specific implementations. Saturdays are “eye candy” days – making things look prettier, creating textures/models etc;.ย  Every night after I finish work I create a daily build of the game. I’m using a raspberry pi powered GitLab for version control (it’s even got a speaker attached to it and it plays a fanfare whenever I push). Working on Fringe Planet has very much become my life.

I’ll be blogging about both the game and the journey, and of course, spamming twitter randomly about it – GreenSlimeGames.com will be my personal blog about the journey, professional type blog posts/news about the game will be on FringePlanetGame.com.

This is all a very definitely scary process – biting the bullet and making game development my full time job – but it is the most satisfied I’ve felt in my life.

Gameplay image

Nic Nic

Share

]]>
http://blog.greenslimegames.com/2018/03/26/guess-who-is-back-a-small-life-update/feed/ 0 1122
LowRezJam โ€“ Report 14 http://blog.greenslimegames.com/2014/05/17/lowrezjam-report-14/ http://blog.greenslimegames.com/2014/05/17/lowrezjam-report-14/#respond Sat, 17 May 2014 20:37:44 +0000 http://blog.greenslimegames.com/?p=1114 GUI for harvesters

Just a quick update for today, as rather busy with rl alas.ย  Harvester’s now have a gui when you right click them.ย  This was primarily because every time I accidentally right clicked ( and called a flying ship ) on accident on them ( when I was trying to move them ) –ย  I was getting annoyed.ย  So now a menu appears.ย  You will also notice you can fix harvesters.ย  The small black pixels on the animation are meant to represent the crew getting out and fixing it.ย  The amount fixed is random, but will have a set a cost ( it is free at the moment ).ย  More experienced crews will have a higher chance of fixing damage – there is a harvester upgrade system now in place, but it has no gui, so you will just have to wait for that ๐Ÿ™‚

Tiny people fixing the harvester

Once the harvester experience system is in place, I think I’m going to move onto the hardest part … base building ๐Ÿ™‚

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/17/lowrezjam-report-14/feed/ 0 1114
LowRezJam โ€“ Report 13 http://blog.greenslimegames.com/2014/05/16/lowrezjam-report-13/ http://blog.greenslimegames.com/2014/05/16/lowrezjam-report-13/#respond Fri, 16 May 2014 22:20:13 +0000 http://blog.greenslimegames.com/?p=1107 Sand falling across the DunesA bunch of small bugs fixed today.ย  And added some performance tweaking for when things that are not in screen – all boring and can’t show you anything as the tweaks are inherently invisible ๐Ÿ™‚ย  So what did I add that was visible?ย  well firstly a new environmental effect.ย  Sand is blown randomly around the screen.ย  I’m not sure if I like it or not – even though there is a wind that changes randomly to determine spawn rates of sand particles – it does just look like a drawing bug.ย  If I can get dunes looking nice and 3d it may work nicely – but not very into it at the moment – let me know what you think ๐Ÿ™‚ย  Second thing I can show you is “Orange Blows”.ย  Basically a concentration of orange is produced and grows … gradually this Orange Pre-Mass gets to a point where if a harvester travels over it, it will explode, spreading orange everywhere!

Orange explodes!

As you can see the harvester takes damage whenever this happens, but it means that there is more orange to harvest.ย  The orange must flow! ๐Ÿ™‚ย  I manually spawned these lumps in, they actually occur ‘naturally’ when there is less than 40% of the orange to mine.ย  They can spawn anywhere, and don’t appear on the minimap – so it is worthwhile to seek them, as your harvester can mine even when you think all the orange is gone ๐Ÿ™‚

RL photos do not make good pixel art :/

^^ WIP adviser – which shows that scaling 32×32 rl pictures really doesn’t make for good artwork … I’m also working on the title screen atm, as think I have finally decided on a name ๐Ÿ™‚

And what cliched title am I going to use with opening? :)Must be a reason for such a huge star-field ๐Ÿ™‚

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/16/lowrezjam-report-13/feed/ 0 1107
LowRezJam โ€“ Report 12 http://blog.greenslimegames.com/2014/05/15/lowrezjam-report-12/ http://blog.greenslimegames.com/2014/05/15/lowrezjam-report-12/#respond Thu, 15 May 2014 21:38:26 +0000 http://blog.greenslimegames.com/?p=1088 [Lots of animated GIFs today, page may be slow to load]

Yay! Minimap!

 

So today I added a minimap ๐Ÿ™‚ย  It shows harvesters, carrying ships and worms.ย  The world is huge compared to the viewport ( 1000×1000 vs 32×32 ) so I needed a way to navigate around it.ย  The minimap helps towards this.ย  The dark green represents where you are viewing in the world.ย  The blue are harvester; the cool thing about that is the harvesters flash between two different blues to show they are harvesting.ย  If they ain’t flashing you either need to call in a carrying ship, or move them to some orange to harvest.

The map doesn’t consume the total screen on purpose … you can still move the camera around on it and see how you are moving, the one pixel hint helps in deciding location :).ย  Grey represents the giant carrying ship, it is now spawned at your base rather than near the harvester.ย  Now when you right click on the harvester –ย  it makes its way to the harvester, picking it up, taking it to base, getting some funds then returning it.ย  The flashing purple light is dropped to show where a harvester is picked up from :

this isn't about dune, honest ;)

After playing around with the minimap and moving around, I decided I needed a way to move faster.ย  Navigation is done with the arrow keys atm, holding shift moves you five pixels instead of one – which makes a huge speed increase :

zoooooooooooom :)

The rapid movement caused is by holding shift while moving arrow keys, slow movement is just arrow keys.ย  And that is about all for now.ย  Adding a minimap actually helped with debugging:ย  I noticed harvesters stopped harvesting when off screen, due to a miscalculation based upon location.ย  So this really helped with that.ย  That is all for now folks ๐Ÿ™‚

 

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/15/lowrezjam-report-12/feed/ 0 1088
LowRezJam โ€“ Report 11 http://blog.greenslimegames.com/2014/05/14/lowrezjam-report-11/ http://blog.greenslimegames.com/2014/05/14/lowrezjam-report-11/#respond Wed, 14 May 2014 20:29:14 +0000 http://blog.greenslimegames.com/?p=1083  

Y U GO SO BLURRY?

Wow, pretty much a wasted day spent pixel arting.ย  And it still looks pants.ย  But anway, yes, today I spent all my dev time trying to get the pickup and drop harvester animation looking a little better.ย  It’s pretty tricky to say the least.

My eyes!

I’ve played around with lifting the harvester from the ground to the flying ship – it looks a lot better ( as no blurry pixels ) however, this really doesn’t show what I want it too, but does look better, artistic vision vsย  actual drawing skills debate I guess ๐Ÿ™‚ย  I’m going to shelve this for tomorrow, and just leave it as is for now, otherwise will spend a lot of dev tweaking something that really doesn’t make that much difference to the game.ย  There is a lot left to do and the time is rapidly vanishing … d’oh.

One of the things I want to work on is a minimap – showing where about in the 5000×5000 pixel world your harvesters are located in – on a 32×32 screen.ย  Should be, errm, interesting ๐Ÿ™‚

 

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/14/lowrezjam-report-11/feed/ 0 1083
LowRezJam โ€“ Report 10 http://blog.greenslimegames.com/2014/05/12/lowrezjam-report-10/ http://blog.greenslimegames.com/2014/05/12/lowrezjam-report-10/#respond Mon, 12 May 2014 21:05:16 +0000 http://blog.greenslimegames.com/?p=1078 Collecting the harvesters

Not a long post today, as I’m up very early tomorrow, so must sleep and dream up more gamedev ideas ๐Ÿ™‚ย  The above is a complete system whose animation is very very very much a work in progress.ย  Honestly, its terrible, I may have bitten off more than I can chew artistically ๐Ÿ™‚ย  The right click to sell was always a temporary mechanic, this is much more of a fleshed out system.ย  On right click your harvester summons a giant flying ship to come and pick it up.ย  It’s currently spawned just off screen, but this carrying flying ship is designed to come from a home base – which will come later.ย  It picks up your harvester and flies it off screen, and the harvesters tank is emptied, and funds given.

It then returns to were the harvester requested pick up, and plonks the harvester back on the dunes.ย  Requesting a pickup ( with a right click ) causes the harvester to stop everything, which may be useful if a worm is nearby ๐Ÿ™‚ย  The blood splat is being used a debugging system here, I’m going to change it to a flashing beacon.

Just a heads up – there won’t be a post tomorrow due to real life commitments, but the work shall be continuing ๐Ÿ™‚

And one last thing : a massive massive thank you to all my twitter followers : I’m getting a lot of re-tweets and favourites and feedback.ย  I love it.ย  It really helps keep me motivated – seeing that my work is being noticed and appreciated is really what keeps any indie going and you guys and girls are great at it!

 

It's like seeing a car crash ...

[WIP! Honest! I mean it! Don’t judge meeeee!]

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/12/lowrezjam-report-10/feed/ 0 1078
LowRezJam – Report 9 http://blog.greenslimegames.com/2014/05/11/lowrezjam-report-9/ http://blog.greenslimegames.com/2014/05/11/lowrezjam-report-9/#respond Sun, 11 May 2014 21:25:31 +0000 http://blog.greenslimegames.com/?p=1065 So much new stuff :)
Today’s Progress Report : I added two extra pixels to the health bar

 

Na, that would have been a lazy day. I’ve added quite a bit of stuff ๐Ÿ™‚ There are two extra pixels on the healthbar now, but that’s only because I’ve been busy destroying hundreds of harvesters ๐Ÿ™‚ First one was a bit of a boring update : troopers are now a lot more sensible in selecting harvesters to shoot at. And they don’t scan the entire planet for harvesters. And if they don’t see a harvester for a while, they take a nap for 10 seconds so they don’t hog all that precious CPU. They will always move toward the closest harvester and shoot the closest harvester, changing targets if the situation changes :

Must kill nearest harvester!

Secondly, worms now actively track harvesters. But *ONLY* when they are harvesting. As long as they are not collecting the orange, the worms will not seek harvesters out. However, if a harvester hits wormsign even when not harvesting, it will take damage. These small worms cause a lot of damage, fairly quickly – if you are harvesting, it is very advisable to move your harvester off the orange field quickly :

Micro :)

Here, the worm starts moving toward the harvester as it’s grabbing the orange. I manually give the harvester an order by right clicking to move it off onto normal sand – therefore stopping it harvesting. The worm moves off randomly, now uninterested in the harvester. Until I move it back onto the orange field. Then the worm attacks suddenly.

And the final thing I’ve added, well, I’ll just show you the GIF

Nom nom nom

Yes that is correct. The worms can swallow troopers whole. The larger worms ( remember these are the small ones ) will be able to do that as well … to harvesters ๐Ÿ˜‰ Still a WIP animation, but fairly happy with how it looks – I feel the shadow really helps adds to the depth of the game.

Ugly but workable

Oh and finally fixed the healthbars – I shall leave you with a gif of a bunch of troopers attacking a harvester with its health bar rapidly shrinking ( the pause is the example of all the troopers sleeping at the same time … zZzZzZz ๐Ÿ™‚ )

zzzzzzzzzzz

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/11/lowrezjam-report-9/feed/ 0 1065
LowRezJam – Report 8 http://blog.greenslimegames.com/2014/05/10/lowrezjam-report-8/ http://blog.greenslimegames.com/2014/05/10/lowrezjam-report-8/#respond Sat, 10 May 2014 23:34:50 +0000 http://blog.greenslimegames.com/?p=1056 The battle for the sands ...[This may take a while to download, but worth it]

 

Today, I spent my time finding ways of killing harvesters. Only one has been completed so far.ย  Troopers damage now works correctly and can destroy a harvester!ย  yay ๐Ÿ™‚ !ย  I’ve also updated the trooper AI a little bit, so they path around each other in a bit more of a sensible fashion.ย  The trooper bullets just originate from the middle of their sprites at the moment – once I have the trooper sprites finalized I actually want the bullets to come out of the end of their guns ( which are supposed to be some sort of shoulder mounted weapon – the sprites have so few pixels it is quite hard to tell ).

I’ve also sped up the search algorithm for the harvesters, still a four second delay but internally its a much faster way of doing things, as I started to see some frame rate drop on my mass harvester tests.ย  This was mostly due to the reason I was running Age of Mythology – Extended Edition a lot of the time in the background.ย  Excellent game and hitting my nostalgia pleasure centers rather hard ๐Ÿ™‚

 

hehehe

Though harvesters are not totally defenseless; as seen above they can now run over troopers.ย  Again, the spawning is a little off, as I’ve not finalized the trooper sprite, but it is rather satisfying to run over a large group of troopers as they shoot at you.ย  I’m wondering if I should be nice and give them some AI to run away if it is clear a harvester is going to hit them.ย  But then I remember it is far to much fun to run them all over ๐Ÿ™‚

O:-)

 

 

 

 

 

 

lamentconfig

Share

]]>
http://blog.greenslimegames.com/2014/05/10/lowrezjam-report-8/feed/ 0 1056