Jewel Drops - A Basic Starting Template You Might Find Useful

KevinCrossKevinCross London, UKMember Posts: 1,894
edited September 2013 in Working with GS (Mac)
Someone PM'd me a day or two ago asking for suggestions on how they might set up their jewel game with tables after I mentioned that's how I might do it if I were setting one up, so I threw together a basic template for them today. It's a bit rough but I believe it helped them.

As it's not a complete game, and they will be changing the mechanics substantially I thought I'd share it incase anyone else finds it useful. It's like Tetris without the different shapes, and Bejewelled with the matching 3 of the same colour. It won't destroy lines of 4 or 5 colours, just 3.

It's not a game I will be making myself anytime soon so it's highly unlikely I'll be updating it so you have to forgive me for any bugs I've missed, or if you find it hard to work with. I also apologise for some of the bad attribute names I've used.

There's an actor called README which has notes on it to show what can be changed and what does what, as well as some suggestions on how it could be improved i.e. looping through tables in the next version of GameSalad.

If you improve on it and are happy to share the improvements you've made then please do.

I've attached the project file and have also uploaded it to my site in case it gets deleted from the post in the near future.

http://www.kevincross.co.uk/?attachment_id=143

Here's a quick YouTube video of it:


«1

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Forgot to attach it
  • BoomshackBarryBoomshackBarry Member Posts: 712
    Thanks for sharing, this could be a good starting point for loads of games :)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    You're welcome! :)
  • alimpo83alimpo83 Member Posts: 188
    very nice, it's a very nice start for achieving those types of games.
  • VolontaArtsVolontaArts Member Posts: 510
    thanks!!!! this is a perfect start!
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I wasn't intending to update it but there were two bugs found that needed to be fixed.

    * The down key wasn't working in the last column, but is now.
    * When a large stack of jewels were on top of each other and the bottom ones were destroyed multiple jewels were being spawned at once. Doesn't seem to happen now.

    I've updated the notes to mention that you can also change the size of the jewel actor which is currently 30x30. It won't break anything :)

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Nice work, Kevin. Keep it up!
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    I'm considering putting my current game on hold and re-writing this template with the following:

    * Options to spawn any number of cubes joined together i.e. 2, 3, or 4 etc. all stacked on top of each other.
    * A button or key press to cycle the colours around the shape so 3 jewels joined together with the colours red, green, blue would become blue, red, green when the button or key is pressed, and green, blue, red the next time it's pressed.
    * Detection of 3 or more of the same colour in a line together (I will probably need to use the new behaviors in the nightly builds to simplify this part)
    * A button or key press to rotate the shape.
    * Options to spawn different shapes i.e. Tetris type shapes (this being the hardest I'd imagine).

    I feel by putting this post here I'm more likely to do it :P and also feel that I have more of an idea what's needed with this one than I do my current game.

    So I can gauge interest would anyone be interested in this free template?
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    I missed this the first time around, looks great and thanks for sharing!
  • alimpo83alimpo83 Member Posts: 188
    That would be awesome KevinCross!
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    Thanks for your comments!

    I've started re-writing it and so far I've got it set to spawn different size lines of jewels randomly. In the video below you'll see between 1 and 5 blocks spawned at once.

    I haven't added any code to destroy lines of the same colour yet, or rotate the blocks/colours.

    I'm creating this with the nightly build so when it's completed you'll only be able to open it in a version of the nightly build, and hopefully version 11 when it's released.


  • Gamer1992Gamer1992 Member Posts: 83
    this is good
  • MillionairAppsMillionairApps Member Posts: 110
    Very cool, keep up the good work
  • VolontaArtsVolontaArts Member Posts: 510
    wow that looks really nice man!
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    I've now got the switching/cycling through the colours working and added some buttons at the bottom of the screen to control the jewels.

    Next on the list is checking for and destroying lines of 3 or more of the same colour.

    I don't think I'm going to be able to rotate the blocks or add other shapes like those in Tetris. I feel that's beyond my capabilities.

  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @KevinCross Looking great so far ;)
  • UtopianGamesUtopianGames Member Posts: 5,692
    Looking cool so far m8,

    Darren.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    This is the last clip before I make it available tomorrow.

    Destroying lines of 3 or more of the same colour has now been added, as well as a very basic scoring system (plus 100 for each block destroyed) and a restart game button when the jewels stack up to the top of the screen (not shown in the video)

    Before making it available I need to go through and add a few more notes, as well as remove anything that's not being used like attributes etc.

  • VolontaArtsVolontaArts Member Posts: 510
    thats looking amazing man great design
  • BoomshackBarryBoomshackBarry Member Posts: 712
    This is looking great, a massive improvement on the first version!

    I take it it's a whole different story to try and get the blocks to destroy adjoining matching blocks if they're not part of the same straight line? I think players would expect that to happen when playing the game, but I have no idea how I'd tackle that myself...
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    @BoomshackBarry I'm not sure I understand what you mean. In the video I destroy 5 blocks on the bottom row. It doesn't happen in the video but any blocks falling into a new line after blocks have been destroyed underneath them should register as a new destroy too. Every jewel checks the jewels around them when they're not moving.

    The block destroying is very similar to the first version, there's just a slight delay so that the other 2-4 block in the line have time to register too. I did try with a table but you can't loop through the whole table with loop over table, and I'm pretty certain loop over table is broken from my limited tests in this project and another.

    Unfortunately it does come with bugs again, and I spent a good day or two trying to tackle them with no luck, but I will list the bugs in the file when I upload it later today.

    Hopefully someone with more experience and knowledge can improve it for their own game, or at least take bits from it. I'm probably going to take bits from it to create a Bejeweled game.
  • BoomshackBarryBoomshackBarry Member Posts: 712
    What I mean (it's hard to describe) is that in the screenshot below, I think most players would expect all 6 adjoining blocks to be destroyed rather than just the bottom 5.

    image

    What you've done is already awesome though, very generous for a free template :)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    @BoomshackBarry oops I never noticed that in the video >.<

    If I can find a quick way of doing that today I will. I have an idea but I won't spend long on it if it proves hard or not workable. I'm still waiting for my copy of GTA 5 that's late so I have some spare time today :)
  • BoomshackBarryBoomshackBarry Member Posts: 712
    Haha don't go to any extra work on my behalf, it's just something that caught my eye.

    GTA5 is much more important, obviously ;)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    I didn't do the adjoining blocks thing in the end as I'd imagine it'll probably need an extra table, and I don't want to over complicate the file

    The new version can be found here: http://www.kevincross.co.uk/?attachment_id=143

    Enclosed in the zip file is a README.pdf explaining the game attributes as well as the two bugs I've found that I've struggled to fix. The template has quite a lot of notes in it too.

    Apologies for giving something half done with bugs but I think I've gone as far as I can with this file with my experience and knowledge of GameSalad. If I find that a future version of GameSalad will improve things or I find other ways of doing certain parts of it then I will update it.

    I hope you find it useful and are able to adapt it for a game in the future.

    Just as a reminder, it was built with the nightly build. It could be converted to 10.3 because it doesn't use loops but it uses a lot of rules where expressions are being checked against expressions, so those would need to be converted to attributes first.

  • alimpo83alimpo83 Member Posts: 188
    Can't download from your site, I click but nothing happens. Would love to try the latest version!
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    @alimpo83 it's downloading fine for me, but here's the direct link to the zip file:

    http://www.kevincross.co.uk/wp-content/uploads/2013/09/GameSalad-Template-Jewel-Drops.zip
  • alimpo83alimpo83 Member Posts: 188
    I'm going to spice it up a bit. What about using my 3D technique and your template and producing these cool effects? Better check the video ;)

    The fantastic background is not mine, it's from here http://imgur.com/r/Cinemagraphs/PRpkg

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Nice one :)
  • alimpo83alimpo83 Member Posts: 188
    Oh, no! No more space for space lines! :D

    Just a further edit of graphics and adding of effects. This could easily become a full game, it's addictive.

    PS: I've encountered the bugs you talk about in your Readme file. I'll try to fix them, I'm not a great programmer, but in GS, I have a shot!

    imagebam.com
Sign In or Register to comment.