Page 1 of 1

Super Mario Brothers Engine

Posted: Wed Feb 15, 2012 7:32 pm
by Light-Dark
As a little side project i thought i'd create as best i could a super mario brothers type platformer engine within 1 week and open source it for everyone!

Features

A tiling system
Scenery system
Item system
Debug system
Kinda accurate SMB jump physics.
Lua(only two functions, LoadLevel, ChangeMusic)


Now, to add some challenge in using it, im leaving it up to the user to create their own lua functions,system upgrades and perhaps a editor(editting text files is tedious ;) ).

Download:
http://www.mediafire.com/?nchikjks9y3sn7d

LINKS AGAINST:

SDL
SDL_image
SDL_Mixer
SDL_TTF
lua 5.1

Controls

x - Jump
c - run
~ - Lua Console
L & R Arrow keys - Left and Right
Down Arrow key - Entering Pipes

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 12:04 am
by lalacomun
Nice work, im playing it! the jump is very similar to the original game, but it is still have some bugs, can i add more
futures to it ? just asking... but great work!

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 5:56 am
by Light-Dark
lalacomun wrote:Nice work, im playing it! the jump is very similar to the original game, but it is still have some bugs, can i add more
futures to it ? just asking... but great work!

sure as hell you can, oh by the way the .exe in the main folder isn't the latest build , for that you gotta compile it again, but yeah its open source you can do anything you want with it.

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 11:30 am
by lalacomun
Light-Dark wrote:
lalacomun wrote:Nice work, im playing it! the jump is very similar to the original game, but it is still have some bugs, can i add more
futures to it ? just asking... but great work!

sure as hell you can, oh by the way the .exe in the main folder isn't the latest build , for that you gotta compile it again, but yeah its open source you can do anything you want with it.
Great now im going to add a simple menu and animate those mushrooms! :)

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 12:41 pm
by superLED
You could put your project to Github. That way, you can access peoples changes and merge it into your own project.

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 3:30 pm
by Light-Dark
superLED wrote:You could put your project to Github. That way, you can access peoples changes and merge it into your own project.
Noted :)

Re: Super Mario Brothers Engine

Posted: Thu Feb 16, 2012 7:50 pm
by ibly31
Yeah, definitely do the Github route. It's a lot easier to manage than a zip file for the project.

Re: Super Mario Brothers Engine

Posted: Fri Feb 17, 2012 11:04 am
by short
plus learning git is a bonus skill!

Re: Super Mario Brothers Engine

Posted: Sat Mar 03, 2012 4:05 pm
by pimpy
Don't want to look nasty on my first post on this forum but only the graphics are good. The code is really neither pleasant to read nor good, the game is not really working ( collisions and items picking systems are not working very well ). The good point is that it can only get better!

( I'm quite disapointed to see that quality in one of your projects :/ )

Re: Super Mario Brothers Engine

Posted: Sat Mar 03, 2012 8:03 pm
by Joxno
pimpy wrote:Don't want to look nasty on my first post on this forum but only the graphics are good. The code is really neither pleasant to read nor good, the game is not really working ( collisions and items picking systems are not working very well ). The good point is that it can only get better!

( I'm quite disapointed to see that quality in one of your projects :/ )
Your comment made me immediately download it and browse the code. and to be honest, for a 1 week side project I see nothing wrong, sure a few more comments here and there might've been nice but besides from that, it's simple and easy to pick up and improve upon.

The code is quite easy to read so I do not see what's unpleasant with it, and besides from that, I do not see what's bad about the code for being purely SDL and a bit of C++.

If I came across rude I did not mean for it, just thought I'd chip in with my two cents.

Side note, I kinda like it, sure it were a few kinks here and there, but all projects start with making it work, and then perfecting it.

Re: Super Mario Brothers Engine

Posted: Sat Mar 03, 2012 10:09 pm
by Light-Dark
pimpy wrote:Don't want to look nasty on my first post on this forum but only the graphics are good. The code is really neither pleasant to read nor good, the game is not really working ( collisions and items picking systems are not working very well ). The good point is that it can only get better!

( I'm quite disapointed to see that quality in one of your projects :/ )
as joxno said it was a 1 week side project, i think i stated that above -_-, i released it for others to improve upon, while i welcome criticism i think your just being blatently rude by ignoring my 'warning' that i made it in a week on my spare time,again refering to joxno its far from completion and shall get better over time, although im very confused by "the code is really neither pleasant ot read nor good" i attempted to make it very clear to understand, regarding the collision, again with one week thats not alot of time.

Re: Super Mario Brothers Engine

Posted: Sun Mar 04, 2012 8:06 am
by pimpy
Light-Dark wrote:'warning' that i made it in a week on my spare time
Ooops, I should read the entire post before posting... And I have to admit that my post looks more like a troll-post than a helping post so I would like to explain myself on what I said.

The code is not pleasant to read :
Many source files are too big and most of your functions are just too bug and too compact. You declare some global vars in the middle of your source code, this can be quite confusing... In some function you just use some magic values, we don't know what represent and it's not indicated with comments :/

The code is not really good :
Well I know it's a one week project coded on your spare time but it's better to do things correctly the first time and having less cool features working on your first release than having a code full of global vars ( beurk ) and having some functions as loadImage and checkCollision in main.cpp, I don't think it's that much time consuming to create some simple Sprite or CollisionHandler simple classes just to have a well organized code. Anyhow I think your a good enough to manage a simple project and restructure it correctly.

Just want to conclude by saying that this is only the point of view of a relatively not experienced programmer and that you should do what you think is better for your project. ( <- thanks for helping captain obvious )

Re: Super Mario Brothers Engine

Posted: Sun Mar 04, 2012 10:45 am
by Light-Dark
Ok, now i get where your coming from and yes i would agree now that having a class that will handle Drawing/collision would be a decent idea and i will keep that in mind for the future :)