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 / setspritex not working

Author
Message
gsdblack
12
Years of Service
User Offline
Joined: 6th Dec 2011
Location:
Posted: 14th Nov 2012 00:56
I'm using setspriteX to scroll the background with the viewpoint. I have my character scrolling but not the background. The code seems like it should be simple but the backgrounds not moving. I can attach the project if needed

Creating the background sprite


game loop scrolling sprites
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 18th Nov 2012 15:48 Edited at: 18th Nov 2012 15:51
I'm not sure from that code what you are trying to do (I only really use tier 1). Are you scrolling the backdrop with the UV scroll or moving the sprite? If it is moving the sprite then I noticed you use fix sprite to screen which will stop you repositioning it anywhere (although it looks remmed out). Also, unless skyspeed is constantly increasing (or decreasing for a right hand scroll), the UV scroll will be static.
It has been 12 months or so since I last used UV scrolling in a game.

That is the code I used to scroll the water across the screen. It has 2 layers, using sin to get a wobble effect on the y axis.

Login to post a reply

Server time is: 2024-05-05 13:00:48
Your offset time is: 2024-05-05 13:00:48