Intro and first few stumbling blocks

BrandonDBrandonD Member Posts: 12
edited October 2012 in Working with GS (Mac)
Hi, first of all I love Gamesalad, I think it's an awesome program. I learned BASIC when I was in middle school and I made something like 200 games back when I was little. Then I got into music, and sort of fell out of programming until I saw this program. It's made me excited about making games again.

In fact, I teach in an after-school program and I'm currently teaching the kids how to use Gamesalad. I'm hoping it inspires at least a few of them to become game programmers.

So I've watched most of the tutorials and made a few games of my own, since I feel I should have a good grasp on any of the basics before I teach them. But I've run into a few snags while making games, snags that don't seem to be addressed on any of the videos or forum threads that I've found.

The first one is regarding collision. I've noticed that even if a character is a png, the transparent edges of its frame are still collideable. Is there a way to make only the visible part of the image collideable?

Related to the above question: In one of the games I have a character with a big sword, as big as the character himself (like anime-style). This character made me wonder: can only *part* of an actor be collideable? Could I somehow arrange it so that the character only gets damaged if the body is hit, and not the sword? Or is the only solution to make the sword its own separate actor?

The second question is related to a high score table. I've learned how to make and save high scores, but what I'd like to do is actually save the top 5 high scores, like the old school arcade games. This way the kids can play the games and several of their scores are saved, rather than just the highest.

I thought that the most economical way to do this would be a 5-row, 2-column table. The table contains default scores/intials just like the old school games, and I've been able to place high scores on the table. The problem is that the new high scores do not seem to be saved when I save a table, or else I do not know how to properly recall a saved table because there is no "load table" feature. When I start the game over, the tables revert to their default values.

Any help with these features would be greatly appreciated, both by myself and a bunch of elementary school kids. Thanks everyone who made Gamesalad happen :)

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    Png has nothing to do with collision, as GS doesnt use pixel collision. In the object you choose circle or rectangle collision. So if you have a round png with alpha, make it a circle collision.

    Part of the actor can't be collidable. You'd need to either constrain the sword to stay near the guy, or wait until gamesalad gets joints at some point.

    For your score table, you need to make a table object for that. Whenever someone finishes a game or level, do some logic that basically scans the table.
    So for table row and column, make a little "loop" that uses x as the row.
    If score >Table (x,2), then Table (x,2)=Score
    if not, then increment x by one, and check the next row.
    Save the table if it changes.

    You don't load tables, you just save it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Brandon, I felt like I was reading my own post. :) If you ever want to Skype between our two after school classes, send me a PM and we'll set it up. I've done a couple of these and the response from the kids has been great.

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

  • BrandonDBrandonD Member Posts: 12
    Thanks for the comments :)

    Hotmagic thanks for the info about collision, I was only mentioning a png specifically because it contains alpha information and thought that possibly GS could use this information for collision detection. If not then I'll just have to make sure the image is shaved down as small as it can possibly go.

    As for the tables, I've been doing exactly what you described - I understand what to do regarding creating tables and storing/overwriting scores, what I don't understand is why when I "save table" and restart the game, the table information reverts back to the default info instead of the info I just saved. Is the problem with the default info? Should I leave the table info blank in the game itself?

    Tatiang I would love to do a skype thing between classes one day, thank you for the offer!
  • ParkGamesParkGames Member, PRO Posts: 117
    "Save Table" command only saves data to a device, not in the Gamesalad Creator itself. Your highscore table should work fine when played on a iPhone etc either through the Gamesalad Viewer or as a published build.
  • dwibredwibre Member Posts: 192
    edited October 2012
    When designing your characters try and keep them as square or as round as possible it make the collisions more accurate. If you look at my character (profile picture) you will notice he is almost rectangular in shape.
Sign In or Register to comment.