2023-02-02

Compton is now GPLv3

So remember that deadline I'd missed? Well today I'd decided to make that old project of mine open-source under GPLv3, with the disclaimer that it is abandoned and I'm only making it available on the off-chance that something there might be useful for someone else.

Keep in mind the license is flexible - if there is something specific in there that you really want to use for your own project, regardless of what license that is under, please get in touch and I'm happy to figure something out with you. But otherwise, yes, it's under GPLv3.

And just to explain clearly what this is, this is an isometric 2D game engine written in C++, developed from 2016 onwards - through a number of pretty heavy rewrites and other prototyping madness. It was used at one point for a game jam seen here and used to produce a viewer for an early prototype of the game Creatures, seen here, just to give you an idea of that madness.

This iteration was essentially developed on and off through 2021 and last year. If you're curious what it looks like, here's a screenshot.

You can find the repository here.

I've provided a few points about it below.

  • I was gradually outlining a rather ambitious AI system which I'd sadly never really gotten to flesh out for this, but the idea was all oriented towards the AI operating entirely on emergent behaviours driven by memory and influence, so for example an agent would not be aware of it's relationship with another agent and so that would dynamically be determined simply by action vs. outcome (i.e., I'm hungry so I'll try and eat this rock = no food returned and possibly pain, which is bad)
  • The pkgman tool is a very early version of a similar tool used for Yin
  • There's groundwork for scripting support (Lisp), which is actually reusing code from Abuse (please consider all that still under it's original license, i.e. public-domain - not that I've really changed much at all)
  • It's heavily oriented towards procedural generation; the terrain generation uses Perlin noise which it interprets essentially as a height-map, every grass tile has a unique grass pattern, characters receive unique names and there's some crap for generating territories, houses and other silliness - the terrain generation actually operates fast enough that you can update it in real-time, which looks pretty cool!
  • Rendering as split-screen is implemented, though while it certainly worked in the past I'm not sure how well it still functions as of this last iteration - iirc it supports splitting the viewport quite a few times but the logic for handling multiple players wasn't quite finished
  • The vc_old code is code pertaining to the game jam I'd worked on back in 2017

On one hand it's frustrating that I couldn't really bring myself to piece it together into something tangible, but at the same time, I think the concept I'd been pushing towards was way too broad and over my head. And it's nice to be able to just dump it like this and move on with my life.

2023-01-05

 

 
I recently commissioned Laggies to produce some artwork for an upcoming project I've had rolling along slowly for about two years now and thought it came out really nicely. Got nothing else to really say about it for now other than hopefully I'll be able to show something of it this year - that's the goal.

Last year I had set a deadline for my long-running 2D simulation game, to get a rough working prototype completed for the start of this month, and I didn't make it. Deeming it finally dead and moving on. Will probably make the code publicly available at some point just on the off-chance it's useful to anyone, but it's basically an unfinished 2D isometric engine and not much else.

Will be carrying over some ideas to this other project so it's not a total loss I suppose.

Still busy working on tooling for my 3D engine, Yin. Had a lot of ideas and thoughts lately, and I've changed how I'm working on it too so that it will have more of a focus going forward. Hope to have something of that to show by the end of the month if all goes to plan.
 
Also, happy new year I guess. 2023. Yikes.

2022-11-24

Back to gradually making progress on the editor for Yin, again. I mean, it looks like a thing now I guess?

Because of the way it all needs to work I've been overhauling the way viewports/windows were handled throughout the code, which uh, has had a bit of a domino effect on a lot of systems. 

There is a bit of a chicken-and-egg problem that had been avoided for a long time which needs addressing too - for the SDL2 shell, the window was originally created by the engine via an "OS_CreateWindow" function during initialization; the engine would determine what graphics APIs were available and pick the one most appropriate, then hint to the shell the type of window it wanted to create, but the editor worked completely the opposite way for obvious reasons (the "OS_CreateWindow" function would just do nothing in that case, as the OpenGL context and window was created for us - ew, I know!)

It does make more sense for the shell to determine this rather than the engine, certainly, and the plan now is for the SDL2 shell to create the window itself just as the editor did, but this has raised some other concerns, like, do I now move all the graphics API detection out into the shell? Because it also needs to lookup the user preference too, and all of the configuration state is managed and tracked by the engine - and the engine can't currently be initialised until the window is created.

Damn my brain is useless...

The solution might be to move the configuration state manager out into the "common" library.

2022-06-05

So the plan to merge Compton and Yin into one engine didn't quite pan out. It's still a long-term goal for me, but Compton has way too much put into it at this stage to just merge and ditch; it's likely months of work to combine the two feature-wise.

The Compton engine itself is still very much in mind for a very particular game I've wanted to make for a long long time too, hence the hesitation, so this is pretty much a matter for me to buckle down and finish that damn game at this stage. Though it's not like Compton doesn't have it's own challenges. Sigh.

Unsurprisingly my plan to prioritise also didn't pan out... I've wasted a good amount of time farting around as usual with a number of different projects. Really need to experiment and learn better ways to focus myself when it comes to these things. I'm at least very concious that Compton and Yin are my two primary focuses, but now and then something can distract me for a good few weeks for something that's really too ambitious for my own good - I'll get frustrated, and then rinse and repeat.

I'd also made Yin public for a brief while on GitHub, but it made me feel a little anxious about touching it knowing there could be eyes on everything I'd be doing. For now I'll likely continue with the routine of making whatever with the engine and then releasing that copy of the source code once I've progressed further along. That said, most future publications will likely be under LGPLv3 rather than public domain as I'd done in the past.

Actually I'd forgotten to mention before but Compton isn't public on GitHub either anymore, though in that case it's more so that I don't want anyone playing the game I'm working on there before it's ready (whereas in the case of Yin, there's currently no game.)

Worth outlining that I'm not bigoted enough to think that Yin as an engine is useful to anyone but me, but I'd hope that some things in there could at least be somewhat informative or educational, either as a do or don't do this sort of thing. Probably more of the latter.

With that out the way however, here is a list of things that I've done for Yin since the last post (pretty much just had a quick nose through the significant bits in the commit history, given I don't tend to keep the changelog especially up-to-date.)

  • Began migrating what exists of the editor into the engine
  • Made more progress on the AST for Dickens scripting language, though there's still a long way to go
  • Implemented a preview state for materials, so you can see how it may look without having to necessarily load the whole material into memory; used for the material browser
  • Implemented a first pass of the material browser
  • Created new icons for the editor modes
  • Pulled over the binary serialisation system from Compton
  • Made a minor syntax change to the Node format; 'integer' type is now just 'int', for consistency
  • Experimented with creating a face-inspector for the World Editor
  • Updated the memory manager so for cached objects we now store a hashed name as the id, store a descriptor for debugging and use the hashed name for the lookup
  • Rewrote the lighting shader
  • Overhauled the profiling overlay
  • Updated the Blender plugin to support the latest format changes
  • Introduced a file aliasing system, essentially allow you to override a file I/O request with a different file
  • Default mount locations are now provided by a Node file rather than being hard-coded as before
  • Added support for bloom
  • Mouse look (finally)
  • Gave the client-side input code a bit more TLC
  • Fleshed out client state management a bit more, with query for connection with server-side etc.
  • Reintroduced fog which can now be controlled via the world properties
  • Started hooking up player movement again
  • Face normals are now generated
  • Started implementing visible face determination and portal traversal when drawing the scene
  • Started experimenting with mirrors
  • Started implementing Lisp interpreter as an interim solution until Dickens can replace it (or they'll more likely live side-by-side)

Most of the significant work lately has been towards the World stuff, which makes sense I guess since it's sort of the meat and bones. The engine can now pretty much go from sector to sector and collect a list of visible faces, then split that between portals or just general faces, and then we could pretty much now just keep rendering the same sector over and over from each portal with all the actors correctly transformed over.

Downside is that there's still lots and lots and lots of work still to do, especially on the rendering side.

Lighting is an obstacle that can technically now be overcome (right now light sources are hard-coded and then passed through the material system as if they'd been picked up for that particular surface) but it's still a question for me as to how lights are generally best implemented. Long long ago Yin was originally envisioned as a scene graph oriented renderer and the API for this still actually exists in the engine, but as I experimented and prototyped I'd somehow just drifted away from it, but to get to where I need to be it really would make sense to go back to that design. Point is I'd like to do this before fleshing out the lighting system more.

This video shows some experiments with updating the lighting, as it didn't really behave correctly before. There's support for specular and normal maps, however they're not demonstrated in the video below (fairly sure I demonstrated them in the past at least.)

The screenshot below shows the initial pass of the material browser which is scalable too.

https://cdn.discordapp.com/attachments/671993306976092160/966721599782932500/unknown.png 

The eventual plan is to have it so that clicking onto (or hovering over) the material might give a (probably optional) live preview, so you can see how it immediately looks under lit conditions or with animations playing.

This final screenshot shows a quick little test map I whipped up with the Blender plugin; you can pretty much mesh out whatever geometry and just export it for the engine as a "World Mesh", which can then be used as the body of a sector. The gateway currently features a portal surface which is just being used as a mirror, though there are some problems I need to solve with this at some stage (not to mention mirrors are a bit of a stretch goal).

https://cdn.discordapp.com/attachments/671993306976092160/969336480906502224/unknown.png

2022-03-05

Recently decided to try to discipline myself a bit more. Too many projects on the go at once, which honestly has been doing nothing good for my mental health. I've decided to abandon some other projects that had been adopted on the side and merge Compton, my 2D engine, into Yin.

This means that going forward Yin will have functionality for supporting both 2D and 3D games. This also means that Compton is being retired proper now. But going forward I'll hopefully only have Hosae and Yin in focus (and whatever game I build on top of Yin.)

Over the last day I've been gradually working on incorporating functionality from Compton into Yin, particularly starting off with the GUI system.

While migrating the GUI system, and rewriting it in the process, I've opted to actually incorporate it as a separate library instead of integrating it directly into the engine, which is an approach I'd like to use for other major additions going forward.

Currently trying out wxWidgets for the editor frontend, though my motivation has been all over the place for that; I don't like wxWidgets but at least it's a little more actively maintained and supported than the Fox Toolkit I was using before (though I'd say Fox is still significantly nicer in a lot of respects.)

Yin's scripting language is now called Dickens.