Freehand Touch Scrolling, please!!! iPhone/iPod/iPad feature question
carlos.varela.com
Member Posts: 99
Is it possible to do free style like scrolling background like when you scroll your web pages on your iphone or when you scroll across your Google Map?
Imagine that you have a game like Civilizations or SymCity on where you do not have a principal actor like platforms game, just participants that you can only see or change their status like create some building or change a status of a Wall Center from closed to open, different animations for all the status.
Some HUD statics buttons actor, but freestyle or freehand scene and backgrounds.
Imagine that you have a game like Civilizations or SymCity on where you do not have a principal actor like platforms game, just participants that you can only see or change their status like create some building or change a status of a Wall Center from closed to open, different animations for all the status.
Some HUD statics buttons actor, but freestyle or freehand scene and backgrounds.
Comments
The basic principle is this:
You need to make a actor that controls the camera. A simple box is fine.
In the Actor, create a Rule like this:
Rule
When Mouse is Down
-----Constrain Attribute: self.Position.X To: game.Devices.Mouse.X
-----Constrain Attribute: self.Position.Y To: game.Devices.Mouse.Y
-----Control Camera
In the graphic attributes for this Actor, turn Visible to False.
Place this actor anywhere in the Scene - NOT on your HUD layer.
That will give you the working basics of scrolling a large screen around with your mouse/finger. However, I believe you will find it gets much more complicated than that when you start building the rest of your game...
I came up against the same problem. Check out this post where I include a working example:
http://gamesalad.com/forums/topic.php?id=5189
I hope it helps.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I am with scitunes and firemaplegames, maybe moving the camera its a better strategy, because you are not limited to one background or one object I think.
I did put your project at my porfolio:
http://gamesalad.com/game/play/51398
I did reduce the size of the image from 5mb to 1mb and do some changes in order to see the entire map. GS say that the limitation for iphone images is 1024x1024, your image is about 2400x1200 and I can play with it in my iphone 3g os version 3.1.2, just for your info.
Maybe the image limitations are bigger right now with the current iphone os.
Anyone know about the current limitations for images on the iphone?
http://gamesalad.com/forums/topic.php?id=5189&replies=11#post-33516