Omnimaga

Calculator Community => Other Calculators => Topic started by: meishe91 on March 18, 2010, 07:30:09 pm

Title: Dual Layer Usage
Post by: meishe91 on March 18, 2010, 07:30:09 pm
So does anyone have any good game suggestions that uses Dual Layers for maps or anything? I'm just a little curious to see these in action.
Title: Re: Dual Layer Usage
Post by: ztrumpet on March 18, 2010, 07:51:08 pm
Metroid Pi is an excellent example of normal Dual Layer: http://tibasicdev.wikidot.com/archives:metroid-pi
Another notable example is Zoith, which was the first dual layer game ever: http://www.ticalc.org/archives/files/fileinfo/395/39575.html
Elmgon and Serenity (see their sub-forums) are examples of the Dual Layer shifted (Serenity style) graphics, but they aren't done yet. :)
Title: Re: Dual Layer Usage
Post by: meishe91 on March 18, 2010, 07:55:48 pm
Thanks, I shall try them out :)
Title: Re: Dual Layer Usage
Post by: DJ Omnimaga on March 18, 2010, 08:04:04 pm
What I like with this technique is how you manage to have sprites looking as good as ASM games, yet, still not lose speed that much due to BASIC limitations and on top of that, not require ASM libs to display them, meaning smaller game memory requirements
Title: Re: Dual Layer Usage
Post by: meishe91 on March 18, 2010, 08:06:08 pm
If I ever find out more about Dual Layers and how they work and such I will right something for the BASIC Routines section.
Title: Re: Dual Layer Usage
Post by: DJ Omnimaga on March 18, 2010, 09:07:44 pm
it would be nice to see a tutorial. It's quite simple, though, in overall. All you need to do is

Text(-1,0,0,"LLLLLLLLLLLLLLL
StorePic 0
Text(-1,0,1,"XXXXXXXXXXXXXXX
RecallPic 0
StorePic 0

And to figure out good char combinations you can use one of the two programs in the downloads section or ask permission for Ztrumpet, Builderboy, Speler or Harrierfalcon if you can use their own combinations.
Title: Re: Dual Layer Usage
Post by: meishe91 on March 18, 2010, 09:20:16 pm
Ya, I know the concept is pretty easy. But to be able to use them in function with games or other uses, I think, is a little more complex.
Title: Re: Dual Layer Usage
Post by: DJ Omnimaga on March 18, 2010, 09:23:30 pm
Well the only real issue is how parts of the map gets erased when the character is displayed, since in my posted method, the map would be 6x7 while your char would be 6x8 including the white spaces. In this case it is good that the programmer knows that he must not recallpic 0 until he finished displaying the character. When the char moves around, he erases it with a Text( command, then display at the new location, then recall pic. Otherwise it might cause display issues. You could write a tutorial explaining how to do this and maybe simple collision detection and the like, altough I would start with the moving around then add collisioon later so it won't be too hard to read the code at first
Title: Re: Dual Layer Usage
Post by: meishe91 on March 18, 2010, 09:27:27 pm
Ya.