Code Monkey home page Code Monkey logo

supermarioworld's People

Contributors

nhacsam avatar sqatx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

supermarioworld's Issues

Weaknesses concerning RECT files

  • If the line doesn't end with a space, the last field is read as something like 65\nfoo and the next line (which starts with foo) will be ignored.
  • If there are 3 textures called walk1, walk2 and walk_foo, HowManyLoadedTexturesContainThisName gets confused and returns 3 instead of 2.
  • If you call GetTextureNameFromStateName with a state name that doesn't appear in the RECT file, it results in a funny memory leak in the textures map.

Bugs to solve before alpha 1

1- Item backgrounds are not transparent
2- When Mario is on the box but slightly on the right like this:
buggoomba
The goomba coming from the right will die because a collision will be detected with Mario.

Jump when falling

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.

Alpha 1 Goals

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.

Mario can get stuck when he turns

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

Optimization in GraphicsEngine

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())

[Config] All moc_ *.cp files are generated in

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..

Height of jump

Mario should jump higher when the space bar is kept pressed

Notes for refactoring

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.

Clean pipes

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.

Bad key event handling

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.