Synced data containers for players and server

I found that sending data back and forth between clients and server got messy and unstructured. I made wrappers to structure the transfers back and forth. Sometimes you want to send a list of positions and velocities for the physics engine, sometimes you want to update the inventory of an actor. It can get very messy when dealing with all these different data operations if you don't structure it. I solved it by wrapping data in containers, registering them with a handler and connected them with an identical counterpart on the other side.

Read the full post

Less garbage with a reusable array

This is the most boring post of all times. I recently hit some performance issues in the form of sudden spikes in frames. I thought it had to do with garbage collection since it cropped up every 250-300ms. So I pulled my pants up and made a ReusableArray<T>. That wasn't the culprit, but still, now I have less garbage. I created some List<T> every frame where I kept my meshes that should be drawn which went through some linq to determine inside frustum, etc. However, I notices that the garbage was collected a bit less and it didn't run for as long as it did before.

Read the full post

Some GOAP for the actors

I have once again tired of my old projects. I am more experienced and have found new toys that I wanted to play with. This time I'm going for a smaller scope, but of course it will spiral out of hand as it always does. This time I'll add GOAP (Goal oriented action planning) to my toolbox.

Read the full post

Service oriented data driven game system

I am humble. My misconception is common knowledge, but it's easy to be fooled and drawn in by the beautiful pixels. It has has been an iterative process to arrive at this state of mind. The more I rebuilt and changed my engines, the more I realized how important the data was. Now, the system is much more about managing and distributing data to specific parts, than to render and shade triangles. The triangles are but a possible presentation of the simulation.

There is nothing but data. A game is just a system, simulating and mutating data. It's easy to fantasize in polygons since it represents a world we are familiar with. Data is a bit more abstract and dry. The conclusion is that games are subject to the same rules about data as a word processor or a case management system.

Read the full post