tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited February 2015
Custom Variable-Interval Timer™
The built-in Timer behavior maintains the same duration regardless of what the expression it uses changes to. So for example if you use a Timer set to Every random(1,5) seconds, it won't continually pick a new value. It will just pick an initial value (e.g. 2 seconds) and always repeat that duration.
To have a random duration, you'll need a custom timer. This demo provides a way to create a random interval between iterations of the timer.
For an explanation of how the rules work, see this.
Very nice - it inspired me to go fix my own star field, though it doesn't use the same technique - is it not a bit performance intensive to spawn/destroy all those stars?
@quantumsheep said:
is it not a bit performance intensive to spawn/destroy all those stars?
Sure is, but it runs fine on my iPad3 using 10.4, should run even better on newer creator versions, using TGAs and on newer and faster iPads / mobiles + I don't really optimize demo files, just chuck them together to illustrate the idea.
This is not really a full template. I am working on a new game and I built this actor to use as an oscillating saw blade. I needed to have it work both vertically and horizontally as well as adjust the speed of the rotation as well as the oscillation not to mention the distance it moves form side to side and up and down. Its pretty cool so I thought I would post it for people here to enjoy. It is built with RC6 so you have to use that to open it.
Just drag it into any scene and configure the options. Configurable options are
movement (the amount it should move in total pixels from left to right or up and down)
moveSpeed (the speed at which it moves through space - this is the amount of seconds it takes to complete a full traversal)
rotationSpeed (the speed in which it spins)
vertical (check this off to make it move vertically instead of horizontally - default is horizontal)
@tatiang said:
stueynet Good stuff. Since it's not really a tutorial, I'm going to merge it with the Spare Code thread. Hope you don't mind.
It's also a good idea to let people know that your demo was made with the Release Candidate. Edit: oops, I see you did that (RC6).
Ok then. But the file is not attached anymore so my comment makes no sense. Also I was planning on adding the video for how it works tomorrow. Either way without the file its pretty useless so feel free to delete the post.
@stueynet said:
Ok then. But the file is not attached anymore so my comment makes no sense. Also I was planning on adding the video for how it works tomorrow. Either way without the file its pretty useless so feel free to delete the post.
Can you not simply attach the file in a post here ? Same deal with the video ?
Here is Table Display v1.00 created in NB254 I have been working on. It is a combination of @ericzingeler Fast For Loops and tshirtbooths Multiscreen Menu system originally by Thomas form Gamesmold.
This version display a 350 row x 17 column table by spawning 350 rows with 17 text displays, one for each column. This works thanks to the new features in text display. It spawns them in 12 sec on an iMac 15sec on an iPad Air but it crashes an iPad 1 in 15 sec at 150 rows. Maybe someone would like to test it on an iPad 2 and see if it will load.
@Socks@tatiang here is the post again avec the file attachment.
Ok I will repost the post now with the file attached again. This is a simple oscillating saw blade.
This is not really a full template. I am working on a new game and I built this actor to use as an oscillating saw blade. I needed to have it work both vertically and horizontally as well as adjust the speed of the rotation as well as the oscillation not to mention the distance it moves form side to side and up and down. Its pretty cool so I thought I would post it for people here to enjoy. It is built with RC6 so you have to use that to open it.
Just drag it into any scene and configure the options. Configurable options are
movement (the amount it should move in total pixels from left to right or up and down)
moveSpeed (the speed at which it moves through space - this is the amount of seconds it takes to complete a full traversal)
rotationSpeed (the speed in which it spins)
vertical (check this off to make it move vertically instead of horizontally - default is horizontal)
@stueynet said:
Socks tatiang here is the post again avec the file attachment.
Cool !
It makes a great obstacle to get passed (when in formation like this), from one side of the screen to the other . . . you should make it so that when your hero actor touches a blade it spawns a spurt of blood !
@stueynet said:
Great enhancement Socks. Here is the updated file using sin with the parameters in tact.
That's better ! Works really well.
Also constraining the rotation to related values (I just copied your movement values and fiddled with them) gives it a nice mechanical feel, as if the wheel are somehow linked to the mechanism moving them . . .
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
Not sure if this kind of demo has been posted before, but I'll go ahead and attach a quick project I whipped up today. This demo shows you how to take a string and reverse it. This demo is pretty basic, but you could take it to the next level and add each reversed letter to a table cell, or something like that.
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
Drag to select and deselect demo.
A simple demo which demonstrates how to click and drag to select actors. You can also deselect actors by simply dragging back over them. This is an extension to the Connected Boxes demo which TShirtBooth created a few years ago.
This demo shows how to rotate an actor around a different pivot point than its center. It uses a math expression in a Move behavior to determine what to do. (It uses the actor's angular velocity to keep track of just how fast to move in order to keep the actor's 'pivot point' in just the right place on the scene.)
No trig! Not a sin or cos to be seen in this method! I can't think of an easier way to have off-center rotations.
Comments
It is. Just not on the main page. It's announced inside its sub forum.
Custom Variable-Interval Timer™
The built-in Timer behavior maintains the same duration regardless of what the expression it uses changes to. So for example if you use a Timer set to Every random(1,5) seconds, it won't continually pick a new value. It will just pick an initial value (e.g. 2 seconds) and always repeat that duration.
To have a random duration, you'll need a custom timer. This demo provides a way to create a random interval between iterations of the timer.
For an explanation of how the rules work, see this.
https://www.dropbox.com/s/dmvxe74sq6ivrzc/Custom Timer.zip
The trademark is for @RThurman who came up with the name
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang -- very nice demo for variable interval timers.
Thanks for sharing this great tip with the community!
Wobbly, swerving, pseudo-random paths for wobbly, swerving, pseudo-random characters !!
Broken Steering Wheel
Curley Wurley
Curved grid
Dancing Bees
Doughnuts
Etch-a-sketch
Lost Ant
Nodules
Occasional Bump
Perm Machine
Rising
Smooth lumps
Spaghetti
Sudden Turn
Wobbly Signature
Zig-Zag
Link: https://www.mediafire.com/?p920m99b6pz2v9q
@Socks
Useful stuff - thanks!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Lol ! Not sure whether to say thank you or call the police.
Very rudimentary but it's come up a few times, a basic move through a starfield.
Link: https://www.mediafire.com/?gj23vfz5zcqfq8s
Creature of most awful horror:
Link: https://www.mediafire.com/?kduqrrfk44ai0a7
Falls apart after a while, but as a basic idea it sort works.
Very nice - it inspired me to go fix my own star field, though it doesn't use the same technique - is it not a bit performance intensive to spawn/destroy all those stars?
I was expecting a flappy bird
QS =D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Sure is, but it runs fine on my iPad3 using 10.4, should run even better on newer creator versions, using TGAs and on newer and faster iPads / mobiles + I don't really optimize demo files, just chuck them together to illustrate the idea.
with a description like that I just had to check it out... very freaky... (...I like the guys pajamas.)
edit: just played it again... it really is pretty horrid. great work.
Don't watch it before you go to bed.
@Socks
Nor during the day.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Now that's awesome.
Illustration Portfolio:: |
Our Christmas Wishes for iPad:: |
Astropak for iPhone,
Android
and Kindle Fire
This is not really a full template. I am working on a new game and I built this actor to use as an oscillating saw blade. I needed to have it work both vertically and horizontally as well as adjust the speed of the rotation as well as the oscillation not to mention the distance it moves form side to side and up and down. Its pretty cool so I thought I would post it for people here to enjoy. It is built with RC6 so you have to use that to open it.
Just drag it into any scene and configure the options. Configurable options are
My Latest GS Game - Tiny Spirit
My First GS Game - Dashing Ralph
@stueynet Good stuff. Since it's not really a tutorial, I'm going to merge it with the Spare Code thread. Hope you don't mind.
It's also a good idea to let people know that your demo was made with the Release Candidate. Edit: oops, I see you did that (RC6).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ok then. But the file is not attached anymore so my comment makes no sense. Also I was planning on adding the video for how it works tomorrow. Either way without the file its pretty useless so feel free to delete the post.
My Latest GS Game - Tiny Spirit
My First GS Game - Dashing Ralph
Can you not simply attach the file in a post here ? Same deal with the video ?
Here is Table Display v1.00 created in NB254 I have been working on. It is a combination of @ericzingeler Fast For Loops and tshirtbooths Multiscreen Menu system originally by Thomas form Gamesmold.
This version display a 350 row x 17 column table by spawning 350 rows with 17 text displays, one for each column. This works thanks to the new features in text display. It spawns them in 12 sec on an iMac 15sec on an iPad Air but it crashes an iPad 1 in 15 sec at 150 rows. Maybe someone would like to test it on an iPad 2 and see if it will load.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@Socks @tatiang here is the post again avec the file attachment.
Ok I will repost the post now with the file attached again. This is a simple oscillating saw blade.
This is not really a full template. I am working on a new game and I built this actor to use as an oscillating saw blade. I needed to have it work both vertically and horizontally as well as adjust the speed of the rotation as well as the oscillation not to mention the distance it moves form side to side and up and down. Its pretty cool so I thought I would post it for people here to enjoy. It is built with RC6 so you have to use that to open it.
Just drag it into any scene and configure the options. Configurable options are
My Latest GS Game - Tiny Spirit
My First GS Game - Dashing Ralph
Cool !
It makes a great obstacle to get passed (when in formation like this), from one side of the screen to the other . . . you should make it so that when your hero actor touches a blade it spawns a spurt of blood !
P.S. you can also do these kinds of motions with a sine wave.
Example file:
(it's not got all the parameter controls of your version, but you get the idea)
Link: https://www.mediafire.com/?n35mosyczty1l1h
Oh cool. Yes you could for sure.
My Latest GS Game - Tiny Spirit
My First GS Game - Dashing Ralph
Great enhancement @Socks. Here is the updated file using sin with the parameters in tact.
My Latest GS Game - Tiny Spirit
My First GS Game - Dashing Ralph
That's better ! Works really well.
Also constraining the rotation to related values (I just copied your movement values and fiddled with them) gives it a nice mechanical feel, as if the wheel are somehow linked to the mechanism moving them . . .
Example: https://www.mediafire.com/?36cdtg2inn731x0
Not sure if this kind of demo has been posted before, but I'll go ahead and attach a quick project I whipped up today. This demo shows you how to take a string and reverse it. This demo is pretty basic, but you could take it to the next level and add each reversed letter to a table cell, or something like that.
Enjoy!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Drag to select and deselect demo.
A simple demo which demonstrates how to click and drag to select actors. You can also deselect actors by simply dragging back over them. This is an extension to the Connected Boxes demo which TShirtBooth created a few years ago.
Enjoy!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Off-Center Rotations Using a Move Behavior
This demo shows how to rotate an actor around a different pivot point than its center. It uses a math expression in a Move behavior to determine what to do. (It uses the actor's angular velocity to keep track of just how fast to move in order to keep the actor's 'pivot point' in just the right place on the scene.)
No trig! Not a sin or cos to be seen in this method! I can't think of an easier way to have off-center rotations.
http://www.mediafire.com/download/zytrxwzfh11ah7b/OffCenterRotationViaMoveBehavior.zip