Tableless Tetris - A Study in Pointlessness
Armelline
Member, PRO Posts: 5,374
So, I enjoy messing around with GameSalad. I make the odd game, but at the end of the day I just enjoy trying to do things. My background is actually in philosophy, which may sound... disconnected from game making. But an important part of philosophy is being able to express an idea clearly and unambiguously. This is often done using logic.
GameSalad is just logic. You don't code when you use GameSalad. People often refer to "your code" when discussing games on these forums, myself included. At the end of the day, though, it isn't code. It's logic. What you're doing when using GameSalad is coming up with an idea and then saying "If I break this down into the most basic steps needed to accomplish it, what are those steps?" So GameSalad lets me exercise my love of logic (love of, not innate ability at :P).
Often there will be lots of ways of accomplishing the same task. Sometimes one is better than the others, sometimes they are just two different ways of achieving the same results, and sometimes one is better in certain circumstances and one is better in others.
I've spent the past couple of days toying around with an idea that appealed to me. Tetris. I don't actually like Tetris that much. I had an Atari Lynx, not a Gameboy. I never got into the Tetris craze. But people often commented that GameSalad wasn't really suitable for making Tetris, or that it would be too complicated to be worth doing. They speculated that with writable tables it would be a doddle to make in GameSalad. A while back a forum user called @HC_DK proved them right with a clever and efficient looking Tetris demo made using tables.
Well, I decided to take a stab at it too. But sitting down to do it, especially having read @HC_DK's explanation of how he did it... just seemed boring. He'd already done the fun part - the figuring out how. And if I'm totally honest, I find tables a bit boring. Don't get me wrong, they're great. But boring.
So I figured, "Why not make Tetris WITHOUT tables?" So that's what I've been doing. It's been... interesting. I've had an absolute blast doing it (I'm weird like that), but obviously what I'm trying to accomplish is akin to trying to build a car using only metal. It's probably possible, but a hell of a lot harder than it might sound at first. (Open up your bonnet/hood and take a look at all the stuff in there that ISN'T metal.) Doing so would essential be an exercise in making life harder for yourself and ending up with a less efficient result.
What the hell, though, eh?
It isn't completed, and isn't a real "game". It doesn't even count the score or tell you when you hit the top. (Both would require one rule, so it's pure laziness on my part.) But it shows that Tetris *is* possible to create using GameSalad without tables.
I didn't bother to constrain the rotation when your piece is close to the edge of the screen, so you can actually rotate outside of the borders. But that wouldn't be overly difficult to fix. More longwinded than you might think, but not that difficult.
Also, it uses a *ton* of actors. It has an insane number of rules firing at once. It still runs at 60fps in the Viewer though (iPhone 4S). I'm actually really impressed at how fast GameSalad can run this many rules. And I was actually VERY surprised it managed 60fps on device. Mad props to @CodeWizard and the GameSalad team. There are literally thousands of rules firing in a second at times.
Before anyone asks, no I will not be selling this template. If people want I'll whip up a template using tables, but it would be insane to use this method instead. For the same reason I'll not be releasing the project file for free either, as I have no doubt some silly sausage would try to use it anyway. I would consider making another video showing all the hidden actors though. None of the methods I've used are all that difficult to figure out, just... fiddly.
Sorry for the essay, I enjoy rambling on. Wasting time on absurd and pointless projects, and rambling on. Aww yeah.
GameSalad is just logic. You don't code when you use GameSalad. People often refer to "your code" when discussing games on these forums, myself included. At the end of the day, though, it isn't code. It's logic. What you're doing when using GameSalad is coming up with an idea and then saying "If I break this down into the most basic steps needed to accomplish it, what are those steps?" So GameSalad lets me exercise my love of logic (love of, not innate ability at :P).
Often there will be lots of ways of accomplishing the same task. Sometimes one is better than the others, sometimes they are just two different ways of achieving the same results, and sometimes one is better in certain circumstances and one is better in others.
I've spent the past couple of days toying around with an idea that appealed to me. Tetris. I don't actually like Tetris that much. I had an Atari Lynx, not a Gameboy. I never got into the Tetris craze. But people often commented that GameSalad wasn't really suitable for making Tetris, or that it would be too complicated to be worth doing. They speculated that with writable tables it would be a doddle to make in GameSalad. A while back a forum user called @HC_DK proved them right with a clever and efficient looking Tetris demo made using tables.
Well, I decided to take a stab at it too. But sitting down to do it, especially having read @HC_DK's explanation of how he did it... just seemed boring. He'd already done the fun part - the figuring out how. And if I'm totally honest, I find tables a bit boring. Don't get me wrong, they're great. But boring.
So I figured, "Why not make Tetris WITHOUT tables?" So that's what I've been doing. It's been... interesting. I've had an absolute blast doing it (I'm weird like that), but obviously what I'm trying to accomplish is akin to trying to build a car using only metal. It's probably possible, but a hell of a lot harder than it might sound at first. (Open up your bonnet/hood and take a look at all the stuff in there that ISN'T metal.) Doing so would essential be an exercise in making life harder for yourself and ending up with a less efficient result.
What the hell, though, eh?
It isn't completed, and isn't a real "game". It doesn't even count the score or tell you when you hit the top. (Both would require one rule, so it's pure laziness on my part.) But it shows that Tetris *is* possible to create using GameSalad without tables.
I didn't bother to constrain the rotation when your piece is close to the edge of the screen, so you can actually rotate outside of the borders. But that wouldn't be overly difficult to fix. More longwinded than you might think, but not that difficult.
Also, it uses a *ton* of actors. It has an insane number of rules firing at once. It still runs at 60fps in the Viewer though (iPhone 4S). I'm actually really impressed at how fast GameSalad can run this many rules. And I was actually VERY surprised it managed 60fps on device. Mad props to @CodeWizard and the GameSalad team. There are literally thousands of rules firing in a second at times.
Before anyone asks, no I will not be selling this template. If people want I'll whip up a template using tables, but it would be insane to use this method instead. For the same reason I'll not be releasing the project file for free either, as I have no doubt some silly sausage would try to use it anyway. I would consider making another video showing all the hidden actors though. None of the methods I've used are all that difficult to figure out, just... fiddly.
Sorry for the essay, I enjoy rambling on. Wasting time on absurd and pointless projects, and rambling on. Aww yeah.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Comments
Sometimes, you might succeed. Bravo!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Some of the cooler things I've built have come about from a 'I wonder if that's possible' moment. My Audio Invaders game was the end product of simply wanting to play around with the positional audio behaviour.
I think the game I'm making now is the first one that was born from a slow grown game idea and not one that's evolved from playing with GameSalad... I'll see which route works out better eventually.
... and same here on the 'we write code' front... when ever I need to explain what we do in GameSalad I go through the process of thinking .. "err, nope it's not code, we write 'rules', hmm, nope sometimes it's just a behavior not inside a rule, we write logic, yeah, but that confuses people, screw it... we write code (and hopefully no actual coders will pick me up on it.)".
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support