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.

Windows / Lesson One - The AGK World

Author
Message
TheZag
16
Years of Service
User Offline
Joined: 11th Feb 2008
Location: Milan Italy
Posted: 20th Feb 2013 16:57
Hello, I tried on my notebook with AppGameKit 1088b
the first tutorial, till the download and test of the spaceship into space.

Playing the samples, I can see ALL star sprites moving ALL togheter.

Any idea ?

Thanks
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 21st Feb 2013 01:34
Try the solution I mentioned in this thread.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Feb 2013 11:13
Actually it's simpler than that, the fix is to change the line:


to "byOffset" like this:


Because the sprites are not being positioned "by offset" the parallax offset is not making any difference to the sprite's position.

Hodgey's solution is right too but mine would run faster (if only microscopically )


this.mess = abs(sin(times#))
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 21st Feb 2013 11:16
Well played sir!

TheZag
16
Years of Service
User Offline
Joined: 11th Feb 2008
Location: Milan Italy
Posted: 21st Feb 2013 16:00
Thanks Hodgey and Bakslash !
Well...
Bakslash, your code seems to work just at start. If you then move the starship, and new stars come in the game... Sky is still all locked.
Hodgey, your code works.

Thanks all for help. I'm new to AppGameKit and I'm studying it.


How could I applied the sample to a forest or a group of mountains?

Giuseppe
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Feb 2013 16:02
Strange, it fixed the problem for me...


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-04-20 09:29:07
Your offset time is: 2024-04-20 09:29:07