GS48 - A study in doing things that probably shouldn't be done

ArmellineArmelline Member, PRO Posts: 5,369
edited May 2014 in Working with GS (Mac)

I have a confession to make.

I've been playing 2048 waaaay more than I'd like to admit. It's actually kind of fun. It epitomises all that is worst and best of iPhone gaming. A simple, easy, fun, smooth game, completely ripped off from a better, less popular game.

But you guys know me, I like to do things for the hell of it. So I decided to have a stab at cloning 2048 in GameSalad. I'd read somewhere that the original creators had started in GameSalad and ended up getting frustrated and moving to another platform to make it. I don't know if that's true, but I can believe it.

I went about trying to implement this in three different ways. The first was elegant, smooth, efficient. And didn't work. The second was clumsy, brute-forcing things, and ultimately didn't work. This third attempt is the simplest, but the most long-winded. It is badly in need of optimising, and only goes up to 16 right now (but other numbers will be implemented shortly).

That said, it was a ton of fun trying to work out how to at least vaguely get this working. As it turned out, it was really rather simple. I'm sure there are better ways, and I suspect I'll have to find one before I'm satisfied with the smoothness. It can definitely be speeded up compared to what you see below (it's slowed marginally to make it easier for me to see what happens as I tested it), but when played at the speed the original moves the tiles GameSalad seems to struggle to keep up.

No little animations or score keeping yet, but now I've figured out how to get it to broadly work I may lose interest pretty rapidly, so I make no promises they'll ever turn up.

If people want it I might finish it up/optimise it and knock out a template.

Anyway, BEHOLD THE LATEST OF CLONES.

Comments

  • RainbrosRainbros Member Posts: 124

    Cool, nice job! I'd love to attempt my own clone (just as a learning exercise), but unfortunately I don't have any spare time. :(

  • ArmellineArmelline Member, PRO Posts: 5,369

    @Trunks said:
    Cool, nice job! I'd love to attempt my own clone (just as a learning exercise), but unfortunately I don't have any spare time. :(

    Although the method I ended up using was pretty simple this was definitely one of the trickiest problems to solve I've found for myself in GameSalad. It's good fun and well worth finding the time for!

  • DestinyDragonDestinyDragon Member Posts: 2

    Oh wow, me and my friends have made a clone of 2048 in gamesalad too. 30-40 fps. We are now trying to change up the concept so it isn't directly a 2048 clone but the same style.

  • RainbrosRainbros Member Posts: 124

    @Armelline - Now do it using a custom font. ;)

  • ArmellineArmelline Member, PRO Posts: 5,369
    edited May 2014

    @Trunks said:
    Armelline - Now do it using a custom font. ;)

    The funny thing is I picked a font that looked similar and then realised after remaking the tiles etc. that it appeared to be the exact same font... (Euphemia)

    @DestinyDragon said:
    Oh wow, me and my friends have made a clone of 2048 in gamesalad too. 30-40 fps. We are now trying to change up the concept so it isn't directly a 2048 clone but the same style.

    Great work! Would love to see it!

  • RainbrosRainbros Member Posts: 124

    @Armelline‌ I'm assuming you simply used invisible actors to get the collision effect with spaces between the tiles?

  • ArmellineArmelline Member, PRO Posts: 5,369
    edited May 2014

    @Trunks Kinda. There are invisible actors at work but they aren't (directly) handling the collisions. There are three tables used - one handles the tiles and the other two are used for randomly selecting an empty square to spawn new tiles into (one of which is only used to blank out the other one between spawns).

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @Armelline said:

    Excellent work !

    I think I've cracked my 2048 addiction, luckily it only lasted a few days, I can get 2048 fairly easily now, not sure I'll bother going for 4096, too much of an investment in time.

    Were you going to sell this as a template ?

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Looks like you're on the right track. My friend @PureEpicStudios‌ has made a fully functional template. It's extremely smooth; I couldn't see the difference between the real thing and his template.

    Keep it up!

  • POMPOM Member Posts: 2,599

    Looking good :)
    I encourage solving problems and coming up with algorithms!
    I've made a 2048 game too ( in code though).
    Hopefully this is for learning purposes only and not for publish.. From obvious reasons.

    Roy.

  • ArmellineArmelline Member, PRO Posts: 5,369

    @Socks said:
    Were you going to sell this as a template ?

    To be honest once I solved the general problem I optimised it a bit to make it smoother and then lost all interest. So no, probably not. It's the puzzle I love, not all the hard work making something complete :P

Sign In or Register to comment.