Spare Code ? Dump It here.

13468927

Comments

  • blue_elephantblue_elephant Member Posts: 505
    @Socks
    I'm curious how you did the magic splash screen. You didn't place each actor manually did you?
    Thanks
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks
    I'm curious how you did the magic splash screen. You didn't place each actor manually did you?
    Thanks
    No I didn't, it was automated.
  • blue_elephantblue_elephant Member Posts: 505
    @Socks
    Could you explain that further so I could replicate it perhaps?
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks
    Could you explain that further so I could replicate it perhaps?
    It's secret ! : ) Sorry !
  • blue_elephantblue_elephant Member Posts: 505
    That's too bad. Don't hesitate if you ever change you mind :)
  • blue_elephantblue_elephant Member Posts: 505
    Is there a way I can just change the word then?
  • SocksSocks London, UK.Member Posts: 12,822
    Is there a way I can just change the word then?
    Not easily.
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Free Rolling Fog! Or clouds or something spooky! Might be of use to someone, maybe some rolling fog for one level of a plarformer?
    Endlessly loops (all recycled) – you need to give it 2.6 seconds to draw up the clouds then it fades up and rolls forever!!

    (Credits go to Tynan of thatgameforum - Distributed by That Developer Market/Indie Labz)

    image
    I've just had a play with this and it's great - I think I could find a use for it, if it wasn't for the draw speed.

    @Socks - you mentioned how you would now use a super fast looping method to speed up the draw speed. Care to share some of your great wisdom on this?

  • natzuurnatzuur Member Posts: 304
    Here is a quick demo I made of an arcade style character selection, figured I'd drop it here. http://www.mediafire.com/?pqozzrf1yb1lo8j
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @Socks
    Could you explain that further so I could replicate it perhaps?
    It's secret ! : ) Sorry !
    Black magic!
    - Thomas
  • ycanycan Member, PRO Posts: 207
    Legendary codes :)
  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2013
    I've just had a play with this and it's great - I think I could find a use for it, if it wasn't for the draw speed.

    @Socks - you mentioned how you would now use a super fast looping method to speed up the draw speed.

    @DigiChain

    Well, it's a pretty old project, at the time I did it the new fast looping methods hadn't been dreamt up, but to be honest if I were to redo it now I would simply take the time to layout each of the cloud elements (I used 78, but you might want more/less) so I could lose the spawning time completely and the whole thing can start instantly with zero draw time

    But if you don't like the idea of placing 78 actors - take a look at:

    https://forums.gamesalad.com/discussion/55050/fast-for-loop-a-collection-from-the-community-merged-into-a-single-really-really-fast-loop
  • SocksSocks London, UK.Member Posts: 12,822
    Black magic!
    - Thomas
    @SnapFireStudios

    It involved sacrificing a goat.
  • DigiChainDigiChain Member, PRO Posts: 1,288
    @Socks - cheers for the response.
    Yes, I'd already had a look at laying out the actors individually, and have found pretty good results from just using 15 actors (scaled up quite a bit). Thanks.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited August 2013
    Actors rotate around a main actor using Sin and Cos functions

    This demo is supposed to simulate the functionality of a Ferris Wheel. (The inventor of the Ferris Wheel was born in my home town.)

    http://www.mediafire.com/download/zpgd9040t34z3be/FerrisWheel.zip
  • FajlajpFajlajp Member Posts: 666
    @Socks
    Could you explain that further so I could replicate it perhaps?
    A magician doesn't reveal his tricks ;)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Rotating a volume knob

    A little demo of how to rotate an actor with the mouse. It avoids snapping by tracking the change in mouse angles. Nice and smooth!

    It also shows how to limit the rotation of an actor using min() and max() functions.

    It also shows how to cross the 0-360 boundary as the mouse-drag completes a full circle. (Uses a bit of math trickery.) Very handy!

    http://www.mediafire.com/download/8xme08ihsbew0j8/knobRotation.zip
  • ericzingelerericzingeler Member Posts: 334
    Draw-it: My latest drawing function. It's super quick because it uses the replicate behavior instead of spawning actors when possible.

    http://forums.gamesalad.com/discussion/58983/draw-it-my-next-very-accurate-and-efficient-line-drawing-function-for-gamesalad?new=1
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Count the Days Between Two Dates

    In case anyone is thinking of making a Christmas countdown app -- now is the time to get started!

    Here is an example of determining the number of days between two dates. It takes into account leap years, months, and days. It is fairly accurate for any day from 1AD on. It will work for any date in the past and any date in the future. (But it does not take into account the 11 days the British Empire deleted in 1752 when they decided to match up with Europe's calendaring system.)

    Christmas is just around the corner!

    http://www.mediafire.com/download/gblhmw7bdbnc7ld/dayCalculator.zip
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2013
    Christmas is just around the corner
    Oh, stop!

    But nice idea for a demo. :)
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @tatiang --
    Sure, mock me now. But just wait till Dec. 24th. You'll wish you had used a count down app to get your Christmas shopping done early!
  • ericzingelerericzingeler Member Posts: 334
    Stop Jiggle: A sound solution to get them pesky actors to quit moving.

    http://ezinterweb.com/gamesalad/stop-jiggle
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @ericzingeler

    As always -- you deliver some great stuff. Thanks for sharing with the community!
  • finalcutbobfinalcutbob Member Posts: 130
    @ericzingeler
    Very cool, thanks for sharing!
  • ericzingelerericzingeler Member Posts: 334
    Joints

    Use motion velocity to create joints. This is for two car type wheels:

    http://forums.gamesalad.com/discussion/59405/wheels-join-ed-a-work-in-progress-method-for-a-wheels-type-joint?new=1
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @ericzingeler -- Very nice! Keep 'em coming!

    Also an interesting control structure. Any reason why you used 'when touch count >0' instead of 'when mousedown'?
  • ericzingelerericzingeler Member Posts: 334
    edited August 2013
    @RThurman

    Ya know, it was just something I started doing at one point and it stuck. But in general, I've always preferred working with attributes in my conditions vs the pre-defined actions.

    Thanks!
  • quantumsheepquantumsheep Member Posts: 8,188
    Some nice additions everyone. The thread continues to be a great learning resource for beginners and more experienced people alike!

    Props to all that posted here, and to @socks for kicking it off!

    Go play!

    QS =D
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited August 2013
    Find the X,Y Coordinates That Are Local To An Actor

    OK -- this one might be a little strange -- but suppose you need to know the X,Y position of something from the local actor's perspective.

    For example, the mouse might be 150 pixels to the right of the actor, and 75 pixels below the actor. According to the actor, the mouse would be at the actor's local X,Y coordinates of 150,-75 (from the center of the actor).

    You normally, get that "local coordinate" by simple equations like:
    localX = mouse.X - self.X
    localY = mouse.Y - self.Y

    But the above equations only work when the actor is at the default 0 rotation. What happens if the actor is rotated? Then the actor's horizontal and vertical plane is rotated as well. To get the true local coordinates, you need to take into account the actor's rotation.

    This example shows two different ways to determine the X,Y coordinates of something from an actor's local perspective and rotation.

    http://www.mediafire.com/download/6r445sn3lma8h0m/localActorCoordinates.zip
Sign In or Register to comment.