"depth" in a stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
"depth" in a stack
Hi, is there a way to make a stack (game) that goes 'deep' or 3D, for example:
Thanks!Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: "depth" in a stack
Sort of.
Basically you have to work out how to scale images so they get smaller the higher up the card they are.
-
Basically you have to work out how to scale images so they get smaller the higher up the card they are.
-
- Attachments
-
- GO AWAY.livecode.zip
- Stack.
- (210.95 KiB) Downloaded 173 times
Re: "depth" in a stack
allright, didn't think of that, so i need to write "for every +1 in the Yloc of the 'ball' resize it to -1", i don't think this scri'pt makes sense, how can i write it the right way?
Thanks!
Thanks!
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: "depth" in a stack
my code looks nothing like that: it is much simpler.so i need to write "for every +1 in the Yloc of the 'ball' resize it to -1"
Last edited by richmond62 on Thu Jan 20, 2022 9:24 am, edited 1 time in total.
Re: "depth" in a stack
I don't think there is a 3D library for LC (pretty sure there's no official openGL implementation or similar).
And besides, managing 3D can be orders of magnitude more complex.
If it's just a simple animation needed, scaling/moving 2D objects may be a lot simpler...
And besides, managing 3D can be orders of magnitude more complex.
If it's just a simple animation needed, scaling/moving 2D objects may be a lot simpler...
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: "depth" in a stack
Not as far as I know.and a 3D image is possible?
I wrote;
So any '3D' in LiveCode is either going to be:Sort of.
1. A simple 'fake' like my example.
2. Horribly complicated Mathematics.
3. Something else rolled into LiveCode.
However, a little bit of thought should show you that using scaling (as in my example)
and layer changes you can do really quite well.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: "depth" in a stack
Stupid things one does in the lunch break:
-
-
- Attachments
-
- Free D.livecode.zip
- Here's my stack.
- (232.91 KiB) Downloaded 175 times
Re: "depth" in a stack
It is a good example... I would also recommend the use of the accelerometer in livecode, especially for a racing game, its use would be ideal.
A few years ago I developed a game using this sensor on mobile phones.
A few years ago I developed a game using this sensor on mobile phones.