Jewel Drops - A Basic Starting Template You Might Find Useful
KevinCross
London, UKMember Posts: 1,894
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:
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:
Comments
* 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
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
* 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?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
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.
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.
Darren.
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.
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...
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.
What you've done is already awesome though, very generous for a free template
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
GTA5 is much more important, obviously
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.
http://www.kevincross.co.uk/wp-content/uploads/2013/09/GameSalad-Template-Jewel-Drops.zip
The fantastic background is not mine, it's from here http://imgur.com/r/Cinemagraphs/PRpkg
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!