Last Login:
May 24, 2016


User Profile

Hits: 150,026
Joined August 08, 2010
Games (11)

Game Music Player
October 10, 2011
August 01, 2012
In a word
August 10, 2010
October 07, 2010
Flood the mines Demo
November 12, 2010
January 24, 2011
Velocite R
April 12, 2011
Shinsetsu Ninja
February 18, 2013
Walk of Darkness Demo
November 15, 2013
Project Phoenix
April 30, 2014
Frosty RPG WIP
December 23, 2014
Examples (1)
Favorite Users

DSR Log #5
Posted on May 21, 2016 at 10:26

Welcome to the first in what is probably going to be a moderately long string of relatively boring logs, as I hammer my C++ code into shape. :P

I actually got very little done this week (For me), because like clockwork my days went like this:
> Wake up
> At 9AM, start coding
> At 9:22AM get phone-call from boss
> Arrive back home at 6PM and wonder what just happened
> Code a bit then get too tired to do much.

As a result of this, I've not really had time to tweak the prototype or work on art this week.
I'm pretty happy that the shop is getting so much work though, means things are becoming sustainable and quickly.
On the other hand, I'm probably going to have to start sacrificing more sleep to get stuff done; I've got another project I'm working on for local business - an extension of my inventory management tool that is being built on top of Electron.
People in town are willing to pay me money for a polished version of that, so I'll probably make a bit of cash off that if I can pull it together in between repairing their computers.

And some good news: Intel finally payed out the prize money for the competition this game won. I've got a shopping list that needs clearing (Including items like extra winter clothing, Dark Souls 3 and my Driver's License).

Now, onto the meat of the blog. It's a bit dry and hard to chew this time, but still represents a good deal of progress:

Render Core (Show)

Tilemaps and Other Stuff (Show)

Resource Blocks (Show)

I guess that's actually pretty decent for the 2-3 hours I actually got to spend on things.

A lot of this code is actually coming from other places. As I mentioned before, I have a ridiculously huge development folder full of project fragments. Most of them have some useful code I can reuse or recycle, saving a ton of development time.

Some of the things I'm working on integrating soon:

An AngelScript framework I wrote for some version of Exile or other. Basically provides interfaces for linking script to native code.
I may or may not even use this, but having the option to potentially implement the game's logic and gameplay in script is very appealing to me.

The third iteration of my GME wrapper. If I'm going to use NES-style music and sound effects, I may as well use them via an emulator like this one :P

Back when I made Exile, I made an Asset Packer called MPK2 that basically just stored a flat file table as ASCII with starting offsets and lengths, then sequentially dumped each file in order.
I got a bit more sophisticated last year with a few extra features: zlib integration, virtual paths, editing existing PAKs and selective loading (E.G: Load entire /data/textures/level2 folder contents into contiguous block of memory).
This basically allows me to obfuscate my resource files a bit and reduce final filesize.

Math library I started back when I made Exile. Started out as a messy Vector implementation, now has cleaner Vectors, basic Collision functions (Line, AABB, Circle, 2D Raycast) and a bunch of interpolation functions.
Also an implementation of Fixed Point numbers in case I ever want to port my games to systems without a Floating Point Unit...

Portions of a few engines
Most didn't even have names. I basically just went over a bunch of my old engines, found a few decent implementations of the gameloop and hybridized something out of them.
The Gameloop is already fully implemented, and consists of three major parts: The "Engine" (Part that runs each cycle of the loop), the State and the Renderer.

The Game State is the part that contains the current "stack" for the game. It holds resources used by whatever situation is currently playing out, executes entity code, dispatches events to listeners and a bunch of other stuff.
Entities are stored as pointers, and are stored in an associative array of singly-link lists.
Each list contains only entities of one specific type (As reported by the entity's data); this is done to make it easy to iterate over specific kinds of entities for situations like collision checking, deletion, etc.

The system I'm working on currently for things like collision is based on the Listener pattern. The GameState is basically the Listener. Entire types of Entities can be bound to specific events, along with parameters.
So, for instance, the Player entity can register to listen for all Collision events that come from any Pickup type.
The loop tightens up nicely when you're only considering things that can collide with each other instead of the naive double-dispatch system I implemented in Exile (Basically everything is looped through twice and checked to see if they're colliding).

Of course, the Listener system isn't just for that kind of thing. Generic messages can also be sent and triggered between various entities; sounds, music, transitions and other things can be triggered by code condition and propagated to anything that wants to be notified about that event...

Next week, I'll hopefully be showing a partially working game (I've got the player partially implemented, just need to get my tile renderer polished up and I'll actually be able to do something with it).

Prev Page | Next Page

Recent Activity
Active Users (0)