Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Super Mario improved  (Read 2215 times)

0 Members and 1 Guest are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • Email
Super Mario improved
« on: May 02, 2017, 03:18:42 am »
Hi Ladies and Guys

Before when i posted my poor Super Mario Game on this same board, it was full of issues and just after several posts and replies some members were able to run it. There were errors that made it crash though it didn't happen in my C# IDE. Now i´ve improved the app so in the game logic as in its graphics. Really it needs more fixes, i know. Such as better level design and more varied enemy display. So you can feel free to criticise and give your opinions.
(In the Menu boxes please use the mouse)

Here's the whole project folder (you can run the exe if you don't have the C# IDE)
https://www.dropbox.com/s/hfkxetoxs5iv10i/My%20New%20Super%20Mario%20Bros%20Folder.rar?dl=0

For 64 bit systems, just change the DLLs to SFML.Net 64 bit
I'll be taking the time to get the code more tidy.

I would appreciate your feedback for to get it better.
Regards
Pablo

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: Super Mario improved
« Reply #1 on: May 02, 2017, 02:51:13 pm »
Well, that isn't that bad. Worst part for me are the sometimes inconsistent controls. You suddenly stop moving or jump higher than expected and similar things.

Code wise there are a few cosmetic issues, like unused variables or ambiguous empty branches, etc. which are all listed by Visual Studio.

But what's more important I'd say is you should look into finite state machines and how you can use them to implement multiple screens or game states without having to duplicate code.

Right now you've got several places in the code that draw a different screen, refresh it, handle events, etc. Using a proper state machine you'd only have to clear the screen and decide what's happening in one place, which might clean up quite a few things.

Also worth mentioning, you should try to keep file names short, consistent and meaningful. For example, rather than having a "main file.cs" use "main.cs" or "options screen file.cs" should be "optionscreen.cs".

Tigre Pablito

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • Email
Re: Super Mario improved
« Reply #2 on: May 16, 2017, 11:53:14 pm »
Hi Mario

Thanks, that's the best i have been ever told since i'm in the SFML community.

About the controls i have some idea of what is going wrong. Cosmetic issues, i'll deal with them.

I'm right now seeing about state machines, i understood them and will implement it in my poor game.

I'll shorten the names too.

Thanks for all your tips