forums

TNT Basic Forums > Programming Q&A
Parallax?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

12-31-2001 20:58

Posted by:
Space Lemur

Click Here to Email Space Lemur   Find more posts by Space Lemur

Is there a way to do fast two-layer parallax in TNT Basic? I've tried a few methods already, ranging from redrawing maps every frame to copying canvases around, but they all kill the framerate on my 400 mHz PowerBook G3.
Ideally, I'd like to have a Genesis map in the foreground (scrolling with the player), and a large, prerendered pict or gif in the background -- all running at 30fps on an iMac 233. Is this just unrealistic, or is there an undocumented sweetsuperslickmegascroll trick?

Space Lemur

01-02-2002 16:39

Posted by:
Mark Tully

Find more posts by Mark Tully

Sorry, there's no direct support for parallex scrolling in TNT Basic.

If redrawing the genesis map is too slow, perhaps you could also try some sort of sprite based method if you don't have many tiles on screen at once.

You could get the tile info from the map and then use sprites as tiles on screen, overlaying your backdrop.

I've not tried parallex scrolling in TNT Basic myself, so maybe someone else has better ideas.

Mark

01-02-2002 17:18

Posted by:
ChrisD

Find more posts by ChrisD

Not that I have had time to try this in TNT...
BUT using RLE sprites you can get around good
30 FPS with say 4 layers of parallax on a G3/233
at 16bit.

I know cause Project Magellan does.
see http://www.plaidworld.com

Anyhow if I rember TNT is using RLE sprites of some sort and so Im assuming it should be able to so it also.
And if not then maybe it just needs a bit more optimizations which Mark could add at some point.

It should be ok to make a parallax game buying having
eveything be a sprite and then just drawing the part of a level that needs to be on screen. Even with total over draw every frame you can get over 30FPS on a 233.

So try it that way and if it not working buf TNT ;-)

01-03-2002 22:05

Posted by:
Space Lemur

Click Here to Email Space Lemur   Find more posts by Space Lemur

Argh

Thanks for the tips, but so far it looks like I'll have to settle for flat maps, as the game I have in mind will require either lots and lots of small tiles or a few big honkin' tiles (or sprites).
One more thing regarding fancy-schmancy maps (at the risk of turning this thread into a feature request frenzy): if I had a way to export a Genesis map to a PICT file or the like, I would be able to open the map in Photoshop and paint over the Genesis skeleton. Then I could put the finished image on a canvas with Draw Picture and use invisible tiles (the original Genesis map) for collision detection. This would make for some freaking awesome levels with very little restriction as far as visuals go. Memory requirements and loading times, though, might rear their ugly heads as the new thorns in my side...

01-03-2002 22:51

Posted by:
Mark Tully

Find more posts by Mark Tully

Saving a genesis map rendering

Genesis doesn't have a save as picture option, but you could open a hi-rez screen in TNT Basic, render a section of the map to screen and then save a screen shot as a work around?

Good luck!

Mark

01-04-2002 22:43

Posted by:
Space Lemur

Click Here to Email Space Lemur   Find more posts by Space Lemur

Foiled again! A single image with enough area to scroll around in breaks my target file size. Jpeg compression makes it small enough, but the loading times are hellish. Time for a new tactic and a new thread!

01-28-2002 04:34

Posted by:
Jon

Find more posts by Jon

Is this what you want?

I got a tile map to move over a still JPEG... is that what you are trying to do?

Frame rate of about 25 fps during scroll on an iMac.

Basically it works by drawing the picture to a canvas a bit larger than the screen. Then scrolling that canvas, and redrawing when it hits the end.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.