Monday, August 24, 2020

So blogger erased all of my 2020 posts!

 Well I'm not sure what happened but I had resumed some blogging in early 2020 and done several posts .. I came back today to write some more and found tha tll my posts from 2020 are gone?!

It is not as if anything earth shattering was lost - but it is a little disconcerting.

At this point it makes me unsure whether its safe to continue writing here or not?

So .. since no one reads this anyways and I'm mostly talking to myself I'll just continue as if nothing happened!


So SUPER quick recap!


FRAMEWORKS! ARCHITECTURE!


That's what I've been working on!


I found that one thing (of many) that has been vexing my ability to finish certain projects is the gigantic mass of highly coupled messes that my games have become.

Interestingly enough in the past 2 years at my day job I have become quite interested in clean architecture and realized that I had not been applying these principles to my game development.

So I have begun re-writing two of my longest term projects into clean re-useable packages.

As a result I have a new Rogue-Like set of packages, and a new Match 3 framework.

The Rogue-like being more complex dictated that it be cleanly divided in to several big pieces:

  • map generation
  • map drawing system (separate than the generation)
  • procedural content system with subsystems
    • monsters
    • weapons
    • consumables
    • armor(clothing)
  • inventory system
  • movement system
  • combat system
  • floating combat text
  • state management

The coupling between these systems is fairly light. For most of them I made external packages that I can make an update to and then import it in to my project and drag in a few prefabs and get it running quickly.

This is a very nice change from my old patterns!

The match 3 gem framework is largely split into a few big pieces but tries to separate all game logic into a 'server' side and most of the graphics and client actions into the 'client' side.

This is in preparation (I hope) for one day adding multiplayer support; but even if not it certainly keeps separation of concerns into two larger buckets so its been much easier to change game logic while I develop it without breaking the front end.

 So .. hopefully be back to add more progress if this does not dissapear from this blog as well!

1 comment:

  1. Losing a whole batch of 2020 posts is a painful way to learn about backups, and it makes the clean-architecture recap here feel even more valuable, since the work itself survived in reusable form. Splitting the rogue-like into map generation, a separate map drawing system, and a procedural content system with its own monster, weapon, consumable, and armor subsystems is a clear way to keep coupling light. I also liked the match-3 decision to put game logic on a server side and graphics and client actions on a client side, which should make adding multiplayer later much less disruptive. After a long session of sorting out systems like that, I usually unwind with this Kick the Buddy guide, and I hope the next update shows how the packages hold up in a real project.

    ReplyDelete