sqatx / supermarioworld Goto Github PK
View Code? Open in Web Editor NEWAn amazing 2D Mario game made with C++ and SFML
License: GNU General Public License v2.0
An amazing 2D Mario game made with C++ and SFML
License: GNU General Public License v2.0
Probably keep this one but archive it.
When Mario falls and tries to jump, the sound plays anyway; it shouldn't.
It appears that the character's jump state can't go from ONFLOOR to FALLING. I did that because the character would be FALLING before being caught by the floor again, and then would go back to their previous state.
Instead of overlapping, they should be considered as part of the level and push characters out of their way, before becoming characters themselves
1- The level is flat with a hole in a middle. If a character falls in the hole, he dies.
2- There are "?" boxes, some static and some animated. Mario can hit them, they become empty but don't yield anything.
3- The game can handle a vector of characters, not just Mario.
4- Collisions between characters and level work.
5- There is a pipe at the end of the level; pressing a key creates an enemy that walks left and eventually falls in the hole.
6- The enemy can kill Mario if it touches him: death sound and animation.
7- Mario can kill the enemy by jumping on its head.
8- Write the .xsd file for a level.
Go left, then change direction: sometimes Mario's acceleration stays at 0 for a bit, and he gets stuck during that time.
Happens when you go left, press right just before releasing left
The game gets slow for no apparent reason.
First step to solve this: Stop redrawing the background and level structure at every frame (ie get rid of ResetSpritesToDraw())
Right now the MOC command (right click on the .hpp file of an object that uses Q_OBJECT is this:
moc.exe "%(FullPath)" -o "%(RootDir)%(Directory)\GeneratedFiles\Debug\moc_%(Filename).cpp"
instead of this:
moc.exe "%(FullPath)" -o "%(RootDir)%(Directory)\GeneratedFiles\%(Configuration)\moc_%(Filename).cpp"
because for some reason %(Configuration) is empty at this stage..
Mario should jump higher when the space bar is kept pressed
Remove m_listFloorTileNames in GraphicsEngine
Adapt foreground import in GameEngine: the name of a floor sprite will be "floor_foo" and the name of a foreground sprite will be "item_foo"
Remove m_mario and m_initMarioPos in GameEngine, and replace that by a std::vector<usigned int, MovingObject> m_listCharacters
Fill this list when importing XML
Change g accordingly, replacing UpdateMarioPosition by UpdateCharPosition and so on.
There are some ugly magic numbers in there.
Also I'd like the pipe to be either vertical or horizontal, and when it's vertical, spawn enemies that go either left, right, alternate or random.
This switch could be refactored.
State could have a methode toString().
The sound should be played only if Mario is actually starting to jump.
It shouldn't be played when Mario is jumping and the player presses the space bar again.
Remove dependancy to GameEngine in CollisionHandler ?
CollisionHandler can send an event to update foreground item position ?
The key events should be handled my the graphics engine, that would for example send a MARIO_JUMP event when the space bar is pressed.
When a goomba arrives, Mario can't flee because he's too slow to reach his maximum speed.
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.