Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: AssemblyBandit on November 09, 2013, 06:07:25 pm

Title: Mario for the +C
Post by: AssemblyBandit on November 09, 2013, 06:07:25 pm
Now that PacMan has finished up the so called 'Bundle' (shoulda seperated the topics!), its time to introduce some more games. An update to PacMan will be released soon to address the bugs, by the way. I'm going to be working on a game based off of SMB1. I'm going to predict that moving around will be slow and the screen has a bunch of leftover room in the sky so levels will be created around that. I still haven't decided on any power ups, but the ability to push blocks around may play into the multi-tiered levels. By next week I should have a demo released displaying the speed of a basic Mario sprite moving around a background. I will be sending the basic flow of the engine to tr1p1ea to get some feedback but basically its going to be 160 width partial images looping around the 320 width base image updated line by line. Just a note, its faster to scroll the base image then using partial images, which is why I kept Tunnel using the full 320 resolution, but 160 mode is faster at drawing double size sprites. I may make two different versions and take a vote!
Title: Re: Mario for the +C
Post by: Sorunome on November 09, 2013, 06:26:33 pm
Nice, a mario clone for the 84C, i hope this'll be a success :D
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 09, 2013, 06:27:29 pm
This seems promising. I don't think there should be many speed issues with horizontal scrolling as long as the background is mostly a plain color or that you copy the 8x8 or 8x16 area behind Mario everytime he moves (same for enemies).

As for power ups, just make sure to add the basic ones like in SMB at first. :P

Will we be able to go through pipes and will there be a level editor? (with the ability to use SMB1 and 3 tiles maybe)
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 09, 2013, 06:56:41 pm
I'll be using Tiled to create the levels so I might put out a converter that can be used with that or something. Pipe travel may be included although I'm not sure how I would work that into a level editor (which is the only reason why I can't say that pipe travel will be included). I'll try to work everything out and have some definitive answers by the end of next weekend.
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 09, 2013, 07:03:07 pm
That reminds me... can Tiled do various formats for maps? I am curious if, for example, it can generate xLIBC map data...

Also tr1p1ea created 8x8 SMB3 tiles, so if you ever need any for it, you could maybe ask him. They would not be consistent with the SMB1 graphics you use, though, since SMB1's are anti-aliased, while his aren't.
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 09, 2013, 08:22:10 pm
Tiled can output a few different formats but I don't think any are directly compatible with the calc. For instance, I'll be using the json format and I'm going to create a converter to format the json text to an asm file with '.db' and stuff. Oh, and json is not 0 based, tiles start at 1.
Title: Re: Mario for the +C
Post by: Streetwalrus on November 11, 2013, 07:20:39 am
Sounds cool, can't wait to see a demo of it ! :D
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 18, 2013, 05:10:20 am
Thanks Streetwalker, here's an early Demo Video (http://briandm82.com/wp-content/uploads/2013/11/VIDEO0108.mp4).

I started on a json parser that will convert the exported Tiled map data to an asm file. I haven't finished it yet, but it will definitely speed level creation.
Title: Re: Mario for the +C
Post by: Sorunome on November 18, 2013, 08:12:55 am
wha, looking awesome! :D
And yay, JSON :)
Title: Re: Mario for the +C
Post by: SpiroH on November 18, 2013, 09:26:24 am
.., here's an early Demo Video (http://briandm82.com/wp-content/uploads/2013/11/VIDEO0108.mp4).
I started on a json parser that will convert the exported Tiled map data to an asm file. I haven't finished it yet, but it will definitely speed level creation.
I'd call it the MarioJsonite! Looking great speedwise, keep it up. ;)
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 18, 2013, 01:10:16 pm
That's very cool, especially speed-wise. Hopefully you don't have too much problems getting such game to run fast. :)
Title: Re: Mario for the +C
Post by: tr1p1ea on November 18, 2013, 02:51:05 pm
Looking great! I have some early Mario test stuff with tilemap and sprites etc and there are no issues with the speed of sprites as well which is encouraging (actually too fast).

Also wondering if anyone has used Mappy? Its a tilemap editor that has been around for a while that ive been using for stuff.

Looking forward to progress updates!
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 18, 2013, 03:41:01 pm
Looking great! I have some early Mario test stuff with tilemap and sprites etc and there are no issues with the speed of sprites as well which is encouraging (actually too fast).

Also wondering if anyone has used Mappy? Its a tilemap editor that has been around for a while that ive been using for stuff.

Looking forward to progress updates!
The main concern with Mario that AssemblyBandit had was unaligned sprites, because to erase the sprite in question, he needs to redraw 4 background sprites if they are not a single color, so with many enemies it could have slowed things down. With the Mario sprite (8x16 when big) and three enemies at once (8x8), this would be 18 extra tiles to draw every frame in addition to the row of 15 tiles on the side of the screen.

As for Mappy, I would probably use it if it supported xLIBC map format and whatever I use on the Prime.
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 18, 2013, 05:12:30 pm
Thanks everyone! It doesn't go as fast as I would like right now, so yeah, adding enemies and stuff might slow it down to an undesirable speed. I'll start working more on it after I finish Jumper.
Title: Re: Mario for the +C
Post by: tr1p1ea on November 18, 2013, 05:20:13 pm
Im wondering if you are doing any buffering at all, as in, is there any overdraw with sprite movement?

Also DJ i made a couple of scripts to export data to a hex string for mappy, this is what i use with xLIBC currently ... but we can discuss that in a different thread i guess!

How is Jumper coming along, and will there be any screenies of sprites and such for this game?! :).
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 18, 2013, 06:03:52 pm
The buffering is 2 pixel columns per frame. It grabs 2 lines from every tile that needs to be displayed and places one in front of the viewing screen (160 px), one behind it, then scrolls the viewing screen over 1 pixel. The pixel column placed behind the viewing screen is used to loop the 160 px viewing screen around the 320 px background screen. I think that's the most efficient way of doing it because partial images don't support hardware scrolling. I guess that's the method you used for the SMB3 demo because the speeds are similar right? A jumper demo/video should be out by tonight.
Title: Re: Mario for the +C
Post by: Loser on November 18, 2013, 06:13:46 pm
That game looks really cool!
(wishing i had an 84 cse)
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 18, 2013, 06:21:05 pm
Thanks, you should get a +C, I got a bunch of games on the way ;)
Title: Re: Mario for the +C
Post by: tr1p1ea on November 18, 2013, 11:38:09 pm
Cool, although technically you can scroll partial images by updating their start/end x every frame (as opposed to VLE) ... but there are some issues with this as well.

Are you worried about flicker with sprites?
Title: Re: Mario for the +C
Post by: TheCoder1998 on November 19, 2013, 01:11:50 am
playing mario... on a calculator... IN COLOR!?!
MUST. BUY. TI84+CSE NOW!
but yeah it's looking really cool ^_^
Title: Re: Mario for the +C
Post by: Hayleia on November 19, 2013, 01:35:24 am
playing mario... on a calculator... IN COLOR!?!
Never heard of gpSP and gbc4nspire ?

Anyway, That looks great AssemblyBandit ! I think you shouldn't worry too much about speed.
Title: Re: Mario for the +C
Post by: TheCoder1998 on November 19, 2013, 01:43:31 am
oh yeah but i don't own a nspire sadly...
but i did hear of them before :) (they're awesome :D)
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 19, 2013, 02:06:17 am
At least on the 84+CSE you don't have any risks of permanently losing access to ASM programs. :P
Title: Re: Mario for the +C
Post by: Hayleia on November 19, 2013, 02:10:38 am
At least on the 84+CSE you don't have any risks of permanently losing access to ASM programs. :P
You never know what TI can do. But yeah, I don't think they'll try to block anything on a z80 calc. If they tried, the community would unlock it in two days anyway, given the knowledge some have on z80s (even if the CSE is not the same as a +SE).
Title: Re: Mario for the +C
Post by: DJ Omnimaga on November 19, 2013, 02:20:32 am
I seriously doubt that they would block ASM on the 84+CSE, unless they were really concerned that the calc could get banned due to people circumventing the teacher mode. Plus as you said, the community could easily unlock it, unless TI found a nasty way to lock it again (after all, they tried with Boot 1.03). I think that calc was due to the high popularity of the Z80 line, despite the arrival of the TI-Nspire 6 years ago, and TI decided to add a color screen to that model (without much hardware upgrades besides that) to make it look more attractive. Also, they might have decided to just go the color screen route without killing the 84+ line just so that the screen is easier to read. (And trust me, after using a color calc for a while, it's kinda weird to go back to the old monochrome screens, especially that my room lightning is kinda poor.
Title: Re: Mario for the +C
Post by: AssemblyBandit on November 19, 2013, 03:37:54 am
@tr1p1ea: I'm not too worried about flicker, it can't be as bad as PacMan!
@TheCoder1998: Thanks, you should definitely get the +C!
@Hayleia: Thanks! I won't be complaining no matter how fast it runs... well, maybe a little ;)
@DJ: My +C is for games only, the monochrome one is for math now! If I had to choose which one to carry around, its the +C for sure.