Spare Code ? Dump It here.

1121315171827

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    @RThurman

    Brilliant implementation nonetheless.

    I bet that painfully tiny expression window started to feel like you were trying to bake a cake through a letter box with stuff like this . . . . .

    0>(( game.Mouse.Position.Y -( self.Position.Y +tableCellValue( game.PolygonTB ,1,"Ypos")))*(( self.Position.X +tableCellValue( game.PolygonTB ,2,"XPos"))-( self.Position.X +tableCellValue( game.PolygonTB ,1,"Xpos")))-( game.Mouse.Position.X -( self.Position.X +tableCellValue( game.PolygonTB ,1,"Xpos")))*(( self.Position.Y +tableCellValue( game.PolygonTB ,2,"YPos"))-( self.Position.Y +tableCellValue( game.PolygonTB ,1,"Ypos"))))

    :))
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    @Socks -- yes it looks like a lot of equation there. But its really the not that complicated. Its just that the function, attribute, and table calls are so long! It makes it seem much more complicated than it really is.
  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2014
    @RThurman
    @Socks -- yes it looks like a lot of equation there. But its really the not that complicated. Its just that the function, attribute, and table calls are so long! It makes it seem much more complicated than it really is.
    Yep, I appreciate that sometimes lengthy equations can be functionally very simple, but still wouldn't it be great to be able to expand that ludicrously small window in some way, I know it would make my life a lot easier ! A conversation I suspect happened at GameSalad HQ a few years back . . . .


    A: This expression window thing, what did you say people would use it for ?

    B: Basically you can enter any kind of equation supported by GS.

    A: So what would that include ?

    B: You know, tables, game attributes, device attributes, mathematical functions, time/clock functions, tags . . all that kind of stuff.

    A: So quite a lot of functionality then ?

    B: Yep, you will be able to do a ton of stuff with it.

    A: Sounds great, but is there any way we can hamstring anyone trying to use it ?

    B: What ?

    A: Is there any way we can make it fiendishly awkward to use ? [strokes the white cat sat on his lap]

    B: Why would you want to do that ?

    A: You know . . . . for 'evil'.

    B: Oh I see, well we could make the window really small without any way of resizing it, that always slows people down.

    A: Hmmmm . . . . can we go more evil that that ?

    B: Ok, maybe maybe limit it to 3 or 4 lines so that on long equations they have to scroll up and down all the time ?

    A: Hmmmm, what's the very least we can get away with with regards to lines ?

    B: Well, we could - in theory - make it just one line ?

    A: Hmmmmmm (quietly laughs to himself), just one line . . . .

    B: But a single line would mean long equations would be very difficult to parse and anything reasonably involved would be wider than most monitors, do we really want to have our users fighting with a one line high window that is wider than the screen ?

    A: Is there anyway we can fire spikes out of the expression window and into the user's eyes ?

    B: What ?

    A: Ok, forget that, just go with the one line thing.


    image


    . . . . . . . . . . . .


    Here's another way to do the poly collision / detection thing - it's the obvious manual / 'brute force' method, nowhere near as elegant as your solution, but one advantage is that you can constrain the 'detectors' to the main actor so the poly detection still works when the object is moving, falling and generally tumbling around . . . . but you can probably do the same with your maths method ?


    Link: http://www.mediafire.com/download/jnkx1od3n4bj9na/Poly+detection.zip
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    lol

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • LoadedLoaded Member Posts: 240
    Love the dialogue @Socks lol

    Website » Twitter » Facebook » Loaded Arts - Fun for thumbs.

    Developer Blog » 08/01/2015 - Week 72 – Apple, the great dictator…

  • FrantoFranto Member Posts: 779
    @Socks You should be a comedian, funny dialogue.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    edited February 2014
    @Socks -- Thou art a funny funny man! The Bard shouldst have thee in his employ.

    Here's another way to do the poly collision / detection thing - it's the obvious manual / 'brute force' method, nowhere near as elegant as your solution, but one advantage is that you can constrain the 'detectors' to the main actor so the poly detection still works when the object is moving, falling and generally tumbling around . . . . but you can probably do the same with your maths method ?

    Link: http://www.mediafire.com/download/jnkx1od3n4bj9na/Poly+detection.zip
    I don't consider your solution a 'brute force' method at all. For most GameSalad uses it should be the preferred method for sure. For the majority of users the "math method" is going to be a bit over the top. Yet, it's still fun to mess with -- just to see what GameSalad is capable of.

    I did try to make it more useful those who don't care to mess with the math. I set it up so that users could enter the vertex coordinates in the table. Just enter six simple x,y coordinates and the expressions take care of everything else!

    By the way, the example I posted above does allow users to drag the actor around. It takes the current actor position into account. I did however stop short of posting an example where one could rotate the actor. I thought that would complicate the already lengthy expressions and just confuse people. (But accounting for rotation can be easily accomplished.)
  • SocksSocks London, UK.Member Posts: 12,822
    @RThurman
    By the way, the example I posted above does allow users to drag the actor around. It takes the current actor position into account. I did however stop short of posting an example where one could rotate the actor. I thought that would complicate the already lengthy expressions and just confuse people. (But accounting for rotation can be easily accomplished.)
    I suspected so, I'd love to see that expression, sounds like a three monitor job.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I suspected so, I'd love to see that expression, sounds like a three monitor job.
    I'd be amazed (but not surprised) at how much more efficient we could all be if we could see the full expressions and manipulate window sizes and zoom levels better.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2014
    @tatiang
    I'd be amazed (but not surprised) at how much more efficient we could all be if we could see the full expressions and manipulate window sizes and zoom levels better.
    Yep, it would make a dramatic difference, it's an ongoing pain trying to keep track of an ever evolving expression in such a punitively small window, like building a house through a letter box, I find the whole limited window size thing bizarre, I presume it's by design ? I can't think of any logical reason why you'd click on the expressions 'e' then select the drop down and only be offered the first 8 attributes (Name/Time/Position/Size/Rotation/Color/Image/Tags), with the remaining 4 being initially 'hidden' (Preload Art/Graphics/Motion/Physics) . . . . why not be offered all 12 ? Throw some user defined attributes in there and the list of pointlessly hidden attributes grows. Getting to them is no big deal, just scroll down, but go through this unnecessary process every time you want to access an attribute, with every attribute, hundreds or thousands of times, and then apply the same - bizarrely pointless - GUI logic to absolutely everything in GameSalad and a fantastically intuitive and rapid prototyping environment becomes an exercise in Olympic level clicking, scrolling up, scrolling down, going back, going forward, hitting 'ok', opening windows, closing windows . . . (etc etc).

    I can't see what logic drove anyone to decide the window that opens revealing 12 editable parameters should only show the first 8, should lack the ability to be resized and the columns should be so narrow that some of the attributes are unable to even be spelt out in full ?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Socks "Olympic level clicking"... well said. I do feel that way quite often.

    Yeah, even my method of naming tables with a  or |T| at the front is done to workaround the fact that all tables & attributes appear the same in the drop-down menus.

    Wait, there are 4 hidden attributes???!!! OMG!!! brb...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    @Socks "Olympic level clicking"... well said. I do feel that way quite often.

    Yeah, even my method of naming tables with a  or |T|
    Lol - I've been doing that since tables was released. Great minds think alike!
  • Conifer_AppsConifer_Apps Member Posts: 100
    Been looking at what @socks posted on here when he started this thread (how in the world do you make the word "magic" out of all this bricks) and it is great, in fact everything here is cool, so I decided to post a neat food game/project/platformer I was working on then gave up on.

    A few things to keep in mind:
    -This was literally the first thing I ever did with Gamesalad, but I put a lot of time into it.
    -The title screen's navigation buttons are there, but not showing up. In fact, just navigate through different scenes using the bar thingy at the bottom of Gamesalad.
    -Only a few levels were ever completed.
    -The AI enemies aren't very, well, intelligent. Yet.
    -Level 3 has I cool turret feature that I'm pretty proud of.
    -The graphics will suck because it was my first game.
    -Most of the art is usually not there (colored blocks) or used from opengameart.org.

    Go wild.

    Link: http://www.sendspace.com/file/pb1vym
  • gotyoursgotyours Member Posts: 246
    Anyone have a frogger template?
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2014
    Magnetic field (sort of), might make a nice background for a title page or menu ?

    Link: https://www.mediafire.com/?dzth7j6hggvdn6u

    image

    P.S there are other patterns in there too, just open up the actor called 'R' and switch on one of the alternative rules - 'Twister 1' - 'Twister 2' - 'Magnetic Field' or 'Circular' (switch off the ones you are not using - only have one on at a time).

    Also try switching on the Move behaviour when you are using 'Magnetic Field'.

    image
  • neomanneoman Member, BASIC Posts: 826
    @Socks you are a great asset to the community. Thanks for sharing these demos. I have not used any yet or studied them but I am collecting them as they might come in handy in the future especially the animation examples you shared before. Amazing stuff. Thanks once again.
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks you are a great asset to the community.
    Cheers @neoman ! :)>-
  • gurucgsharmagurucgsharma Member Posts: 1
    Thank you so much socks
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Ghost Actor

    If you want a "ghost" actor to follow in the footsteps of a lead actor (as in racing games where you have to race against your ghost), here's a demo that uses tables to keep track of the positions.

    Just drag the cat around (gently, please) and when you release the mouse (ahem), the "ghost" cat will follow the same path at the same speeds.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014
    Leader and follower birds

    Had a request for this so here's how I'd make several actors follow a lead actor with a cascading delay.

    https://www.dropbox.com/s/teh523yq1unkpy9/leader & follower birds.zip

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2014

    @tatiang said:
    Ghost Actor

    If you want a "ghost" actor to follow in the footsteps of a lead actor (as in racing games where you have to race against your ghost), here's a demo that uses tables to keep track of the positions.

    Just drag the cat around (gently, please) and when you release the mouse (ahem), the "ghost" cat will follow the same path at the same speeds.

    @tatiang said:
    Leader and follower birds

    Had a request for this so here's how I'd make several actors follow a lead actor with a cascading delay.

    https://www.dropbox.com/s/teh523yq1unkpy9/leader & follower birds.zip

    Excellent and excellent !!

    (*)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    How To "Interrupt" Interpolations

    I hear pretty often that you cant 'interrupt' or 'cancel' interpolations. This is technically true. That is, once an interpolation begins it will proceed until it reaches its goal state.

    But you can easily give it a new goal! And if you give the interpolation a new goal that exactly matches the current state of the attribute it is tracking, it will consider its job done and stop the interpolation. All you need to do is use attributes in the To:[ ] and Duration:[ ] fields. (Instead of putting hard numbers into those fields.)

    Here is an example where an actor has has an interpolate behavior that tells it to move 400 pixels to the right. However when it reaches 200 it is fed a new goal of '200' (and Duration is set to '0'). The interpolation then stops because (as far as it's concerned) the interpolation has reached its goal.

    http://www.mediafire.com/download/nc7uf2chw8shaek/InterruptInterpolateExample.zip

    Note: Perhaps this technique is common knowledge, but it seems I hear, "...you cannot stop interpolations" relatively often.

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman very very useful, thanks for sharing.

  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271

    Great stuff as always, everyone! Thanks for sharing with the community!

  • sawkasteesawkastee Member Posts: 184
    edited March 2014

    @tatiang‌
    @Socks

    Are you guys putting an "Apple" icon at the beginning of the table name so you can easily identify a table in the expression editor? What keystroke is the "Apple" icon? I've only been able to copy and paste it.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014

    @tatiang
    @Socks

    Are you guys putting an "Apple" icon at the beginning of the table name so you can easily identify a table in the expression editor? What keystroke is the "Apple" icon? I've only been able to copy and paste it.

    @sawkastee‌

    Shift+option+k

    Any symbol will do... it's just so that the table stands out from other attributes in the attribute drop-down menu.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mataruamatarua Auckland, New ZealandMember Posts: 854

    Always a treasure trove, thanks so much :)

  • HopscotchHopscotch Member, PRO Posts: 2,782

    A question about looping between 3 numbers, bugged me.

    Counting a sequence of numbers up and down and up again, seemed like a generally useful thing to do, as a formula, without loops and conditions. Google did not turn up anything useful.

    My idea was to use a triangular wave function.

    Attached is my version.

    Useful for (european) traffic light sequences, or as @tatiang pointed out, traversing waypoints forward and back, and surely many other applications.

    The attribute self.Span is the range of numbers,
    therefore 123454321…(repeated) has a self.Span of 5 (1 to 5 and back)

    Current caveats: As phase shifting is not implemented, the sequence always starts at a midpoint, therefore also, self.Span should always be an odd number.

  • -Timo--Timo- Member Posts: 2,313
    edited March 2014

    several free template here :smile: [link removed]

    moderator: [@timolapre1998 This thread is not for advertising templates on a third-party website. It is for posting directly in this thread extra code/templates/etc. that you are giving to the community.]

    Timo: oh sorry. don't want to post them all straight here so sorry for people who wanted to download them.

  • ArmellineArmelline Member, PRO Posts: 5,318
    Working on my game Ivy I had to have a leaf fall down the screen. Although some leaves will drop straight to the ground, I always expect them to sway gently from side to side when they fall. As such, leveraging @LumpApps' awesome Mobinus, I thought I'd share the leaf falling solution I came up with.

    A Little Falling Leaf
    *Requires GameSalad RC build*
Sign In or Register to comment.