[TI-ASM] Looking for a tilemap (smoothscrolling)

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

[TI-ASM] Looking for a tilemap (smoothscrolling)

Post by leofox »

I'm trying to make gravlab work with tilemaps too, so that i'm not restricted to the screen size for games. However, my smoothscrolling tilemap from desrealm will not work with it.. The kind of tilemap I'm looking for has to be able to output from any pixel position, like I call the tilemap with certain coordinates as input, and it'll draw the image from there. (as opposed to just scroll to a side). I hope you understand what i mean..

I could make this myself, but if one of you guys already made something similar I would consider it a waste of time (why invent the wheel twice aye?). Also, I really suck at that sort of thing, so it would most likely take ages, and be way too slow and ram consuming.

I really hope you can help me..
Image
Image
User avatar
Halifax
Sir Posts-A-Lot
Posts: 225
Joined: Mon 01 Jan, 2007 10:39 am
Location: Pennsylvania, US

Post by Halifax »

Umm have you tried MiSStER tilemap routine which is on ticalc.org it does very smooth scrolling
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

There's many libraries available to you, from Crashman's to Jim's. Why don't you just roll some dice and pick the one it lands on?
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

threefingeredguy wrote:There's many libraries available to you, from Crashman's to Jim's. Why don't you just roll some dice and pick the one it lands on?
lol ya i agree.
Image Image Image
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post by leofox »

The misster tilemap looks good.
Image
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

anyone got stats yet comparing them all?

It'd be nice to see a size and t-state comparison for all of them. Definitely Jim e's, Dwedit's, Crash's, and misster
Image Image Image
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post by leofox »

I'm using Misster's tilemap now, it works exactly like i'd want it to, and it's definitely fast enough.
Image
Image
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

Crashman's is by far the fastest, but it is the least developer friendly one out there.
* Ridiculously fast!
* You must use a VERTICAL graphmem layout, not compatible with romcalls or existing sprite routines
* You must use vertical tilemaps, not so much a big deal, since you can easily rotate them
* It needs XX00 aligned memory for the tile graphics and graphmem.
* 32 Tiles max, since tile numbers are multiplied by 8 before being added to the map. (this saves the routine from having to do that multiplication)
* Heavily unrolled, it's optimized for speed and not size.
* Routine is less flexible about the size of the tilemap, it must be defined at compile time. You can still set rows or columns of a tilemap as the player moves around, just like on a nes

Now, I know how to fulfill those requirements to use the routine, and could help anyone out who wants to use that one.

I'll guess that crashman's is at least twice as fast as misster's routine, since it takes misster's routine 23 instructions to set up drawing a tile, while crashman's takes 2 instructions, the tile rendering inner loop is also 101 tstates, vs 55 for crashman's. But that speed didn't come from nowhere.
You know your hexadecimal output routine is broken when it displays the character 'G'.
User avatar
DigiTan
Calc Master
Posts: 1069
Joined: Fri 04 Mar, 2005 12:52 am
Location: NW Wisconsin
Contact:

Post by DigiTan »

I Image that. It's also worth addign it comes in size-optimized and speed-optimized flavors to suit your eyecandy demands. If you need more than 32x32 dimensions or more than 32 tiles, I'd go with the Jim e mapper. I haven't used it yet, but it got its share of praises in the Sonic thread. Something for everybody.
My diet consists of nails, code-stealers, and HP fans.
Projects:

Robot War [TI-82, TI Flash App]
Sonic the Hedgehog [Multiplatform]
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

But I assume that between Dwedit's, Jim e's, and Misster, they're about in the same ball park?
Image Image Image
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

The easy way to test is to have it scroll an entire screen completely left and right 10 times, then time how long it took.
You know your hexadecimal output routine is broken when it displays the character 'G'.
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

The fun way would be to set up an interrupt to count the frame rate.
Image
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

The tilemap routines often use the shadow registers, so they need interrupts disabled.
You know your hexadecimal output routine is broken when it displays the character 'G'.
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

Dwedit wrote:The tilemap routines often use the shadow registers, so they need interrupts disabled.
Theres always the fall back of the stack of course.
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Liazon, Im afraid MiSSTeR probably wont be anywhere close to the speed of Jim e's or Dwedit's. I also have a tilemapper i was working on a little while ago, it isnt quite finished yet, it needs to be optimised more ... and it might not be suited to everyone.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Post Reply