CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: annoyingcalc on October 08, 2015, 09:33:39 PM

Title: Super Mario 84
Post by: annoyingcalc on October 08, 2015, 09:33:39 PM
For the last month after toying around in Axe for a bit of the summer, I started a Super Mario game. I think it's gotten to the point where I can finally post about it. 

I aim for this project to beat Sam Heald's Super Mario 2.0, because it's been 16 years since its release and there should have been a better Mario game released since then.
*cough*Project M*cough*.

I am using screenshots from Project M to decide what features I should add.

Here are the features I have/plan to have

Done:
Horizontal Scrolling (duh)
On calc level editor
Animated blocks
Standard blocks
Standard powerups (eg: 1up, regular mushroom, fireflower)
Animated mario


Planned:
Wider enemy selection (currently only Goombas, planned: Koopas, bullet bills,
Better physics (If anyone could help me with this that'd be awesome)
Built in levelpack

Working on:
Vertical scrolling (nearly done, I really wish I had started this at the beginning of the project, just fixing bugs)

Maybe:
Racoon powerup
Yoshi (This is less likely)


Probably not happening:
Greyscale backgrounds.
Map like Super Mario Bros 3

Screenshots coming soon. If anyone has any questions just ask! Download will probably come shortly after screenshots.

Also, if anyone has a better name for the project I'd love to hear it.
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 08, 2015, 10:11:15 PM
FINALLY!

I was so happy to hear about Project M, and then it was never completed.  The Mario game that is out there right now sucks because of no grey scale.

But anyway, I think that this is great that someone is actually making a decent Mario game.  Do you think that I could be a beta tester?
Title: Re: Super Mario 84
Post by: annoyingcalc on October 08, 2015, 10:37:49 PM
Sure, once I iron out the major bugs and can access my laptop instead of this iPad I'll send a copy.

Also, currently there is no greyscale, partly due to my limited artistic abilities. If anyone wants to help with graphics that would be nice. However, in my opinion it looks a bit nicer than Sam Heald's right now.
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 08, 2015, 10:38:37 PM
Lol, I wish that I could help with grey scale...
Title: Re: Super Mario 84
Post by: LD Studios on October 09, 2015, 12:17:01 AM
Quote from: annoyingcalc on October 08, 2015, 10:37:49 PM
Sure, once I iron out the major bugs and can access my laptop instead of this iPad I'll send a copy.

Also, currently there is no greyscale, partly due to my limited artistic abilities. If anyone wants to help with graphics that would be nice. However, in my opinion it looks a bit nicer than Sam Heald's right now.
If implementing grey scale is really just a matter of artistic abilities, tell us the sprites you need at what dimensions and I'm sure people will help
Title: Re: Super Mario 84
Post by: JWinslow23 on October 09, 2015, 01:56:53 AM
Quote from: annoyingcalc on October 08, 2015, 10:37:49 PM
Sure, once I iron out the major bugs and can access my laptop instead of this iPad I'll send a copy.

Also, currently there is no greyscale, partly due to my limited artistic abilities. If anyone wants to help with graphics that would be nice. However, in my opinion it looks a bit nicer than Sam Heald's right now.
3-lvl or 4-lvl? I could help if you want. ;)
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 02:03:41 AM
Mario is 16x8, and everything else is 8x8. (However I'd be willing to modify it to work 16x8 for enemies like koopas)

Either 3-lvl or 4-lvl greyscale is fine.

On a side note, I fixed all collision detection (the major bugs) with vertical scrolling :D
I'll upload screenshots once I get my laptop again.
Title: Re: Super Mario 84
Post by: tr1p1ea on October 09, 2015, 02:17:52 AM
Looking forward to screenshots!
Title: Re: Super Mario 84
Post by: Unicorn on October 09, 2015, 04:43:46 AM
Quote from: tr1p1ea on October 09, 2015, 02:17:52 AM
Looking forward to screenshots!
Indeed! This sounds like it'll be quite a game :)
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 09, 2015, 06:32:08 AM
Pictures, or it didn't happen :P


I am glad you are trying calculator programming again, though. :)
Quote from: SiphonicSugar on October 08, 2015, 10:11:15 PM
FINALLY!

I was so happy to hear about Project M, and then it was never completed.  The Mario game that is out there right now sucks because of no grey scale.

But anyway, I think that this is great that someone is actually making a decent Mario game.  Do you think that I could be a beta tester?
I don't think the current Mario game is that bad. JUst because it lacks grayscale doesn't mean it's bad either. The problem is that it's so ancient and buggy that it's surprising that no new Mario game ever came out.
Title: Re: Super Mario 84
Post by: aetios on October 09, 2015, 06:33:26 AM
You should make it like super mario 64 :trollface:
More seriously, this looks like a hell of a job. Make sure not to get caught on very small details and I guess ask for help whenever you need it. I'd love to see this happen.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 06:46:02 AM
Yeah, Physics ans graphics are probably the biggest things holding me back. I am ready to make screenshots, I just need access to a pc with TI-Connect and wabbitemu
Title: Re: Super Mario 84
Post by: c4ooo on October 09, 2015, 10:36:00 AM
If you want help with interupt greyscale, i guess i could send / explain how to use runer112's Greylib. My version is a bit modified, though and just contains what i need. (Basically do to axe's long compile time it was impossible for me to sit and watch the giant lib got compiled :P ) Also, i presume you are using partial redraw, right?
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 02:36:07 PM
Partial redraw? Never heard pf it, could you explain?
Title: Re: Super Mario 84
Post by: CKH4 on October 09, 2015, 04:10:46 PM
Only drawing the parts of the screen that have changed.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 04:12:52 PM
Oh, no I'm not using it as of now, but I could implement that later.
Title: Re: Super Mario 84
Post by: c4ooo on October 09, 2015, 06:36:55 PM
Basicly. for excample if you want to go right, you dont do increment x and redraw the whole screen. Instead you shift a specifed buffer to the left and draw the rightmost column.

In the beginning, you will have to render the whole map onto a draw buffer, and every from you will have to copy that buffer onto the main draw buffer, and then render the ui onto the main buffer.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 06:42:46 PM
This sounds like it might speed up the drawing a lot, I'll try when I get home and see how it goes.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 09, 2015, 08:25:21 PM
Physics don't need to be that complex IMHO for a Mario game but not redrawing the entire screen every frame would definitively be a good idea.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 09, 2015, 08:26:16 PM
By physics I mean how mario moves. If you compare Project M to what I have, mario moves better.
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 09, 2015, 08:26:35 PM
Quote from: DJ Omnimaga on October 09, 2015, 06:32:08 AM
Pictures, or it didn't happen :P


I am glad you are trying calculator programming again, though. :)
Quote from: SiphonicSugar on October 08, 2015, 10:11:15 PM
FINALLY!

I was so happy to hear about Project M, and then it was never completed.  The Mario game that is out there right now sucks because of no grey scale.

But anyway, I think that this is great that someone is actually making a decent Mario game.  Do you think that I could be a beta tester?
I don't think the current Mario game is that bad. JUst because it lacks grayscale doesn't mean it's bad either. The problem is that it's so ancient and buggy that it's surprising that no new Mario game ever came out.
Yeah, I know, but one of the game boy worlds has a black back ground, and it is super hard to see where you are.
Title: Re: Super Mario 84
Post by: Snektron on October 09, 2015, 09:49:31 PM
Cool project :) I can't wait to see some screen to see what you have in store for us :)
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 10, 2015, 03:49:00 AM
Quote from: annoyingcalc on October 09, 2015, 08:26:16 PM
By physics I mean how mario moves. If you compare Project M to what I have, mario moves better.
Yeah true. But I mean that physics like in Sam Heald's Mario would be fine IMHO, although perhaps you could slow gravity down so that Mario doesn't jump as fast.

Basically, avoid anything like Zedd's physics or other things that are overly complex, else since it's your first ever Axe project you need to find every possible ways to keep speed high enough to avoid hitting a roadblock.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 12, 2015, 07:41:00 PM
Partial Redraw is coming along. It has had a huge speed increase. Screenshots as soon as everything works.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 12, 2015, 08:04:35 PM
Cool. I can't wait for the screenshot. Also I am curious about the graphical style you'll use. How big is the engine so far?
Title: Re: Super Mario 84
Post by: annoyingcalc on October 12, 2015, 08:18:57 PM
I based the graphics off Project M. Currently the executable is 12000bytes. (I have to compile it as a Flash App) The source is just under 8k
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 14, 2015, 04:11:09 AM
Ah I see. If you use his graphics then did you ask him permission, though? Also do you think you'll be able to get around the 8K code limit or is it an app?
Title: Re: Super Mario 84
Post by: Ivoah on October 14, 2015, 04:12:26 AM
Quote from: DJ Omnimaga on October 10, 2015, 03:49:00 AM
Quote from: annoyingcalc on October 09, 2015, 08:26:16 PM
By physics I mean how mario moves. If you compare Project M to what I have, mario moves better.
Yeah true. But I mean that physics like in Sam Heald's Mario would be fine IMHO, although perhaps you could slow gravity down so that Mario doesn't jump as fast.

Basically, avoid anything like Zedd's physics or other things that are overly complex, else since it's your first ever Axe project you need to find every possible ways to keep speed high enough to avoid hitting a roadblock.

Noooo! Physics are what make Mario games fun! I didn't like Sam Head's Mario game for exactly that reason, the physics are terrible. Please try to make good physics.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 14, 2015, 01:39:15 PM
Yeah but I meant he should not do them overly complex like in Zedd either. It's an Axe project, after all, and he needs to ensure that before he implements physics this complex, that he still has enough speed left to implement collision detection with enemies and shrooms. I bet that physics as complex as in Project M would cause extreme slowdowns (eg game running at 5 FPS on 6 MHz calcs)
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 14, 2015, 01:42:17 PM
Lol, well, I can't wait for this game anyway.
Title: Re: Super Mario 84
Post by: novenary on October 14, 2015, 01:54:18 PM
A platformer (especially if it's a Mario game) doesn't need complex physics, only simple gravity so it should be fairly trivial to implement. No need for Zedd.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 14, 2015, 02:49:17 PM
Quote from: Ivoah on October 14, 2015, 04:12:26 AM
Noooo! Physics are what make Mario games fun! I didn't like Sam Head's Mario game for exactly that reason, the physics are terrible. Please try to make good physics.
^^
Also, I'm not using Zedd or anything like that for this.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 19, 2015, 12:22:11 AM
Partial Redraw is done, only some minor drawing glitches are left. I'm ready to post screenshots, but I don't have access to a computer to take screenshots with. I may take a video of it running on my calculator, if I can't get access to a computer soon.
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 19, 2015, 01:14:38 AM
I'm buying some really good laptop for gaming and school, because right now, I am using something made in 2006.  Only 2GB of ram and a HORRIBLE GPU and CPU.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 19, 2015, 03:41:44 AM
I hope you get access to a computer soon D:. I can't wait for screenshots and I'm glad this is coming along nicely :)
Title: Re: Super Mario 84
Post by: annoyingcalc on October 23, 2015, 01:39:38 AM
The glitches with the enemies don't happen on calculator. For some reason they occur in wabbit emu.

SCREENSHOTS!

(http://i.imgur.com/q8pmxQn.gif)
Title: Re: Super Mario 84
Post by: Ivoah on October 23, 2015, 01:45:35 AM
Quote from: annoyingcalc on October 23, 2015, 01:39:38 AM
The glitches with the enemies don't happen on calculator. For some reason they occur in wabbit emu.

SCREENSHOTS!

(http://i.imgur.com/q8pmxQn.gif)

Looks nice! Please tell me those aren't the final physics though...
Title: Re: Super Mario 84
Post by: annoyingcalc on October 23, 2015, 01:46:24 AM
Of course not lol This is supposed to feel like a mario game
Title: Re: Super Mario 84
Post by: Ivoah on October 23, 2015, 01:47:12 AM
Quote from: annoyingcalc on October 23, 2015, 01:46:24 AM
Of course not lol This is supposed to feel like a mario game

Phew.
Title: Re: Super Mario 84
Post by: SiphonicSugar on October 23, 2015, 02:29:14 AM
Lol :P
Title: Re: Super Mario 84
Post by: novenary on October 23, 2015, 04:08:36 AM
Is it so slow because you slowed it down or because it's too slow ? :P (no offense meant, it looks nice so far besides that and the physics).
Title: Re: Super Mario 84
Post by: annoyingcalc on October 23, 2015, 04:11:42 AM
The biggest slowdown is that I have somethings completely redraw the map. I will be adding a simple function to draw the tile at a certain position to fix this.
Example of this is when an enemy falls upside down off the screen, the blocks behind him need to be redrawn.

Mario's physics have a bit to do with it as well
Title: Re: Super Mario 84
Post by: novenary on October 23, 2015, 04:13:19 AM
I had to write my own horizontal scrolling routines in assembly to overcome the speed issues. The vertical scrolling routines that come with Axe are perfectly fine though.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 23, 2015, 05:31:55 AM
Looks good so far. I wonder if you could try making an animated screenshot in jsTIfied? Also I think the pipes top should be a bit larger in height and perhaps some gradient added to pipes.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 23, 2015, 02:16:35 PM
I will change the pipe sprites when I get a chance.
Title: Re: Super Mario 84
Post by: c4ooo on October 23, 2015, 03:54:48 PM
Quote from: annoyingcalc on October 23, 2015, 04:11:42 AM
The biggest slowdown is that I have somethings completely redraw the map. I will be adding a simple function to draw the tile at a certain position to fix this.
Example of this is when an enemy falls upside down off the screen, the blocks behind him need to be redrawn.

Mario's physics have a bit to do with it as well
I think you missed part of what i was saying :P
You should have a separate buffer that only has the visable tilemap on it. It is in this buffer that you do your partial redraw stuff. Each frame you copy that to the main buffer, and then draw the entities onto the main buffer. The tile map should be fully drawn (onto the secondary buffer) only once, right before the game loop, or if a block changes or something (even then you don't have to redraw the whole tilemap) ;)
Title: Re: Super Mario 84
Post by: annoyingcalc on October 23, 2015, 07:41:54 PM
Yeah, what happened was that I haven't updated the enemy code to do that. I have been focusing on better collision detection, because I changed how the map is stored.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 24, 2015, 08:23:17 PM
By the way, will Mario have an extra white outline when walking on dark backgrounds?
Title: Re: Super Mario 84
Post by: c4ooo on October 24, 2015, 09:48:04 PM
Quote from: annoyingcalc on October 23, 2015, 07:41:54 PM
Yeah, what happened was that I haven't updated the enemy code to do that. I have been focusing on better collision detection, because I changed how the map is stored.
Ahh ok ;)
Title: Re: Super Mario 84
Post by: annoyingcalc on October 24, 2015, 11:21:12 PM
Quote from: DJ Omnimaga on October 24, 2015, 08:23:17 PM
By the way, will Mario have an extra white outline when walking on dark backgrounds?
Once I implement them, yes
Title: Re: Super Mario 84
Post by: semiprocoder on October 25, 2015, 12:49:24 AM
Do you plan for this game to be compatible with the worlds from Super Mario 2.0, and maybe adding new worlds with some new features?
Title: Re: Super Mario 84
Post by: JWinslow23 on October 25, 2015, 05:00:06 PM
Quote from: semiprocoder on October 25, 2015, 12:49:24 AM
Do you plan for this game to be compatible with the worlds from Super Mario 2.0, and maybe adding new worlds with some new features?
In keeping with the inspiration of Project M, maybe you can add Yoshi? :P
Title: Re: Super Mario 84
Post by: annoyingcalc on October 26, 2015, 12:45:05 AM
I'm not sure about levels from Super Mario 2.0. If I do add it, it'll be probably be after it's released.

As for Yoshi, most likely not.
Title: Re: Super Mario 84
Post by: JWinslow23 on October 26, 2015, 10:57:15 PM
Quote from: annoyingcalc on October 26, 2015, 12:45:05 AM
As for Yoshi, most likely not.
Aweh :( Well, at least I hope you can make your own levels. It's just not a modern Mario game if you can't make your own levels *cough*MarioMaker*cough* :P
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 27, 2015, 05:02:29 PM
Maybe there could be some converter or something once the game is done so that old Mario levels work. you would need to ensure that the new graphics works well with the levels, though, and obviously some might no longer be beatable due to physics, but that's fine since people can simply create new ones.
Title: Re: Super Mario 84
Post by: annoyingcalc on October 28, 2015, 10:51:25 PM
The biggest problem would be that this supports vertical scrolling while Sam Heald's does not.

Update:Working on the physics (the cause of the program looking slow)

Edit:As for a level editor, the only thing that needs to be done is the ability to name the levels.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 28, 2015, 11:30:54 PM
Yeah but can your engine detect maximum level height or is it a fixed height for every level? Sam Heald's Mario levels would just need to be converted with extra rows of tiles (empty).

Also if speed is an issue, would frame skipping fix some of it? (eg only rendering every 8 frame)
Title: Re: Super Mario 84
Post by: semiprocoder on October 29, 2015, 01:47:23 AM
Do you plan to have bullets in your mario game?
Title: Re: Super Mario 84
Post by: annoyingcalc on October 29, 2015, 05:32:25 AM
Currently, it's a fixed height of 16 blocks.  Speed isn't the issue, it's the physics making it look slow. As for bullets, yes  they are planned along with koopas.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 29, 2015, 05:54:39 AM
YEah this is why I insisted to ensure that physic isn't overly complex (or at least not as complex as Zedd). i hope you can overcome the speed problems, though.
Title: Re: Super Mario 84
Post by: Unicorn on October 29, 2015, 06:11:18 AM
Wow, those screenshots are looking very good! What kind of enemies are those? Hopefully not Koopas... O.O (sorry for the late response, have had some computer problems)
Title: Re: Super Mario 84
Post by: annoyingcalc on October 29, 2015, 07:09:48 AM
They are koopas Actually, they're goombas. Also, just wondering, does anyone have any tips on how to specify a name to save/load a level from?
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on October 29, 2015, 06:48:59 PM
You should ask this in this topic: https://codewalr.us/index.php?topic=165.0 (Axe questions)
Title: Re: Super Mario 84
Post by: annoyingcalc on November 02, 2015, 10:30:07 PM
Progress is slowly being made. I have sped the program up significantly, but the physics are still pretty pathetic. The biggest slowdown currently is the animation function because it draws animated blocks every program tick. I can't think of any way to speed this up, so I'll have an option to disable animations.

Otherwise, the biggest task left ahead of me is making the physics not suck.

Also, I'm working on adding enemies, items, and tiles. If anyone has any suggestions for physics, I'd be open for help.

(My problem is I can't seem to create a realistic way for mario to move)
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on November 02, 2015, 10:45:46 PM
Can't you animate one tile per frame? Animations will be slower but it won't slow things down as much.
Title: Re: Super Mario 84
Post by: annoyingcalc on November 02, 2015, 11:47:03 PM
Good idea. The only problem I can see is that for it to work I'd have transfer the main buffer to the back buffer every time which might take longer than just drawing all of them. I'm going to go check the Axe documentation.

EDIT: It appears that would be much slower.
Title: Re: Super Mario 84
Post by: alexgt on November 03, 2015, 01:27:52 AM
Sorry for not seeing this sooner (I was gone...) but this sounds awesome! I played other Mario games on my 84+ so I hope that you will complete it :) I will definitely try it out ;)
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on November 03, 2015, 04:25:19 AM
Sorry to hear Annoyingcalc. As for physics, all you need is acceleration for both walking movement with a maximum speed, as well as for falling down (the value is negative when you jump and slowly increase back to positive when you start moving down)
Title: Re: Super Mario 84
Post by: semiprocoder on November 03, 2015, 05:01:22 AM
Wait, isn't walking just at a constant speed, while jumping has gravity. Well, I guess you could have a walking accell, but mario would have to accel really quickly.
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on November 03, 2015, 09:39:34 AM
It depends. Mario normally starts walking slowly but reaches max speed fast. I guess he could always ditch acceleration for walking and only worry about jumping physics, since, after all, Super Mario Bros 3 horizontal physics weren't that realistic when mid-air. :P
Title: Re: Super Mario 84
Post by: SiphonicSugar on November 21, 2015, 04:18:05 PM
So, how far into this game do you think you are?

Also, do you know when you might put up a download link?
Title: Re: Super Mario 84
Post by: annoyingcalc on November 21, 2015, 07:07:29 PM
I'd say that I'm late in development. Progress is slow, but here's my todo:
Fix enemy collision detection
Finish the option to toggle animations (animations are the biggest source of lag, but they also control a few things like when to spawn in items, so I need to make that code independent of animations)
Add more enemies
Add more blocks
Add the ability to specify a name for a custom level
Final bugfixes

Then I'll be done and release it. I'll post screenshots of with/without animations soon if anyone wants it
Title: Re: Super Mario 84
Post by: SiphonicSugar on November 21, 2015, 07:18:58 PM
You have really good side scrolling in this game, I wish that I knew how to do that...  :-|
Title: Re: Super Mario 84
Post by: Dream of Omnimaga on November 22, 2015, 07:28:34 AM
Quote from: annoyingcalc on November 21, 2015, 07:07:29 PM
I'd say that I'm late in development. Progress is slow, but here's my todo:
Fix enemy collision detection
Finish the option to toggle animations (animations are the biggest source of lag, but they also control a few things like when to spawn in items, so I need to make that code independent of animations)
Add more enemies
Add more blocks
Add the ability to specify a name for a custom level
Final bugfixes

Then I'll be done and release it. I'll post screenshots of with/without animations soon if anyone wants it
How many levels do you have so far by the way? Also have you gotten any luck fixing the speed issues that you had? I'm glad this is still alive :)