Recent

Author Topic: 2048 game  (Read 490 times)

Chronos

  • Full Member
  • ***
  • Posts: 211
    • PascalClassLibrary
2048 game
« on: October 05, 2019, 03:42:04 pm »
https://app.zdechov.net/2048
Open source Lazarus/FPC implementation of classic block sliding puzzle game called 2048. https://en.wikipedia.org/wiki/2048_(video_game)
This game is nicely played on smartphones using touchscreen but it can be played with keyboard as well.
The game is pretty addictive. I wanted to know how easy is to implement such game. Or maybe even to extend it.

lainz

  • Hero Member
  • *****
  • Posts: 3225
    • Lainz
Re: 2048 game
« Reply #1 on: October 05, 2019, 03:51:51 pm »
Thanks, never played this game but I will check it.

This should go in Games forum?

Edit: I don't know how to play it, can you give some information? I click the boxes and it does nothing..
« Last Edit: October 05, 2019, 03:55:31 pm by lainz »

Zoran

  • Hero Member
  • *****
  • Posts: 1459
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: 2048 game
« Reply #2 on: October 05, 2019, 04:20:43 pm »
Try with arrow keys, you'll understand it yourself soon. :D
Read: https://en.wikipedia.org/wiki/2048_(video_game)#Gameplay
Rather addictive.
« Last Edit: October 05, 2019, 04:24:16 pm by Zoran »

tr_escape

  • Sr. Member
  • ****
  • Posts: 393
  • sector name toys | respect to spectre
    • Github:
Re: 2048 game
« Reply #3 on: October 05, 2019, 06:44:20 pm »
I was trying something new about this game (not same project) but not finished on the computer play side:

https://github.com/mehmetulukaya/mu2048

« Last Edit: October 05, 2019, 06:55:34 pm by tr_escape »

Chronos

  • Full Member
  • ***
  • Posts: 211
    • PascalClassLibrary
Re: 2048 game
« Reply #4 on: October 05, 2019, 07:00:35 pm »
It may be posted in games section but this is just announcement so this section is ok as well.

I should add some instructions how to play it. What would be useful for new players. It was just quick few days activity. And as usual last 20% of work takes 80% of time :)

A game like this would be good candidate for game contest. Even it wouldn't be original, it would take short time to make and its fun to play :)

Install 2048 game to your smartphone and you will go to sleep pretty late :) It can be well played in a bed.


lainz

  • Hero Member
  • *****
  • Posts: 3225
    • Lainz
Re: 2048 game
« Reply #5 on: October 06, 2019, 03:41:39 pm »
Very addictive game, I reached 256  :)

Chronos

  • Full Member
  • ***
  • Posts: 211
    • PascalClassLibrary
Re: 2048 game
« Reply #6 on: October 06, 2019, 04:43:44 pm »
I will try to implement some strategy for computer player. Probably something deterministic, some rules to follow rather then neural network and some sort of AI. But using neural network AI with genetic algorithms can be also fun as you can see in this video :) https://www.youtube.com/watch?v=1g1HCYTX3Rg&t=589s
At least important thing is to set good fitness function. Then learning process should be straightforward.

Anyway, this is nice game which can be easily implemented in just few hours and there are many possibilities how to improve that game and make it more complicated. In Android play store there are lot of clones and some of them have more game modes. Games like 2048+, 2048++. 2048X, 2048 plus, super 2048, and so on. Perhaps something like multiplayer can exist. But if tiles placement is random then there is no need to play it at the same time. Even if both players would have same pseudorandom generator with same initial seed, then it would be still random.


jamie

  • Hero Member
  • *****
  • Posts: 1992
Re: 2048 game
« Reply #7 on: October 06, 2019, 09:56:13 pm »
As I have said many times before....

 There are 10 types of programmers in this world, those that know binary and those that don't!