Super Mario Bros. Demo for MATLAB
--------------------------------------
Mingjing Zhang @ Simon Fraser University
---------------------------------------
What it is
----------
This is a short demo of World 1-1 of Super Mario Bros. The demo emulates the behaviour of the original NES version as precise as my time and energy allow.
There are no enemies/coins/power-ups. The bricks are not interactive.
The flagpole and castle at the end of the stage are missing. The demo terminates when Mario moves out of the stage on the right.
There is background music which can be turned on before the game starts.
*The image you see up there is an ACTUAL screenshot of this demo.
----------
Installation
------------
Regular Version:
Put stl_mario_main.m and two .mat files under the same folder.
Run stl_mario_main.m
App Version:
Just like any other MATLAB app
------------
Control
-------
A/D - Left/Right
J - Sprint
K - Jump
-------
How to Quit
-------
1. Walk to the end of the stage, or;
2. Close the figure window
* WARNING: The window should shut down itself upon error. If it doesn't, please type 'delete(gcf)' in the command window to manually kill the figure window.
-------
Enjoy!
Mingjing Zhang (2021). Super Mario Bros. Demo (https://www.mathworks.com/matlabcentral/fileexchange/40961-super-mario-bros-demo), MATLAB Central File Exchange. Retrieved .
Inspired by: Mario Sim v0.1, Theme from Super Mario Brothers Song
Inspired: SpriteKit Framework
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
So FUN!
Just wondering, can I use it on common objects like used plastic bottles?
I have a waste treatment project where early detection and removal of certain waste is needed.
https://www.wiscon-tech.com/system-solution/
MATLAB好强,大神也强!
The MATLAB community never fails to impress me haha
Haha, brillant! Would be nice to make this into an actual game
very nice!
nb,matlab 大法好,话说作者是中国人吗
Matlab真是除了不会生孩子,其他啥都会
Pretty awesome!
impressive
Very impressive. Thank you for making this. Although I am wondering if this is ok with the copyrights.
i did not find two.m file.
So amazing!
Very nice and sexy :))
Sir, you are truly a legend who stands among mere mortals. Well done.
You are amazing ..
You make me remember one of the most lovely and good memories in my life
Excellent! Congratulations Mingjing Zhang
@David,
Thank you for the feedback. The 'start' and 'select' buttons don't really do anything in this demo. The reason I left them there is due to concerns of extensibility. For instance, in future versions I might add in the pause/resume functionality. That's when the 'start' button is going to be needed.
As for the initial unresponsiveness, normally this won't happen if 1) the figure window has focus and 2) the keypress events are not hijacked. (1) is very easy to rule out so I assume this is not the cause on your machine. Therefore, (2) seems to be the most possible cause. For instance, I have a Chinese input method installed on my computer, and for some reason it always automatically launches itself when the game window pops up. The input method intercepts all my keypresses so they cannot be received by MATLAB figure window. As a result, I have to press the key combo 'CTRL + SPACE' to disable the input method in order to play. This experience sounds a lot like what you have described. So could it be that you have some software that 1) intercepts keypress events and 2) can be disabled by _TAB_ ?
It is really impressive. I would have liked a short set of instructions on how to play.
I acknowledge that the included read-me file did indicate some control keys as
-------
A/D - Left/Right
J - Sprint
K - Jump
-------
However, I had trouble just getting started. Initially, when first loaded, none of the above keys did anything.
At lines 426 and 427 in the M-file are:
KeyNames = {'w','s','a','d','j','k','return','space'};
% KeyFuncs = {'up','down','left','right','sprint','jump','start','select'};
Hence I expected that hitting the return key, a.k.a. enter, would allow me to start. This was not the case.
I do not know if this is specific to my system/configuration, but I found that the _tab_ key was the one that started the demo's interactivity.
Very cool game! Thank you for your sharing!
Great retro-gaming, and in MATLAB, nonetheless. Looking forward to the full version!
Oh hell, is that really possible?? I just can use a word, INCREDIBLE!!!
You are brilliant, but I question your sanity. :)
Incredible!!!
Very cool demo. Really like the stuff you put up here.