Page 5 of 8

Re: All of my Basic games in one zip

Posted: Mon Nov 17, 2014 4:19 pm
by sorchard
Another observation on 2048:

The '2' and '4' tiles appear to have the same probability of appearing but I believe the original game produces '2' tiles 90% of the time.

Re: All of my Basic games in one zip

Posted: Mon Nov 17, 2014 10:05 pm
by sorchard
Not my most productive evening :-)
2048.jpg
2048.jpg (42.8 KiB) Viewed 25284 times

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 12:38 am
by jgerrie
Thanks Sixxie and Stew for the comments about possible quirks in my rendition of the puzzle. It's what you get from simply trying to re engineer a game from watching YouTube vids and pestering your 16 year old son...

Thanks Stew for playing to the brutal end...

Updates shortly...

Ciad Míle Fáilte

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 4:51 am
by jgerrie
Okay. I've changed GAME2048.BAS to only add new squares when the existing squares move during a turn. And I've changed the occurrence of a 4 to a 10% chance, with a 90% chance for new 2 per turn. I've also done a few optimizations to speed things up just a wee bit more and added a high score routine. If anyone is willing to test out the new version, please let me know if you find any other bugs. Thanks again for the helpful and encouraging comments. Enjoy.

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 1:04 pm
by sixxie
Excellent stuff, seems to play just right now. Bad luck nobbled me at 1024 in a test :)

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 9:11 pm
by jgerrie
Thanks for letting me know. I'm always worried that I will introduce some new ill. Sorry to read you got so close. Still, my sense is that game play is easier with the 90% 10% split on new 2s and 4s. Was it more of a struggle to finish the prior non-standard version? If so, thanks for the persistence.

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 9:13 pm
by sixxie
I got to 2048 today with no problems - not sure about easier or harder, I got sidetracked by the online version before.

Re: All of my Basic games in one zip

Posted: Tue Nov 18, 2014 11:31 pm
by Alastair
jgerrie wrote:It's what you get from simply trying to re engineer a game from watching YouTube vids and pestering your 16 year old son...
If you want to look through the original HTML, CSS, and JavaScript you will find them all on GitHub.

Re: All of my Basic games in one zip

Posted: Wed Nov 19, 2014 3:17 am
by jgerrie
Thanks for the link Alastair. I actually did take a peak at the source after Stew's post. Found this

GameManager.prototype.addRandomTile = function () {
if (this.grid.cellsAvailable()) {
var value = Math.random() < 0.9 ? 2 : 4;
var tile = new Tile(this.grid.randomAvailableCell(), value);

this.grid.insertTile(tile);
}
};

which I implemented as

1 G(X,Y)=2:RETURN
2 X=RND(4):Y=RND(4):IFG(X,Y)=0THENON-(RND(0)<.9)GOTO1:G(X,Y)=4:RETURN
3 GOTO2

The JAVAScript is certainly more structured and coherent...

Re: All of my Basic games in one zip

Posted: Wed Dec 17, 2014 5:23 am
by jgerrie
I have ported Will Crowther's original Colossal Cave "Adventure" (the program that got the whole genre of text adventuring going) to Microsoft Basic for the Dragon and Coco. I have fixed and finished uncompleted elements and changed some things to create some new challenges for old players. The file is called COLOSSAL.CAS

I have also added some new commands. The SCORE command will tell you how you're doing. The HELP command will provide some rudimentary aid. The UNLOAD command will perform the same function as the more standard "drop all" command of other adventures. The QUIT command not only quits but prompts whether you would like to save the progress you have made so far before exiting the game. You are also prompted each time the program is run if you wish to load a previous game. The same file name "COLOSDAT" is used for each save, but in the XROAR you can save the resulting virtual cassette file to any file name you like in order to differentiate between different saves. Just remember that when loading and prompted to "Ready tape and hit enter" you must select the file name containing the desired virtual "COLOSDAT" cassette file.

Any feedback is very welcome.