Well after a while of not developing the game at all, i’m finally back onto full throttle ahead progress (sounds cool!).
Anyways - My plan a week ago or so was to get started on the Artificial Intelligence, unfortunatly this kind of hasn’t gone as planned as i thought it would of.
I thought i may as well start doing the core optimizations now - Getting as much optimization out of it as i can at the moment, and also take my time altering the tile picking algorithm to work a bit better in game.
I can happily say that both of these tasks where a great success!
It has taken me a few days to finally figure out, i was getting preeeeetty damn pissed off - Then today it just appeared in my head, the solution. I kinda hate that, but then i guess it puts an edge on programming, plus the fact that my mathematics is completely shite haha.
For the core optimization i basically had to try and figure out how i can reduce the tiles visible on screen as low as i possibly could, all the possibilities i tried where not to my liking, and i would always end up with this cropped part of the map, displayed in isometric format. So a cropped diamond. It looked terrible i have to admit, so i ploughed on to find something that didn’t feel like a slap in the face when you load it up.
It now doesn’t display in that typical “isometric” diamond cropped map, but rather fullscreen kind of, there is a slightoffset at the moment - But that’s for debug purposes of course, after i will set it so it fully fills your screen!
I’m quite happy with the result of all this and now that honestly leave me with nothing left (yet) to begin working on, other than starting the Artificial Intelligence! yaaaay.
Just to brag anyway, i managed to reduce the amount of tiles loaded at any given time from
From: 3461 (Above ground) To: 1127 (Above Ground)
From: 4500 (Below Ground) To: 3780 (Below Ground)
I think thats a big jump anyway - The perfomance is running smooth on my computer, dread to think all those entities being drawn at once on a shitty computer.
Oh well - I have an idea how i can reduce them even further, but that can wait!
So over the next few days you can expect more AI updates rather than usual terrain generation logs.
Over and out!
Another update? Oh go on then…
I’ve ended up changing the transition from dirt to stone to look alot more natural, now fading from dirt to stone more slowly, in my opinion it looks better.
I’ve also added a new block type, Small Rock! Yes you’ve guessed it, yet again probably used for decoration and crafting. It looks nice! (See attatched image).
After playing around with the map sizes going really small, really large and trying on different browsers, i eventually got fed up and added a simple bit of code that automatically centers the viewport onto the center of the map.
We now have Tilepicking in the engine! Thank god, this has taken me a good while to setup, simply because for me the maths is a nightmare to do, its still a bit buggy but it works mostly as it should do, it also has support for the level height - That was a bit of a nightmare to do haha, also - For some reason, displaying one more block (the tile picking block), apparently eats away at the framerate for some reason. I’m going to have to take a look at what on earths going on, but that can wait.
In Chrome i’m still on a steady FPS of 30 :). Awesome, remember all this is being rendered in the browser, i’m really happy with the progress and what i’ve been able to ahcieve so far, just in canvas alone with this project.
Off to start with the Artificial Intelligence, adding the basic Villagers/people who wonder around in the game.
This is going to be fun! :D
Ps, feel free to ask any questions about the game!
Well - For needing to experiment alot more on how the map generation differs, between each seed, i changed the way they are loaded in, currently there is a 6-7 digit number (It is generated randomly), that is fed into the main noise map that deals with the terrain generation and ore generation ect. The main stuffs.
I then half that seed number and use that in the second noise map that is used for level detail (Mostly above ground for now), things like trees placement, flowers placement and a few more in the future.
Oh yes, i also added 2 new block types, flowers, red and yellow. Currently the yellow flower is more common than the red flower, like just under double? It was a bug originally, but i like it that way, it allows me to think of a few more things i can do with the red flowers, that you can’t with the yellow.
Now i want to work on creating a one or two new block types, mainly for decoration above ground, and would be used for the crafting feature.
I have not created “Crafting” - Yet. And hopefully will be able to code it over the next week and create a post detailing how it would work. I think before that though i will need to implement basic AI for the villagers/people of the game first though.
The game progress is going great, my pile of coursework however is just getting higher and higher, so i suppose i best take a break and blitz through that and come back to the game later on!
Well today was a very productive day programming the web-based RPG, me and the new(ish) developer Jan decided it’d be pretty great if we add more AI aspects into the game (regarding artificial intelligence on NPC’s), so today was pretty huge, although we only implented some of the basics, they are there now. We added dynamic NPC movement (Without the need of a server!) aswell as cross-animation for every event, meaning if something updates in the database, it will find it, update it’s position, animate it and do whatever else it needs to with it also.
So i think it’s been a pretty good day today! Although i must say, never again, maths isn’t my strong point (HAH), and it certanly shows doing things like this.
Also a big thanks to our developer, Jan!
Also have to apollogise for the lack of proper english sometimes, i usually end up posting these blog posts at like 2am, woops!