allegroflare / allegro_flare

Application toolkit for Allegro 5
https://clubcatt.com/allegroflare
MIT License
35 stars 6 forks source link

Add a first Prototype - FixedRoom2D #223

Closed MarkOates closed 2 years ago

MarkOates commented 2 years ago

Problem

AllegroFlare is designed to be a library focused on higher-level concepts. For the most part, AllegroFlare is currently managing middle-level things like OBJ loading, cameras, object positioning, asset management, etc. Recently, AllegroFlare started introducing concepts like TitleScreen which are more higher level.

I'm curious about adding Prototypes, which are yet another level up in terms of complexity. A prototype would be a more "complete" playable screen of core gameplay. In the sense that you have TitleScreen, GameOverScreen, StoryboardScreen, you might imagine actual prototype gameplay screens like ShmupScreen, Racer2DScreen, DungeonCrawlerScreen, FPSScreen, SideScroller2DScreen, etc.

These Prototypes will be a more complicated set of code and will likely extend out much further than a single file. Even though gameplay coding can get pretty complicated, there should be some kind of simplest reduction of features that could be used as a starting point to expand into a more full-featured game. Ideally, the prototype would be somehow feature-complete, in the sense that it would only require the end developer (the person making an actual game from the prototype) to extend it with the features specific to the actual game in question.

Initial go!

In this PR, I've added an initial prototype Prototypes/FixedRoom2D a reduction of a point-and-click adventure (which is the simplest prototype I could think of). This prototype works by having you define objects in a room that you can interact with by clicking on them. (Soon should be able to add multiple rooms). Interacting with an object will fire off a script.

The prototype screen includes an inventory.

How it would be used

The design is laid out such that the end developer would extend the prototype with the following code:

New Additions

In addition to the above, this PR includes a few monstrous additions:

Still left to do

This feature still needs a bit more work to be complete. For now though, it's a great start and some great new features have finally been broken in. Meanwhile, FixedRoom2D/FixedRoom2D will need the following: