Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Tiled Background

Author
Message
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 10th Aug 2011 17:41
I would like to make a game in AppGameKit that uses a tiled background. Would the best way to do that be using sprites (one for each tile), or one big sprite for the background, or is there some other way to do that in AppGameKit?

I need to have collision but it doesn't need to be pixel collision.


Thanks.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Aug 2011 17:51
I think it should be ok to have a big sprite, tiled with your image, just by setting the UV coordinates to extend beyond the normal limit. With that, it would be possible to scroll the image and scale it, rotate it - sprite UV coordinate hacks will be used quite a lot I think.

For collision, I would add polygons, like make the sprite a physics object, then add a sequence of lines to setup the collision detection.

Health, Ammo, and bacon and eggs!
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 10th Aug 2011 18:23
Thanks Van B.

I'll give it a try in 5 days.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Aug 2011 18:34
For backgrounds I'm actually doing both.

For the first few levels I have a very large background that will move slowly as the player moves around.

For the remaining levels, the background is all tiles. There's no physics or collision on anything but the added sprites in the foreground that are the ground/floor, and other obstacles.

Login to post a reply

Server time is: 2024-11-27 03:22:28
Your offset time is: 2024-11-27 03:22:28