Spare Code ? Dump It here.

1111214161727

Comments

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



    Patterned fades as an alternative to a normal fade to black.

    https://www.mediafire.com/?4d98gc1q2lb9rap

  • SocksSocks London, UK.Member Posts: 12,822
    @matarua
    @Socks I love isometric stuff . . .
    I've got an abandoned isometric GS game project I need to get back to at some stage:


    I trust you have been here and seen these? http://www.levitated.net/daily/index.html

    Old Jared Tarbell stuff and here's some newer stuff http://www.complexification.net/gallery/
    Not seen those before, I'll definitely check them out.
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    @Socks looking real slick - there's a guy making a nice looking isometric game called Quonie - I think the illustrator has captured a new take on the Head over Heals vibe here - http://wiki.xxiivv.com/Oquonie - it's in dev but looking really nice. He does some really weird but smart stuff - I would even say obtuse really as it is quite mysterious in it's own ambiguity. http://wiki.xxiivv.com/Hiversaires is stunning looking - a puzzler that has no real direction but for exploration. I really like the clean look and Japanese influence in the work. I think once I get my current 3 projects done, I will look in to either an isomteric game or point and click adventure. We shall, see, anyway, back to game dev :) Cheers, M@
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Socks, you need to finish Cubert. Can't wait to see what you do with this...

    image

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

  • SocksSocks London, UK.Member Posts: 12,822
    @tatiang
    @Socks, you need to finish Cubert. Can't wait to see what you do with this...

    image
    Ah ! Good ol' Q*bert, I wonder what happened to him, last I heard he was working as a gigolo, working the hotels around train stations.




    : )
  • UtopianGamesUtopianGames Member Posts: 5,692
    Q-Bert :) is free…..



    http://www.deepblueapps.com/gs-q-bert-template/

    Its an old file but might be of use to some.

    Darren.
  • GS_MasterGS_Master Member Posts: 159
    Simple layer select + Snap to grid. Tell me what you think https://dl.dropboxusercontent.com/u/26048107/GS_Master Layers.gameproj.zip
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Hurray, thanks Darren @DeepBlueApps! I forgot about that. lol... might just download it so I can play it.

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    @GS_Master -- Thanks for sharing with the GS community! These two demos will come in very handy.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Detect attribute value change

    This will log a debugging statement when the value of an integer changes within a rule condition that was already true. For example, if the condition is When attribute game.count > 5, it will trigger when game.count is 6, and 7, and 8, etc.

    Click the square to increase the count.

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    edited February 2014
    Collision Detection For Odd Shapes

    image

    Ever wanted to detect if the mouse is inside an odd shaped polygon? It uses a math trick to find if a point is to the right of a line segment. (If the point is to the right of all the line segments of a polygon, then the point must be inside the polygon.) In this example, the point is the tip of the cursor. (But it could be any point.)

    It uses a table to list the endpoints of the line segments.
    http://www.mediafire.com/download/n68v4ql9qeo0sxj/pointInPolyTableMoveableV2.zip
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Ooh, nice @RThurman. Now we just have to get that flood fill working, don't we? ;)

    Those expressions are not for the faint of heart. :P

    By the way, thanks for the conditional logic examples a while back. I've made good use of them in my custom keyboard project.

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    @tatiang -- glad you find the above demo useful!

    The expressions just look difficult because the table functions take up so much room. Whats going on is pretty straight forward. I should have documented it better. For starters, the expression is just testing if a point is left or right of a given line segment. (Its a logical truth that if a group of lines are all connected to form a simple polygon -- when a point is to the right of each line, then the point must be inside the polygon formed by the lines.)

    Any formula that tells you if a point is left or right of a line will work for this trick. (There are probably other expressions that do the same thing.)

    Lets say mx,my stands for the mouse's x and y coordinates, and x1,y1 stands for the point where a line begins, and x2,y2 stands for a point where the line ends. The expression would look like this: (my-y1)*(x2-x1)-(mx-x1)*(y2-y1)

    If the answer is less than 0 then the point is to the left of the line. If the answer is greater than 0 then the point is on the right of the line.

    So here are the six expressions for finding if the mouse is within a six sided figure:
    Line1: (my-y1)*(x2-x1)-(mx-x1)*(y2-y1)
    Line2: (my-y2)*(x3-x2)-(mx-x2)*(y3-y2)
    Line3: (my-y3)*(x4-x3)-(mx-x3)*(y4-y3)
    Line4: (my-y4)*(x5-x4)-(mx-x4)*(y5-y4)
    Line5: (my-y5)*(x6-x5)-(mx-x5)*(y6-y5)
    Line6: (my-y6)*(x1-x6)-(mx-x6)*(y1-y6)

    See the pattern? It makes it real simple to create a test for anything from a three sided to a 359 sided polygon. You just need to make the last line hook back up to the first line (as in Line6).

    TMI???

  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @RThurman - Sorry, you lost me at "just look difficult". :D
    Nevertheless, cool stuff!
    - Thomas
  • BBEnkBBEnk Member Posts: 1,764
    @RThurman

    Never thought I would need duel monitors to see a line of code, very interesting I'm gonna play with that once my head stops hurting from looking at it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @RThurman I think I get it but I'm stuck on this idea of a point being "right of a line." To me, some points outside of a polygon are to the left of a line segment and some are to the right of a line segment. I'm not following how a point would be to the right of all line segment if it's inside the polygon.

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    @RThurman I think I get it but I'm stuck on this idea of a point being "right of a line." To me, some points outside of a polygon are to the left of a line segment and some are to the right of a line segment. I'm not following how a point would be to the right of all line segment if it's inside the polygon.
    Hmm... Imagine you are standing at the beginning of a line and looking straight down the line towards its end. Your right eye would be on the right side of the line, and the left eye would be on the left side of the line.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    @RThurman But here's the thing... I took the polygon from your demo and extended two of the lines that define the polygon. Ignore the thick black square as it was the scene background. If I plot a point in green inside of the polygon, it looks to be left ("southwest") of line #1 and right ("northeast") of line #2 if I were to draw perpendicular lines (not shown on my sketch) from those two lines to the interior point .

    image

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    Line #2 is actually line #4. And it begins on the other end!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Line #2 is actually line #4. And it begins on the other end!
    See now you're just messing with me!

    ~X( ~:> X_X

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

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    Hmm.... I didn't realize just how bad my explanations are. Does the following figure help? It shows the line numbers and the coordinates at the beginning of each line segment.

    image
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, and I had numbered the lines in my sketch without thinking about the fact that you had assigned the lines numbers in your demo. I just arbitrarily picked #1 and #2 because I drew two lines. :)

    Okay, in your drawing above, let's say #2 was actually parallel to #5. If I pick a point in the interior of the polygon (say 0,40), it would appear to me that the point is to the right of #5 and to the left of #2.
    when a point is to the right of each line, then the point must be inside the polygon formed by the lines
    I think I must be using different definitions for "right" and "left." Or is it because I'm thinking in terms of line segments and that logical truth depends on lines? I appreciate you trying to explain it..... I'm sure we'll get there!

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Oh wait! @RThurman, is it as if I'm walking along the perimeter of the polygon in a clockwise manner and checking to see if the point is to the right of me? If it's that, then it makes sense. But then of course if I walk counter-clockwise the point would always be to the left of me. Hmm...

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

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Thanks @RThurman for the "Odd Shape Collision" example. I'm mucking around with an isometric board and this is perfect for selecting individual isometric tiles without selecting the other tiles that the images overlap.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    edited February 2014
    @RThurman - Sorry, you lost me at "just look difficult". :D
    Nevertheless, cool stuff!
    - Thomas
    Sorry about that! I bet someday you will sit straight up in chair and yell "Eurika -- I have found it"
    Oh wait! @RThurman, is it as if I'm walking along the perimeter of the polygon in a clockwise manner and checking to see if the point is to the right of me? If it's that, then it makes sense. But then of course if I walk counter-clockwise the point would always be to the left of me. Hmm...
    Yes!!! and Yes!!!
    My head hurts. b-(
    Sorry! The nice thing about this is -- all you have to do is put in the coordinates in the table and the rest just works!
    Thanks @RThurman for the "Odd Shape Collision" example. I'm mucking around with an isometric board and this is perfect for selecting individual isometric tiles without selecting the other tiles that the images overlap.
    Great! Glad its useful.
  • SocksSocks London, UK.Member Posts: 12,822
    @RThurman

    Genius !
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879
    @Socks -- Thanks! It is genius. But I can't take credit for it. It is a relatively common way to determine if a point is within a simple polygon. There are other methods, but this one seemed fairly doable in GameSalad.
Sign In or Register to comment.