Spare Code ? Dump It here.

1679111227

Comments

  • neomanneoman Member, BASIC Posts: 826
    Thanks for sharing @Socks I will check them out ... ;-)
  • UtopianGamesUtopianGames Member Posts: 5,692
    Really like the banking :) top job m8.

    Darren.
  • SocksSocks London, UK.Member Posts: 12,822
    @DeepBlueApps @neoman

    Cheers ! :)>-
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @Socks -- Great thinking! Innovative use of your favorite (dare I say signature) expression!
  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2013
    @Socks -- Great thinking! Innovative use of your favorite (dare I say signature) expression!
    @RThurman

    Are you trying to suggest I'm a one-trick pony ? I don't know what you are talking about ;) :))
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited October 2013
    I've created a little project that generates a grid on the screen instantly (providing the grid isn't massive) without using loops and timers. It's like the replicate behaviour but each actor is independent and can have it's own attribute values.

    https://www.dropbox.com/s/iochsh5wl1wq6hl/GameSalad-Instant-Grids.zip

    Place the grid square actor where you want the top left of your grid to be and it will create the grid of your chosen size from that when the game is loaded. You can change the size of the grid by changing the game attribute values. You can easily change it so that the bottom left of the grid is the starting point if needed.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @Socks

    What?!? You have a trick pony?

    Doesn't that violate the TOS?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @KevinCross -- This is great! Not loops, no timers. Just pure GameSalad. Thanks for sharing with the community.
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks

    What?!? You have a trick pony?

    Doesn't that violate the TOS?

    As long as I'm not in the same room as the pony while he's logged in they can't prove anything.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    @KevinCross -- This is great! Not loops, no timers. Just pure GameSalad. Thanks for sharing with the community.
    No worries. Thanks to everyone else for sharing their code including yourself.

    I've just downloaded 150 odd files from 9 pages, and now wish that I looked at them as and when they were shared :)

    @Socks, I might use your shadow example in a future update of my Doodle Kicks game. Thanks.

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2013
    @Socks, I might use your shadow example in a future update of my Doodle Kicks game. Thanks.
    @KevinCross

    Shadow !? What's that ??

    :-/


    P.S 'Doodle Kicks' great name, but get zeitgeisty and lose the space. :)

    DoodleKicks™
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    Another test project from the archives . . . . place blocks in a scene (by clicking) and have them join together into a contiguous shape.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I started to lay out a grid of rows and columns of DisplayText actors in order to show table data for saved games on the educational app I'm building. It's tedious to code that many things and then arrange each actor one by one (there would have been over 100 separate actors). And worse, I'm working with camera origins on a single large scene so every time I exit an actor's rules, I get taken back to the default view and have to scroll around the scene. But enough complaints!

    I realized I should follow my own advice that I give to students and automate. So I built a little demo that recursively spawns (it's reeeeaaally simple so don't be scared off by that word) a grid view of table data.

    image

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

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

    Good stuff ! This is the kind of thing that's probably very useful to the right person :)>-
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    A basic moving landscape - old school arcade game style (lunar lander / defender, that kind of thing).

    The landscape is ever-changing, it keeps on evolving as it's procedurally generated.

    Arrows control the absolutely terrible stand-in guide spaceship.
  • BBEnkBBEnk Member Posts: 1,764
    Heres another way to do animations without using the animate behavior, it's very easy to do, some of you might find it useful for cutscenes, sorry my mic is broken but I point at what is needed it's very easy to do.

    The first video shows both versions one using the GS animate behavior at 30fps and my version using interpolate which easily out performs and using 19 images.



    This video below shows it using 250 images rendered at 1136x640 using interpolate to control speed.

  • SocksSocks London, UK.Member Posts: 12,822
    Heres another way to do animations without using the animate behavior, it's very easy to do, some of you might find it useful for cutscenes, sorry my mic is broken but I point at what is needed it's very easy to do.

    The first video shows both versions one using the GS animate behavior at 30fps and my version using interpolate which easily out performs and using 19 images.
    @BBEnk

    Nice stuff !! :)>-

    By the way, GameSalad's animate behaviour when set to 30fps actually runs at 23.5fps.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @tatiang -- nice demo of reading tables with spawned actors. I especially like your use of |T| in a table name. That really makes tables stand out in a list.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @Socks -- Great demo! Got really excited over 'procedurally generated' terrain.
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    @Socks -- Great demo! Got really excited over 'procedurally generated' terrain.
    @RThurman

    Kinda' cheating 'procedural' as I'm putting in the occasional flat area ;)
  • blue_elephantblue_elephant Member Posts: 505
    @Socks How would one create a much more zoomed in lunar surface?

    ★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2013
    @RThurman, thanks! And I've been using the |T| designation for some time now and find it quite useful to keep track of my table attributes. Just hoping the GS team finds a clever way to implement something like that in the next version of the attribute viewer.

    @Socks, it needs more Mr. T. ;)

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

  • SocksSocks London, UK.Member Posts: 12,822
    @Socks How would one create a much more zoomed in lunar surface?
    Not 100% what 'zoomed in' means in this context ? Bigger features ?
  • blue_elephantblue_elephant Member Posts: 505
    Just more cropped so that the surface looks closer to the camera.

    ★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★

  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    @Socks, it needs more Mr. T. ;)
    @tatiang

    : )

    Flying too close to the ground again ?
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    Just more cropped so that the surface looks closer to the camera.

    You could throw a camera into the scene and zoom in, ie: scale the camera (don't forget to accommodate the zoom in the resolution of the thing you are zooming in on).

    Or if you don't want to use a camera 'zoom' then all you'd have to do is to scale up the relevant values in the constrain behaviour that's in the spawner actor:

    (( self.A *0.66)*sin( game.Time *6))+( ( self.A *.12)*cos( game.Time *88))+( ( self.A *.18)*sin( game.Time *112))+( ( self.A *.55)* cos( game.Time *12))+( ( self.A *.1)*sin( game.Time *56))+( ( self.A *.09)*cos( game.Time *165))+384

    It's a bit of a mess, but . . . .

    self.A= the height / depth of the bumps.
    Currently an attribute that interpolates, but you are free to change the values around - the only reason it is interpolating is that I thought it would be good, occasionally, to interoperate it down to 0 to create some flat regions - rather than a constantly undulating surface.

    game.Time*B = B is the 'width' of the bumps/dips.

    Play around with those two values - the self.A value and the values that appear after "game.Time*. . . . . "
  • harrywatsonharrywatson Member Posts: 61
    edited November 2013
    Inventory:

    What it does:

    Collect items which are then stored in your inventory.

    Select and deselect items. State of doors and items saved in tables.

    Correct item 'key' will open corresponding door and unlock scene of your choice.
    Item 'key' can be discarded or kept.

    'Display text' debugging on doors. (you can turn 'doorIndex' on and cheat).

    I've created custom item behaviors to save time. Though there are only three
    places to change code for each item, 7 items x 7 scenes add up to quite a few changes.

    Notes are in the rule/group headings. There are 7 doors, 7 items.

    These are controlled by 7 game attributes A > G. To add more items and
    doors simply add game attributes H > Z after Z you could always start again
    at AA. Then add rows or columns to two of the tables.
    There are three tables. One is for the inventory slot to store its position.
    When the item overlaps the inventory slot, the slot moves out of the way
    and the item is stored on the inventory tray. (you could make the 'InventorySlot'
    visible to see how this works).

    There is a table to store the door state open shut, true false.
    And for the items mainly to keep them where you want them to be.

    What it doesn't do:

    Can't at this stage get touch is pressed or released to work on the doors
    quite the way I want. So when you've opened the door. Bad luck. you have to
    go through it. I don't mind that, but it's not the classic point click behavior
    and it's annoying that I haven't found a fix.

    Also if you interpolate your item too quickly onto the Inventory slot
    it will drag the item as it moves.

    Probably more stuff I'm not aware of.

    This is a thank you to the GS community for the learning I've received
    I'd be delighted for any feedback.

    ZZZZZZip! >>>




  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    @harrywatson -- The link to the inventory system appears to be broken. I'd like to take a look at your solution. Could you re-post?
  • harrywatsonharrywatson Member Posts: 61
    Ok Umm how do you guys do it? I put in an tag?
    I don't get the pretty zip picture.
    I'll try again. Here >>
  • harrywatsonharrywatson Member Posts: 61
    Yep tested that one. Seems to go.
Sign In or Register to comment.