obscurelyme / coffeemaker Goto Github PK
View Code? Open in Web Editor NEWA warm and fuzzy 2D Game Engine
License: GNU Lesser General Public License v2.1
A warm and fuzzy 2D Game Engine
License: GNU Lesser General Public License v2.1
Right now the player is fixed at the center of the screen. I think it'll be better gameplay to allow the player to move around the screen. Perhaps from right to left at the bottom of the screen. Enemies no longer move towards the player but rather they shot at the player.
I think it'll cool to keep the "enemies" that fly towards the player are now asteroids instead of alien ships.
The game engine and any games made with it should support controllers. The best MVP here would be to support XBox One controllers initially and then look into other solutions as needed.
I'd like for the UI components to have some sort of CSS3 flexbox-like capabilities. Things like
Perhaps some kind of auto sizing of elements based on the size of the parent.
There is a bug where leveraging timers within a particular entity do not respect the state of the game being paused. There are some async things that need to be able to be paused/unpaused based on the state of the game loop.
Enemies fly in an independent manner. A better solution would be to implement formation movement for all enemies. This will allow the player to distinguish patterns as the game goes on.
As an enemy is created it can be added to an "echelon". The echelon is the thing that will move on the screen. Once an enemy flies onto the screen, it should then be assigned a state to move to the next available/or manually assigned echelon position. Once it moves into position the enemy no longer moves independently but instead it's position will be updated by the echelon instead.
The player could use a HUD (Heads Up Display) to showcase information during the Main Scene.
Must haves
Nice to have
CoffeeMaker needs a way to pause/unpause the game. I think that the best way to do this will be to leverage timers. All game entities will use a game timer to progress their state. When the game is paused so too will the game entities.
CoffeeMaker should be decoupled from the sandbox executable that it currently is attached to. This can be a lower priority task until the first game "Cheap Asteroids" has been created and I'm ready to move on to another game.
Player should be immune to all damage for 3 seconds after spawning. This gives the player some time to clear out the existing enemies in the area so they cannot be spawn killed and they can reset the playing field.
The player should be able to save High Scores. CoffeeMaker will need to support some type of ability to save and load persisted game information.
Right now, only 1 non-killable enemy spawns in the left hand side of the main scene. It walks up the screen and wraps around once it exits the screen's border. I need to make multiple of these kinds of enemies throughout the duration of the Main Scene's lifespan and make sure that they have colliders and can be killed by the player's projectiles.
The game engine really could use fullscreen support in order to give any game made with it a more polished and standard look. Make it so.
Currently (as of this writing 10/3/2021), the game engine only supports "layering" if the programmer is smart enough to know the exact order of how things are to be drawn to the screen. This works for small levels, but as the engine and games grow there are going to be more and more elements that will be considerably more difficult to keep track of. It would be helpful if each graphical element could be assigned a "layer", and from there items can be drawn in a FIFO manner. Alternatively I think it's best if the programmer had even more control and could specify the exact "z-index" property of certain elements sort of in a "position: absolute" kind of fashion.
TLDR: The game engine needs a Layer System for all graphical elements. Think CSS z-index capabilities.
Would like to be using some form of linters + code quality checks to ensure that the quality of this software is as high as possible.
The game should have a controls scene that showcases the controls available to the end user. This scene should be dynamic enough that it could also be accessed from the pause menu too.
CoffeeMaker uses dynamic libraries on Win32 and static on OSX. I'd like to bridge the gap here and introduce parity. It'll also be more convenient for end users only needed to worry about a single executable rather than a bunch of DLLs. So I'd like for Win32 to be linking against the static libraries for all vendors.
The most feature complete inputs in modern day PC game include rebindable keys. This is a stretch goal and not a high priority item at this time, but this is something to consider long term.
The UI/UX for the HUD needs to be vastly improved. This will involve more art than programming.
The pause menu needs some polishing. I propose a new UIComponent
called Modal
which includes a View
and a new primitive called Backdrop
. Backdrop
is just a semi-transparent background that helps to make the View
on top pop against the game in the background.
Like Unity3D, CoffeeMaker really needs to be able to generate 9-part slices from given UI sprites in order to keep corner resolutions the same yet still be able to scale horizontally and vertically to no end
Currently, CoffeeMaker does not use a proper
Physics Engine. I'd like to leverage something that's more battle tested than my naïve O(n^2) AABB approach.
Warp Power up is a feature where the player is allowed to warp in the direction they are moving in. Warp will teleport the player a certain distance away. This feature should have N charges that are rechargeable.
Player and Enemies need a state machine that allows for easy way to manipulate how the Update function will operate. There is a prototype of this working in TestBedScene. I'd like to port that to the general game and add that to the base enemy and player classes in the main scene.
The player should be able to take damage, die, and respawn.
Respawn is going to be tricky because the enemies can still float around the area causing the player to spawn and immediately die. Will need to open another issue to make the enemies not go towards the player's position once dead. Alternatively, the player spawns and has immunity for a few seconds.
I need a B-Spline library that is more capable of the currently limited algorithm CoffeeMaker uses now. De Boor's algorithm will be needed for better precision animations that are far more lengthier than just 4 control points.
Trace and Debug methods contain memory leaks that need to be addressed. Perhaps it has something to do with the runtime fmt functions. fmt can be done as a constexpr so perhaps look into that solution.
B-Splines are hard to guess and check. I'd like a basic level editor to create and test B-Splines before saving them for future animation use.
Enemies/Player need more animations. they have 2 states currently that are used for the movement animation.
Enemy Animations
Player Animations:
The Button component does not properly set nor unset the hover color when a texture is applied to it. If a button has any png image displayed, on hover it will display a bright green box (just like the default buttons) and then on mouseout it will turn black (again, just like the default buttons). This looks to be due to a misuse of the SDL_SetTextureColorMod
function.
When assigning a color to a Texture, CoffeeMaker does not take into consideration what the prior color was and as a result of this, Texture.SetColor permanently alters the Button's texture after mouse events have been emitted. Button needs to be aware of the prior Color assignments to its assigned Texture so it can undo the effects of the mousein event.
Cheap Asteroids needs a "Play Again" menu that will display when the player dies. The menu will inform the Player that they have lost the game and give 2 options...
Play Again will reset the scene
Quit will return the player to the title scene.
Quit option should then toggle a sub menu that asks for the user to confirm if they really want to quit.
With the SpriteAnimation
class in place, I need to connect the dots to the Player and Enemy instances so they actually play the animation when appropriate.
Allow for the game window to be resized.
All graphical elements should render intuitively after the resize takes place. This feature is blocked by the flexbox-like UI system.
Engine needs a utility window that first opens, is presented, and then proceeds to grab display information. Then it can close and reopen the final game window. This is because of the nature of SDL2, in order to see what kind of display we are dealing with we first need to have a window open.
There is a slight bug in the Text component. The successful render of the Text component depends on the flowing calls be done IN THIS EXACT ORDER
Text text;
text.SetFont(FontManager::UseFont("OpenSans"));
text.SetColor(Color(255, 255, 255, 255));
text.SetText("Hello, World!");
If a programmer does not follow this order, a texture for the text content is not properly created. This is caused by a few things.
This lacks intuitiveness when working with this component that even I (the creator of the component) step into mines using Text. I'd like to make it so Text no longer depends on the ordering in which functions are called. Text should "just work".
Hello @obscurelyme,
My name is Rhett and I'm a student at Missouri State University. I'm currently working on a group project in which we use various testing techniques/software on an open source project. We found and chose CoffeeMaker. I'm contacting you because my team and I are having issues getting files to compile. This is because the libraries and header files included are not being found for some reason. We are not sure why this is happening. We've tried adjusting our VSCode and IntelliSense configurations to no avail. We have also started to use Docker to see if we could find a fix, but we are all new to Docker so nothing was found. If you could provide some information or a short walkthrough on how to get the project to compile from a a fresh clone of the repo we would greatly appreciate it. Thank you for your time!
Keep up the great work,
Rhett
Right now, CoffeeMaker uses cppunit to run tests on the source code, and while this is helpful. I really need use of a mocking library as well, which cppunit does not provide. I'd like to see what it would take to swap over to Google test/mock.
Similar to how SDL_UserEvents can be listened to simply by implementing the IUserEventListener
interface, I'd like for another interface to focus on mouse events. IMouseEventListener
would listen for and could react to mouse button clicks, mouse button down/up, mouse movement, and mouse wheel events.
CoffeeMaker needs some Audio. Make it so. I'd like to leverage SDL Audio to start with, and get over any hurdles with that first before exploring other audio library options.
When a Player sets a new High Score, and they die a High Score menu should be displayed asking the player to input initials so they may save their score. This issue will depend on some sort of persisted storage ticket.
I would like to see CoffeeMaker leverage XML based resources to construct the UI for scenes rather than the current way....
void handleClick() {
std::cout << "Button was clicked" << std::endl;
}
...
View view{0, 0, 500, 500}; // top: 0, left: 0, width: 500, height: 500
Button button;
Text text{"Click Me!"};
button.AppendChild(&text);
button.On(ButtonEvent::Click, Delegate{handleClick});
view.AppendChild(&button);
...
view.Render();
In this example we can clearly see how verbose things are. And the reality is that this is a dead simple example. A more practical example has positioning functions being invoked per element. This amounts to a lot of heavy mental thinking and code just to get a simple UI working.
For the future, I'd like to see CoffeeMaker consume XML files that can be read and parsed in such a way that the above code would something the programmer need not think about, but rather becomes an automated step.
Something like the following, would be the direction I want to go in...
<View position="flex" x="centered" y="centered" width="500" height="500">
<Button position="flex" x="left" y="centered" onClick="handleClick">
<Text color="rgba(255, 0, 255, 255)" position="flex" x="centered" y="top">Hello, World!</Text>
</Button>
<Button position="flex" x="right" y="centered" onClick="handleClick">
<Text color="rgba(255, 0, 255, 255)" position="flex" x="centered" y="top">Goodbye, World!</Text>
</Button>
</View>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.