kurtd5105 / amorphousclone Goto Github PK
View Code? Open in Web Editor NEWAn Amorphous clone made in C++.
License: GNU General Public License v2.0
An Amorphous clone made in C++.
License: GNU General Public License v2.0
Make a basic Gloople enemy that doesn't follow player and just crosses the screen randomly in straight lines.
A random number generator is required in the enemy spawner and possibly by enemies and other things, it would be more efficient to be in the game engine.
The slider button should snap to the mouse in the middle, rather on the left edge. Additionally, it should be able to be initialized to a specific value and should be able to be set to a specific value later (the slider should be moved accordingly and the percentage should be updated as well). The sliders should also have an option to set the min and the max value.
Sprites should also get sorted according to depth afterwards. All sprites of a certain type should be on the same depth if possible. This is required to assure that stuff like the slider button appears on top of the slider line.
The options from the options menu should be saved to a config file that is loaded when the game starts. If there is no file then the default settings should be assumed.
Currently this is done manually in GameLogic.cpp, it should be a function of Agent to point it at another Agent.
The game engine should be able to take a string and draw it on screen.
The player should swing his sword to attack on click. The sword should collide with enemies during this period and kill them.
Hitting ESC during the game should make a menu pop up allowing the user to resume or exit to main menu. If the player dies, they should see a "you lose" screen and be able to return to the main menu.
Flesh out Gloople enemy with collision resolution.
If any compiler optimization is applied such as release mode in Visual Studio, sprite transparency no longer works.
The spawn manager should be able to spawn in increasing difficulty.
The sprites that are circles are supposed to be transparent around the edges, and currently they have a black fill.
The game engine should have various buttons including a simple sprite button, a button with text, a checkbox with text, and a slider with % text output.
clear() is called on the vector containing sprite pointers that were allocated by the SpriteManager, but the pointers are never deleted.
Create all enemies when the game loads so that there is less variation in frame time while the game is played.
Performance should be increased and memory usage should be reduced if GameEngine/SpriteManager.*
is refactored to use std::list and Sprite pointers.
When a sprite is added, it must be sorted and thus as the amount of sprites increases, the more data needs to be moved around on an insertion. The sprite batcher then iterates forwards over the list as usual.
Currently sprite information is duplicated and difficult to remove. This requires the list of sprites to be rebuilt on Sprite deletion or for the search of a single Sprite, comparing all of the properties of the Sprite. Neither is a good solution.
The refactor will require the use of new and delete, so it will need to be tested properly for memory leaks. A Sprite* will be created with new, the pointer will be added to a vector or list and then stored and also returned. On deletion a search will be made for the pointer, it will be removed and then delete can be used.
All assets for a level should be created during level load (including enemies and the player). They should be deactivated while loading, and the spawn manager shouldn't attempt to spawn or count until loading is complete.
Biter enemy that follows the player and when in a specific range lunges at the player in a straight line.
An enemy spawner is required to manage the enemy spawning, and it ties into #12 as enemies must be stored in a Box2D friendly manner.
The buttons should all be in 1 vector if possible and the button logic should be moved to its own function.
An FPS manager class is required in order to track the amount of FPS in console for real time performance feedback.
It must calculate frame time and be able to return the average of the past 10-30 frame times. It must also be capable of printing out the FPS every half a second to console.
Required files:
GameEngine/FPSManager.h
GameEngine/FPSManager.cpp
Spawn manager should create enemies based on different spawn rates and load different textures and sizes for each.
Buttons should be able to run a specific set of tasks rather than specifically change the game state. Some buttons will changes settings, which aren't a game state. Therefore a better solution is required.
Enemies currently sit off screen when they are done, they should be destroyed.
A system for animation is required in order to allow for sprites to not look as static.
A collisions system needs to be implement for collisions.. This should be integrated with some form of timestepping, so FPS doesn't affect game speed.
The player should win when all the spawns are exhausted. The player should lose when he gets killed by enemies.
The sprites should be able to be hidden, but still exist. This would be particularly useful to increase efficiency for off-screen sprites. Not many sprites will be on the screen at once, so hiding spawned enemies until they enter the screen will be very useful.
Should the batch sprites be updated every frame with function setNewBatch
or should it need to manually be called when a sprite is added or removed?
An enemy spawner is required for the main game that will spawn various enemies randomly, increasing in difficulty over time. For starters, it should be able to spawn a dummy enemy that will run in a random direction across the screen.
It should spawn enemies off screen and enemies should be removed after 20 seconds. There should also be a limit on the amount of enemies currently spawned. In the future enemies should be removed when they will no longer travel back into the screen.
Required files:
AmorphousClone/Spawner.h
AmorphousClone/Spawner.cpp
AmorphousClone/EnemyDummy.h
AmorphousClone/EnemyDummy.cpp
After SAT collisions are done for circles and rectangles and sword swinging is done then the player should be able to kill enemies when the sword is swung and the enemies collide with it.
Currently enemies are spawned as needed, but this causes a spike in frame time. Instead enemies should be spawned on load, and then start moving into view normally as they would if they were dynamically created.
SDL_GetTicks() is used to count the frames, but it returns only ms when a more precise amount of time is needed.
Currently, SDL's Get_Ticks function is used to get the current frame time. The problem is that it gives ticks in milliseconds. Since 1 frame needs to be rendered in 16.66... ms, the current solution is to overshoot to 17 ms twice, and undershoot to 16 ms once. Using std::chrono would allow for more precise timing of frame times, and thus a more accurate time stepping.
There should be menu options for resolution, fullscreen, windowed. There should also be volume sliders, for when sound is implemented.
In ResourceManager.cpp
, a temporary function "getTexturesB
" was created since I was unable to figure out how to make a function pointer to ResourceManager::getTextures
. Ideally getTexturesB
wouldn't exist, and ResourceManager::getTextures
would be used.
There are a few warnings in the current build that could be removed.
When the resolution is changed, all the hitboxes are in the wrong place. The player does not point at the mouse like expected.
Adhere more to C++ style conventions for variable and function naming.
A selection box needs to be added with left and right buttons to scroll through the options. This is required for
The player must rotate to point towards the mouse. This will complete the simple requirements for the player to be functional until collisions can be completed.
The game should run with time stepping so that FPS doesn't affect the game speed, as mentioned in #12.
A sword is required for the Player to attack enemies, and is required to test the most complex hitbox case in #12. The sword will be rotating and translating all the time, and it will not be a rectangle therefore making it the most complex hitbox case.
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.