Spare Code ? Dump It here.

1356727

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    A method to show how to spawn pre-determined patterns by using tables
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    How to constrain to a moving platform, the demo sits to the bottom of this, ideal for hanging but can easily be adapted to have the character on top.

    Move the pink box by pressing the left arrow, over the switch to activate the mechanism. Once the mechanic is in place, jump on using the up arrow and this will take you to the other side. At this point you will not be able to move or jump off until it reaches the other side where it will automatically dump you off.

  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    I'll post a few little things soon once I'm done with my current game and have the time to set them up.
    - Thomas
  • KevinFlynnKevinFlynn Member Posts: 26
    edited March 2013
    Anyone care to do a Tiny Wings collision detection?
  • POMPOM Member Posts: 2,599
    edited March 2013
    Anyone care to do a Tiny Wings collision detection?
    Hey man, this thread is not for asking stuff, its goal is to share already made "spare code"
    And please dont ask for someone to do work for you, its against the forum rules.

    If you want to make a Tiny Wings like game, and have issues in your progress, you can open up a new thread and ask questions and people will help you (HELP YOU, not doing it for you).

    Cheers
    Roy.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Completely agree Roy, well said.

    You should check the marketplace under templates, there's a Tiny Wings one in there;

    http://marketplace.gamesalad.com/#query=tiny+wings&product=3859
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @KevinFlynn / @beefy_clyro - There is also another Tiny Wings project by @JohnPapiomitis that is inactive. I'm trying to contact him to see if he still has it. I'll let you know, if I'm successful.
    - Thomas
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited March 2013
    Since my last post with the project for UB from iPhone (Landscape), I've gotten several PM's and emails asking for the portrait version initially from iPhone instead of iPad. Sat down for a couple of minutes and worked up this project for y'all.

    Enjoy!
  • mrpacogpmrpacogp Member Posts: 400
    edited March 2013
    Maybe, this is elemental but i want to spare it:
    https://docs.google.com/file/d/0B627IAMIBXcpZDF1RXBLdFZyREk/edit?usp=sharing

    Change image for another image with words like "myturn1.png" instead of the easy one "1.png"
    I hope this could be useful.
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    A bit of super simple randomness. This will change the color of an actor randomly, and creates a pretty cool affect. I've seen this asked in three different threads, so I thought I may as well share.

    http://speedy.sh/3uuNQ/FlashingColors.gameproj
    - Thomas
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    I also made an interpolating version of the above; if anyone wants it, let me know.
    - Thomas
  • basil81basil81 PRO Posts: 103
    edited March 2013
    This might not be anything revelatory, and there's probably a better way to do it, but it's a nice effect and I'm sure somebody might have a use for it. Bouncy Buttons, that once pressed do a nice little springy bounce.

    https://dl.dropbox.com/u/42141083/bouncyButton.zip

    Cheers. :)
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    A while back I developed a very simple random text formula that allows you to make as many quotes as allowed in a table and to display them randomly. The entire thing only requires one actor to display the text and one table to hold the text values. If you use this code, please do not claim the app to be yours if you don't edit anything. However by all means, mess around and use this project as a base for another project. :D
    Project download:
    https://dl.dropbox.com/s/u30mx4fwhbul5th/Simple Weather.zip?token_hash=AAG3gywyClURfRuuMcol7a0otdhQpkfnNT9TWOmE5LCNrQ&dl=1
  • SocksSocks London, UK.Member Posts: 12,822
    @SnapFireStudios
    A bit of super simple randomness. This will change the color of an actor randomly, and creates a pretty cool affect. I've seen this asked in three different threads, so I thought I may as well share.

    http://speedy.sh/3uuNQ/FlashingColors.gameproj
    - Thomas

    not found: FlashingColors.gameproj

    :(
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    Spawn unique actor instances based on table positions

    Here's a file I'm using to teach my students today. It uses a loop to spawn coins based on positions in a table. That's not anything new, but it also uses a spawning method that assigns each coin actor a unique ID (row number) that can be used to implement other kinds of rules. The actor instance can then refer to that table row for any rules it needs. The example I included is a boolean column for coloring the coin, but it could be used for different health values for types of enemies, uniquely sized instances, etc.
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    edited March 2013
    Oops, sorry about the download link.
    Try this instead: http://www.sendspace.com/file/sl1ksa
    - Thomas

    P.S. Yes, this is uber simple, but maybe someone will benefit from it :P
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Eyes following actor

    I posted this elsewhere but it seems fitting to leave it here as well. Drag the blue actor around the screen.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2014
    This has been requested several times so here you go (two GS files within the .zip file):

    Health bars for each enemy

  • SocksSocks London, UK.Member Posts: 12,822
    Eyes following actor

    I posted this elsewhere but it seems fitting to leave it here as well. Drag the blue actor around the screen.

    @tatiang

    Here's a simpler (code wise) version - which avoids the 'flip over' when you drag the target object right over the centre of an eye.

    http://www.mediafire.com/?dwi08vrbf2pf0iw
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Wow, that is a lot simpler!

    Thanks, @Socks.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    Snap to grid (road tiles)

    Quite a few people have asked for this (snap to grid functionality), so here it is. The "mod" attributes just enable the release of the "tile" actor to snap to the closest grid square. Without that it would use either floor (or ceil) and the actor would always snap down/left instead of to the closest square.

    It actually looks better without the "background roads" actor, so feel free to delete that from the scene!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Swap actor locations

    Click on an actor and then click on a second actor to swap them.
  • zzap64zzap64 Member Posts: 405
    Thanks @tatiang, this helped me out.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited April 2013
    Angry Birds Space Physics --
    I saw an old angry birds space trailer and it showed the equation Rovio used for gravity and getting the birds to orbit. Its at the 30 second mark:


    Got it stuck in my head and I couldn't rest until I had a try at it.

    I decided to use the actual value of the universal gravity constant (which is a very, very small number). I also used a very,very big number for the planet's mass. But you can use any values that make it react the way you want.

    Hope someone finds it useful!
    http://www.mediafire.com/download.php?97sa9cuutue39jw
  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2013
    Angry Birds Space Physics --
    @RThurman

    Brilliant stuff ! :)
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Angry Birds Space Physics --
    @RThurman

    Brilliant stuff ! :)
    Thanks! It was kinda stuck in my head until I made it. Perhaps someone might find it useful. It would make a fun interplanetary rocket-ship type game.
  • SocksSocks London, UK.Member Posts: 12,822
    Angry Birds Space Physics --
    @RThurman

    Brilliant stuff ! :)
    Thanks! It was kinda stuck in my head until I made it. Perhaps someone might find it useful. It would make a fun interplanetary rocket-ship type game.

    There have been two or three people asking about similar (or related) scenarios recently, so I reckon it will be very useful - I made the gravity area a little bigger and the pull of the planet a little stronger and managed to put a satellite into a permanent orbit !!

    Great fun !! : )
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Very, very nice stuff, @RThurman!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2013
    Calculate inactive app time

    Perhaps not that useful for everyone but it was a major pain to work this out so I thought I'd share it in case anyone needs it.

    When you switch apps on a device, the game basically pauses. When you switch back, it resumes. How long was it paused for? This demo will answer the question.

    Note that this does not measure the amount of time between app launches (e.g. you launch the app, then quit it completely, then re-launch it ) although it's not hard to add that functionality.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Universal project from iPhone 5 to iPhone 4S and below and iPad!

    Some tweaking might be needed depending on your project - also zoom in and out (and or restart the project) when you switch devices.

    Hope you all find it useful.
Sign In or Register to comment.