It is currently Wed Aug 12, 2020 4:16 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: 2048
PostPosted: Mon Jun 02, 2014 5:27 pm 
Offline
User
User
User avatar

Joined: Sat Jan 12, 2008 11:50 pm
Posts: 44
Location: Hessen, Germany
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.

Image

Links
Have Fun!

_________________
Website


Last edited by Dadido3 on Sat Jul 02, 2016 1:54 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 02, 2014 9:51 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 618
Location: France
Nice job. A suggestion: Sends a message when the game is blocked. Thank you Dadido3 :)

_________________

➽ Windows 10 - PB 5.72(x64)

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 02, 2014 10:22 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14065
Location: France
Good :)


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Tue Jun 03, 2014 7:40 am 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1774
Location: Uttoxeter, UK
Nice.
Thank you for sharing. :D

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Wed Jun 04, 2014 9:10 am 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4699
Location: Lyon - France
Great !!!
Thanks for sharing 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Wed Jun 04, 2014 12:09 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4699
Location: Lyon - France
Two hours of "Works" and only 3168 points with 256 max :oops:
Decidedly ...kcc is also strong in game than in programming :|
Again thanks for this code 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 09, 2014 10:27 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jan 25, 2005 7:01 pm
Posts: 460
Location: Canada
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...


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 09, 2014 3:40 pm 
Offline
User
User
User avatar

Joined: Sat Jan 12, 2008 11:50 pm
Posts: 44
Location: Hessen, Germany
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...


Thanks for the feedback.

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)

_________________
Website


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 09, 2014 4:24 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1774
Location: Uttoxeter, UK
Even better.
Thank you. :D

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: 2048
PostPosted: Mon Jun 09, 2014 9:19 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Jan 25, 2005 7:01 pm
Posts: 460
Location: Canada
here it is (it's a lazy fix, because I just wanted it to work :p) :
Code:
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye