This is a full game engine. With just 3 lines of code you can be running the entire 2048 game. Support for custom images and styles. New update (22-Mar-2019). In this updated I completely re-coded the game engine. Taking advantage of ds_maps for data storage. Shouldn’t be too hard to update if you are using the old version.
Play the HTML5 demo here:
https://j4m1ef0rd.itch.io/2048-demo
Features:
A Demo object is provided, just put it in a room and press play. Example Code:
Create Event:
player1_map = setup_2048(4,4,true,grid_background_2048_sprite,grid_tile_2048_sprite,115,0,1,10);
Step Event:
run_2048(player1_map,0,0,0,0,0);
Draw Event:
draw_2048(player1_map,x,y,1);
If you like this code, then check out my Onet game engine. It also runs on just 3 lines of code.
End User Licence Agreement (EULA).
Added saving and Loading! Added a delete_2048 script to free the memory used by the engine. Added the ability to undo as many times as you want (new argument setup_2048 script) saving and loading supports the undo's .