Monday, August 19, 2013

Delay!!!

Very sorry I guess I should have posted this before going to my 3 week training event! Anyway I have been on a 3 week hiatus and am just getting ready to post my first daily update hopefully tomorrow! 

There have been some changes in design, most of what I have done so far has been creating a game object/component structure for my game engine and creating an editor.

I'm basing almost all of my game engine/editor on Unity with the exception of only allowing 2D games.

Stay tuned for a nice post on all the details!

Wednesday, July 24, 2013

Day # 4 Dev Blog

Animations!!!

I got some very preliminary animations added to the game. I still need to do some work on loading performance as I want to be able to instance lots of the same objects, but only store one set of data. It's on the list of things to figure out. It did take me awhile to figure out how to scale Spine animations to my world. Turns out it was as easy as setting a scale value when loading. Still have a ton to do on this, but it's nice seeing something other then pink tiles. The best thing about Spine is it's skinning ability. I can make a really good bi-ped character with tons of animations and all those animations will work for any skins I make for that skeleton! 

Scripting

I've been thinking about AI and how I'm going to implement it and I'm quite sure I'm gonna use some form of scripting. Right now I'm leaning towards making a good API and loading C# files directly and compiling them on during initial loading. That would be the most flexible but I'm not sure I can pull it off. I really wanted to have a system setup to where you could build your own object completely outside the game and then load it in. I'll really have to think about this and see what I can pull off.

Tiles

In the next update I'm hoping to get my tile generator to output half tiles and then write the code for finding the correct tiles for making smooth edges. This will be a major item on making my game different from other tile based games. Smooth transitions will play a huge part in every facet of my game.

Tuesday, July 23, 2013

Day #3 Dev Blog

Progress report...

Key items

  • Auto chunk loading is finished and working well. It can be tuned quite easily and seems to be totally rock solid. In the video loading is only visible because I have set the loading rectangle to be the size of the screen for testing.
  • Chunk culling is working quite well. Any popping in or out of the chunks that is visible in the video is only because I have shrunk the culling box to ensure culling is happening properly.
  • Started writing the chunk saving code. Basically since just a seed is needed to save the base world, each chunk only needs to save any differences the player makes to it. I did some simple math to see just how much this could be - if we use 256 x 256 tile sized chunks and each tile is given 8 bytes of storage (that's a ton) if the user changed all 65,536 tiles it would only take 512 KB of disk space. I can't see a player doing that so lets assume they change 10% of 1000 chunks (that's 6,553,600 tiles) I would still only need 6.25 MB of disk space! Pretty damn good.
  • World terrain generator seems to be working quite well minus a few hiccups. Just needs some tuning.

Performance Specs

  • With no chunks loading the engine uses ~7% CPU (on an Intel Core Duo) with vertical sync enabled.
  • With max # of chunks loading constantly engine uses ~50%, but frame rate almost never shudders.
  • Currently at ~2 ms render time for a screen covered with tiles. I haven't done any optimization besides brute force culling.

Ramble

Got a lot done in just a few more hours. Xna and C# have the fastest iteration time ever for 2D games. It's so pleasing getting the tile engine running this good in just 3 days. I don't think I would a single tile drawing with C++. According to my line counter I've only added ~100 line of code, of course lots of the code gets changed, but the hard line count is growing. I've got a few things left to do on the tile engine then onto custom physics. 


Monday, July 22, 2013

Day #2 Dev Blog

Huge Progress!!!

What progress?

I had some pretty bad sunburn from Friday at the water park with my kids so I took today off from my day job! Got a ton done!
Collision Tiles
  • Chunk clipping system
  • Zooming
  • Improved async-loading with progress bars
  • Added partial support for real tile rendering
  • Finalized decision to use 8x8 tiles
  • Decided to use 18 different collision slopes for the tiles including half tiles, 45 degree slopes and 27 degree slopes (just a decision, not implemented yet)
  • Collision and physics model will be custom
  • Added a bunch of helper methods for getting which tile/chunk a screen pixel is on (for mouse interaction)
  • Smooth camera motion
  • and more...
On the list for this week is...
  • Implement a tile collision type finder
  • Draw out one set of tiles
  • Start physics engine
  • Integrate Spine runtime
  • Do some work on figuring out a mini-map
  • Get a webcam and do a recorded coding session!
Current code line count ~2500




Sunday, July 21, 2013

Day #1 Dev Blog

Tile Based Adventure!

What is it?

First off what is Tile Based Adventure? Well it's my little game project for a huge tile based world to explore! It will be a 2D side scrolling style game. My goal is to progress a little each day and post daily updates to this blog.

What goals are there?

  • Infinite worlds (well technically not, but you could never reach the end in a normal game session)
  • Smooth, seem-less loading of worlds
  • Smooth camera motion with zooming
  • SPH based fluids!
  • Will use Spine as primary object animation system
  • Sloped surfaces
  • Semi-realistic tile physics (you won't be able to build sky bridges like in Terraria)
  • Game is supposed to be really fun, not about mining to get materials, although you will have to find materials by mining, just the actual mining won't be a chore

Current facts-

  • Use either 8x8 or 16x16 tiles (haven't decided yet)
  • Each tile will represent 1 ft in game so human player will be ~6 tiles tall or 48 or 96 pixels tall depending on which tile size I choose
  • Written in C# using Xna for rendering (will switch to Monogame someday)
  • ~2200 lines of code so far (day one)