2048
2048
Hello,
I'm here to share my little clone of the game 2048.
It also includes some AIs, which are not really intelligent yet.
They mostly get to the 1024 Tile, sometimes 2048.
But thats where you are coming in, just try to write your own AI and upload the results here.
There is an example include for an AI which just randomly moves.
Just copy it, change the name and include it to the main file.
Links Have Fun!
I'm here to share my little clone of the game 2048.
It also includes some AIs, which are not really intelligent yet.
They mostly get to the 1024 Tile, sometimes 2048.
But thats where you are coming in, just try to write your own AI and upload the results here.
There is an example include for an AI which just randomly moves.
Just copy it, change the name and include it to the main file.
Links Have Fun!
Last edited by Dadido3 on Sat Jul 02, 2016 1:54 pm, edited 1 time in total.
Re: 2048
Nice job. A suggestion: Sends a message when the game is blocked. Thank you Dadido3
➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti
Sorry for my bad english and the Dunning–Kruger effect.
Re: 2048
Good
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: 2048
Two hours of "Works" and only 3168 points with 256 max
Decidedly ...kcc is also strong in game than in programming
Again thanks for this code
Decidedly ...kcc is also strong in game than in programming
Again thanks for this code
The happiness is a road...
Not a destination
Not a destination
Re: 2048
Just tried:
- with a few modifications, it works on OSx
- Did you change something to the random placement for the new tile? It felt much easier than the web version
- There is no message when you create the first 2048 tiles!
- Colors are different, and I felt lost...
- with a few modifications, it works on OSx
- Did you change something to the random placement for the new tile? It felt much easier than the web version
- There is no message when you create the first 2048 tiles!
- Colors are different, and I felt lost...
Re: 2048
Thanks for the feedback.Poshu wrote:Just tried:
- with a few modifications, it works on OSx
- Did you change something to the random placement for the new tile? It felt much easier than the web version
- There is no message when you create the first 2048 tiles!
- Colors are different, and I felt lost...
Could you give me the changes you made to make it work on OS X?
And do you also store the settings somewhere?
Or did you just commented out all the setting stuff?
Because of the random tile generation: I updated the game yesterday.
Now there is a 10% chance that a 4 will appear, and a 90% chance that a 2 will appear, the same behaviour as in the original version.
Before the update it was 50/50.
Regarding the message: If you want the message add it
I see no real benefit in it, it's more annoying than helpful in my opinion.
Summary of the update:
- The "Simple" Ai works now much better, it gets mostly to the 2048 tile and sometimes 4096
- As mentioned above: A 2 will now spawn with a probability of 90%
- Added a "Game Over" message
- Added a highscore (only local)
Re: 2048
here it is (it's a lazy fix, because I just wanted it to work :p) :
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Procedure.s SHGetFolderPath(CSIDL)
Protected *String = AllocateMemory(#MAX_PATH+1)
SHGetFolderPath_(0, CSIDL, #Null, 0, *String)
Protected String.s = PeekS(*String)
FreeMemory(*String)
ProcedureReturn String
EndProcedure
CompilerElseIf #PB_Compiler_OS = #PB_OS_MacOS
#CSIDL_APPDATA = 0
Procedure.s SHGetFolderPath(CSIDL)
ProcedureReturn GetHomeDirectory() + "Library/Application Support/"
EndProcedure
CompilerEndIf