Best 2048 so far by Chaotic

[quote] My question simply is, why try to replicate something exactly when one can simply go the the real site and play it?
I’ve never understood these sort of concepts and hope someone can explain, because my frail mind can’t grasp the idea of this. [/quote]

It isn’t exact. I mean, the core gameplay mechanics remain unchanged, as it is still 2048, but My version is different artistically and has more features. For example, the leaderboard(which I will be fixing), there is a doge version, which I compacted into one game, and you can chat with other players and compare scores while in game. In my opinion, my version is more immersive.

Though, I suppose I recreated it for fun? I don’t really know. I have these things which I call “Two day projects” that I normally work on vigorously for 48 hours and then quit. This game started out as a two day project, but gradually I came to want to add more features; thus here we are today.

(Side note: The animation system I used for the doges was part of a two day project)

I hope I answered your question thoroughly enough.

I like this one better

[quote] My question simply is, why try to replicate something exactly when one can simply go the the real site and play it?
I’ve never understood these sort of concepts and hope someone can explain, because my frail mind can’t grasp the idea of this. [/quote]

It isn’t exact. I mean, the core gameplay mechanics remain unchanged, as it is still 2048, but My version is different artistically and has more features. For example, the leaderboard(which I will be fixing), there is a doge version, which I compacted into one game, and you can chat with other players and compare scores while in game. In my opinion, my version is more immersive.

Though, I suppose I recreated it for fun? I don’t really know. I have these things which I call “Two day projects” that I normally work on vigorously for 48 hours and then quit. This game started out as a two day project, but gradually I came to want to add more features; thus here we are today.

(Side note: The animation system I used for the doges was part of a two day project)

I hope I answered your question thoroughly enough.[/quote]

These doges you speak of…
They…
They… gain my approval.

I fixed the leaderboard. Please play the game again to allow your stats to show up.

I started making my own copy of this game, but uh… it ended poorly. Still was fun though :stuck_out_tongue:

[spoiler][code]local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

local tiles = {}–{{Num, x,y}}
local Size = 4 --4x4

for Y = 1,Size do
for X = 1,Size do
table.insert(tiles, {num=0,x=X,y=Y})
end
end

function copyTable(tab)
return {unpack(tab)}
end

function getTile(x,y)
for i,v in pairs(tiles) do
if v.x == x and v.y == y then
return v, i
end
end
return nil
end

function getEmpty() --returns the positions of empty tiles
local empty = {}
for i,v in pairs(tiles) do
if v.num == 0 then
table.insert(empty, i)
end
end
return empty
end

function getAdjacent(tile, Axis, Direction)
if Axis == “X” then
local adjacent, pos = getTile(tile.x + Direction, tile.y)
if adjacent then
return adjacent, pos
end
elseif Axis == “Y” then
local adjacent = getTile(tile.x, tile.y + Direction)
if adjacent then
return adjacent, pos
end
end
return nil
end

function renderTiles() --currently rendering tiles into the output.
local str = “”
for i,v in pairs(tiles) do
if i==5 or i==9 or i==13 then
print(i)
str = str…“\n”
end
str = str…v.num…“|”
end
return str…“\n_________________”
end

mouse.KeyDown:connect(function(key)
local keyCode = key:byte()
local axis
local direction
if keyCode == 20 then --left
axis = “X”
direction = -1
elseif keyCode == 19 then --right
axis = “X”
direction = 1
elseif keyCode == 17 then – up
axis = “Y”
direction = -1
elseif keyCode == 18 then – down
axis = “Y”
direction = 1
end
if axis then --shift tiles
local shift = copyTable(tiles)
for i,v in pairs(tiles) do
local adjacent, pos = getAdjacent(v, axis, direction)
if adjacent and pos then
if adjacent.num == 0 then
shift[pos].num = v.num
shift[i].num = 0
elseif v.num == adjacent.num then
shift[pos].num = v.num + adjacent.num
shift[i].num = 0
end
end
end
tiles = copyTable(shift)
local newTile = math.random() < 0.9 and 2 or 4
local empty = getEmpty()
if #empty > 0 then
tiles[empty[math.random(1,#empty)]].num = newTile
end
print(renderTiles())
end
end)
[/code]
[/spoiler]