Language…
14 users online: caioskii, Cristian Cardoso, fanfan21, Golden Yoshi, Green Jerry, Hayashi Neru, JezJitzu, Josuke Yoshikage, KoJi, Maw,  Nanako, Shomi, tOaO, yoshi9429 - Guests: 246 - Bots: 283
Users: 64,795 (2,377 active)
Latest user: mathew

Super Mario World... in a web browser??

Non-Super Mario WorldWork in ProgressDemo

Hey all, it's been a while since I've posted in one of these C3 things.

So some of you might be reading the title of this thread and are thinking: SMW in a web browser? What does that even mean?? Is this some new-fangled fancy shmancy emulator? Has Jimmy lost his mind yet again??

While I can assure you that yes, I have lost my mind again, it's not quite as crazy as you might be thinking.

About a month ago, I decided to try my hand at writing a game using HTML5+JavaScript, and I thought it'd be a fun idea to program an SMW-like engine using these resources. I just finished up putting together a small demo of what I've completed so far before taking a look at the SMWC discord this morning. I saw the C3 announcement and thought: Aha! Here is the perfect excuse to showcase what I've been working on for the past month!.... So here we are now lol

Anyway, without further ado:

https://ninji.dev/smwgame

(Recommend Google Chrome for this.. Firefox performance is dreadful on 2/3 devices I've tested)




There's not much yet... right now it's just Mario in an empty room. BUT this is using purely vanilla JavaScript; no frameworks, no pre-made engine. Everything you see here has been built from the ground up over the course of a few weeks.

Here is a list of everything that's been implemented so far:
- Mario's movements (walking, running, sprinting, etc.)
- Jumping/floor collision
- Resizable display canvas
- Configurable controller input (keyboard + gamepad support)

I spent some time carefully observing how Mario moves in the original SMW, tried to replicate it in JavaScript, and tweaked it until it felt *right*. It's not 100% accurate of course, but rewriting the source ASM code in JS line-for-line is not something I find productive...

Eventually I plan to add enemies, powerups, implement tile & entity collisions, add in an Overworld map, title screen... the whole shebang.




I'm not yet entirely sure what I plan to do with this...
Perhaps I'll release an HTML5 SMW engine that others can build game with.
Perhaps I'll revive one of my old Mario hacks and recreate it using this. :)
Who knows. For now though, I just wanted to show a small demo of what I've got so far.

Anyway that's it. Feedback and suggestions are of course appreciated! Let me know of any bugs too but I will not be happy about it


EDIT: Here is a short summary of the usability on each of the browsers:
- Chrome: Works perfectly
- Firefox: Works (Laggy on some devices)
- Opera GX: Works
- Brave: Works (Gamepads untested)
- Microsoft Edge: Works perfectly
- Chromium: Didn't load canvas for me, but perhaps it's one of the extensions I'm using.. more testing required.
- Chrome for Android: Works, but gamepad support is wonky (also slow)
Mario stuck in Javascript oh no #smw{._.}


You are challenged by Champion Daisy!

LAYOUT FOOTER:
Hopefully you're back to work.

So I try on my phone because I don't have a PC. I'm using USB OTG to Keyboard.

Anyway nice concept. Might I will collaborate in the future.


It's open source coding ? How
For not being a one-to-one recreation of the original source code, the movement in this plays surprisingly smooth and strikingly SMW-like. Doesn't at all have the weird almost-SMW feeling that a lot of other fangames elicit, and accomplishing this in JavaScript too is really impressive. Caught me off-guard just how far Mario was able to run offscreen as well, lol. Curious to see how you expand on this moving forward, very interesting concept.

Played this on the Opera GX browser and didn't notice any issues with performance.
Originally posted by Veck
For not being a one-to-one recreation of the original source code, the movement in this plays surprisingly smooth and strikingly SMW-like. Doesn't at all have the weird almost-SMW feeling that a lot of other fangames elicit, and accomplishing this in JavaScript too is really impressive. Caught me off-guard just how far Mario was able to run offscreen as well, lol. Curious to see how you expand on this moving forward, very interesting concept.

Played this on the Opera GX browser and didn't notice any issues with performance.

Haha, thank you!
I know exactly what you mean with that uncanny sort of almost-Mario feeling. Some of my earlier iterations of this actually suffered from that very same problem. After a bunch of trial and error and figuring out exactly which aspects were missing from the original I got it to where it is now, and I'm pretty happy with the result (actually fun fact, Mario runs faster in this than he does in the original game... the SMW run speed actually felt too slow, oddly enough).

Originally posted by Yuzu
It's open source coding ?

Most likely not open source, but once I have this in its first stable release I'm thinking of releasing the source code in some form or another. Might need to do a lot of refactoring before I show its face though oh boy

Originally posted by OrangeBronzeDaisy
Mario stuck in Javascript oh no #smw{._.}

This might make a good plot point for my game actually... #wario{-_-?}
u cant use the marioi sprite nintendo has copiedwrote it

also needs mobile/touch support :>
Dang, this is wild. The engine feels surprisingly accurate.
Check out my WIP romhack!
Originally posted by Jimmy
Originally posted by Veck
For not being a one-to-one recreation of the original source code, the movement in this plays surprisingly smooth and strikingly SMW-like. Doesn't at all have the weird almost-SMW feeling that a lot of other fangames elicit, and accomplishing this in JavaScript too is really impressive. Caught me off-guard just how far Mario was able to run offscreen as well, lol. Curious to see how you expand on this moving forward, very interesting concept.

Played this on the Opera GX browser and didn't notice any issues with performance.

Haha, thank you!
I know exactly what you mean with that uncanny sort of almost-Mario feeling. Some of my earlier iterations of this actually suffered from that very same problem. After a bunch of trial and error and figuring out exactly which aspects were missing from the original I got it to where it is now, and I'm pretty happy with the result (actually fun fact, Mario runs faster in this than he does in the original game... the SMW run speed actually felt too slow, oddly enough).

Originally posted by Yuzu
It's open source coding ?

Most likely not open source, but once I have this in its first stable release I'm thinking of releasing the source code in some form or another. Might need to do a lot of refactoring before I show its face though oh boy

Originally posted by OrangeBronzeDaisy
Mario stuck in Javascript oh no #smw{._.}

This might make a good plot point for my game actually... #wario{-_-?}
what about the other browsers
I'm sad about the lackluster Firefox performance. Fuck Chrome :(

Seriously though, even though it was quite laggy on my end this feels really accurate already. Reproducing the physics from experimentation must not have been easy, lol. Thankfully, enemies should be way easier in that regard (at least most of them), interactions and such aside.

Dunno what you'll do with this, and it is unfortunate that you might be limited by legality (although SMBX is still up and running, so who knows), but I'm looking forward to seeing more! Also, it's nice to see you again.
It's easily the best thing I've done
So why the empty numb?
Originally posted by Ladida
needs mobile/touch support :>

I originally had no intention of supporting mobile for this, but I suppose I can look into it
(will need to take a look at how mobile emulators handle input, maybe I can copy what they do bc I honestly have no idea the best way to handle it other than some tacky overlay lol)

Originally posted by JupiHornet
what about the other browsers

I've edited the original post to include a short summary of the results I and others have found across multiple browsers.

Originally posted by Koopster
I'm sad about the lackluster Firefox performance. Fuck Chrome

Yeah... I was quite jarred when I saw just how slow Firefox was compared to Chrome (I actually didn't realize it until last night. It ran smoothly on Firefox when I tried on my new laptop, but after checking on my old one I was horrified at how much slower it was).
I'll have to look into what the source of the slowdown is. I'm still a JS noob though so I'm sure I did something ridiculous somehow to cause that lol.

Originally posted by Koopster
Seriously though, even though it was quite laggy on my end this feels really accurate already. Reproducing the physics from experimentation must not have been easy, lol. Thankfully, enemies should be way easier in that regard (at least most of them), interactions and such aside.

Thank you! I'm actually really looking forward to doing the enemy patterns haha. Always my favorite part of any game I've worked on, there's something so satisfying about seeing the enemies slowly come to life after many iterations of development.



Originally posted by Ladida
u cant use the marioi sprite nintendo has copiedwrote it

Originally posted by Koopster
and it is unfortunate that you might be limited by legality (although SMBX is still up and running, so who knows)

It really is a gamble what Nintendo will decide to shut down and what they won't 😌 (It's amazing that SMWC is even still up holy moly) I'm optimistic about it though.

Worst case scenario, Mario gets reskin and renamed to "Plumber Man" lol

Non-Super Mario WorldWork in ProgressDemo