Recent Posts


Creating a Console System

2019-09-17 01:35:30, Worked for 4 hours.

Every cool game needs a console system.
Somewhere I can slap all the variables I use for everything.

Work began on this with foundations from previous games, so basically we would have a class ConVar responsible for handling the variables themselves and parsing them out to different types.

Then we would have a separate class Console for interacting with these from inside the games.
Then a global system for interacting with it from within the code.

Now this seems pretty trivial, and it kind of is.

We create the ConVar constructor, it should take the name of the variable as a string and a default value.

So that's what I did.

Then I added, like a lot of parsing functions to get values of different types.


And then because it was pretty horrible to do .ParseFloat(); every god damn time I needed to get a value I created a super reduntant wrapper class to handle specific types.

I called that class ExplicitConVar which was a generic class with the ability to keep the last parsed value to spit it out when you want it and to update from ConVar when the ConVar value changes. Fan f- tastic.

If you cared, here's what that looked like.


Now with that out of the way, work on the game could begin, which it really should have before this. Damn I waste a lot of time.


Comment

Starting on 'Grapple Guy'

2019-09-12 01:01:26, Worked for 1 hours.
Click to open full image.

Working title, I know, funny right? no? yeah it sux.

Despite the hate for Unity I've grown to know it would probably be very simple to toss something kind of nice looking together for this project in it.



It just won't look as good or play as well, but I hope that tweaking the entire physics engine to what I need might fix it.

So after loading the project I'm met with a familiar sight.
The unity default scene, completely gray and empty

So after I added the standard plane (basically a 2d rectangle in a 3d world, ideal for movement testing). A Capsule component, my so called "Player" it looked something like this.


Created a simple folder structure, and a script called Movement.cs, a C# Unity Script file.


Set up my default editor Visual Studio 2019 (Preview).


And opened up Movement.cs and this is what I see, a dreadfully empty document that contains this.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour
{
private void Start()
{


}

private void Update()
{


}
}


Now, if you don't know any programming, don't worry, it's all pretty explanatory.

The Start() function gets called once by Unity at the start of the scene.
The Update() function gets called once every single frame that the game renders, i.e. somewhere around the neighborhood of 60 frames per second(fps), but I'm going to target somewhere around 144 fps for this project because it's so much nicer.


After sitting and twiddling my thumbs for a solid 15 minutes searching for something to listening to I decided to just kind of write from memory what I though the https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/gamemovement.cpp source engine movement code looked like, but in C# and not in source engine and not using vectors in the same way.

I came up with this little devil.
Stole the acceleration values straight out of https://github.com/id-Software/Quake-III-Arena/blob/master/code/game/bg_pmove.c but since they are for a completely different, (and much superior) physics engine, they won't work in unity.

But testing and tweaking will, tweaking not being the meth kind of tweaking, but software one.

Plus this, this was very helpful, thanks stackoverflow from 6 years and 9 months ago. https://gamedev.stackexchange.com/questions/45639/implementing-strafe-jumping

I'll continue tomorrow, just gotta do some git magic to get this spaghetti on the interwebs.


Github Commit
Comment

Patching up the site.

2019-09-12 00:36:57, Worked for 5 hours.
Click to open full image.

Added some more admin controls, can now edit and delete posts directly from the main page.


The navigation bar now changes depending on if you are logged in, and if you are logged in as an administrator it will give you access to all the admin control things.



The delete function ain't pretty. But it kind of works.


So much work went into this.
https://youtu.be/gt0yhHthKz4
If you have time, listen to this masterpiece.


Github Commit
Comment

Finishing up the blog.

2019-09-12 00:36:48
Click to open full image.

I started working on this blog last thursday (2019-09-05).
Now, 4 days later, it's pretty much operational.
And by that I mean that whatever I hacked together actually kind of works and shows you this message I'm writing now, but damn it's hacky, I really need to fix that.

No worries though, it's something to work on later, but for now I will start working on the project this blog actually was meant for.

The Unity game 'Grapple Guy'.
It'll be epic, I'll show you later.


Comment