2048 for GameBuino

Advice on general approaches or feasibility and discussions about game design

Re: 2048 for GameBuino

Postby JWinslow23 » Sat Mar 14, 2015 6:40 pm

Update!

* Added way to win
* Added way to lose
* This is pretty much a finished game right now.

Todo:

* What else do you think I should do, guys?
* Wonder what my next project will be...
* ...will do serious game making work when I get the thing by the end of the month.

Screenshot:
Image

.zip attached. Tell me what you think!
Attachments
Gamebuino2048v4.zip
(116.85 KiB) Downloaded 402 times
User avatar
JWinslow23
 
Posts: 36
Joined: Sun Feb 22, 2015 8:16 pm

Re: 2048 for GameBuino

Postby erico » Sat Mar 14, 2015 7:04 pm

Looks very polished by those menu/piece animations!
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: 2048 for GameBuino

Postby JWinslow23 » Sat Mar 14, 2015 10:22 pm

erico wrote:Looks very polished by those menu/piece animations!


Thanks!

Heheh, it'd be nice if it were simpler to make those boxes....
User avatar
JWinslow23
 
Posts: 36
Joined: Sun Feb 22, 2015 8:16 pm

Re: 2048 for GameBuino

Postby Sorunome » Thu Mar 19, 2015 6:37 pm

Just tried it out on real hardware and it works well :D

Except when you flash back the sd card loader and re-flash the 2048 image the eeprom isn't saved :/ (i was at 1024 :P)

EDIT: apparently the save also gets lost if you simply turn off and back on
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: 2048 for GameBuino

Postby JWinslow23 » Sat Mar 21, 2015 1:19 am

Sorunome wrote:Just tried it out on real hardware and it works well :D

Except when you flash back the sd card loader and re-flash the 2048 image the eeprom isn't saved :/ (i was at 1024 :P)

EDIT: apparently the save also gets lost if you simply turn off and back on


Hrm, so saving isn't working? :\

Can I get some help on that, someone?
User avatar
JWinslow23
 
Posts: 36
Joined: Sun Feb 22, 2015 8:16 pm

Re: 2048 for GameBuino

Postby milk » Tue Mar 24, 2015 8:30 pm

In your setup() function, you call the function "isValidGame()" where the gameState structure is used while it was not initialised yet. You need to read the EEPROM before testing any gameState value, or test the value directly in the EEPROM.

Code: Select all
boolean isValidGame() {
  char id[sizeof(GAME_ID)];
  for (int x = 0; x < sizeof(id); x++)
    ((uint8_t*)&id)[x] = EEPROM.read(x);
  return strcmp_P(id, GAME_ID) == 0;
}
User avatar
milk
 
Posts: 11
Joined: Tue Mar 10, 2015 2:16 pm

Re: 2048 for GameBuino

Postby JWinslow23 » Tue Mar 24, 2015 9:58 pm

Thank you.

Update.

THIS is the final version. Probably will never continue this, unless people want more stuff or something :|

Screenie irrelevant, literally all I changed was the save-checking subroutine.

Download attached. Give me some feedback! I should get a real Gamebuino by the end of the month!
Attachments
Gamebuino2048v5.zip
(22.91 KiB) Downloaded 329 times
User avatar
JWinslow23
 
Posts: 36
Joined: Sun Feb 22, 2015 8:16 pm

Re: 2048 for GameBuino

Postby Sorunome » Tue Mar 24, 2015 10:29 pm

I can confirm that saving is working now! Yay!
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: 2048 for GameBuino

Postby JWinslow23 » Wed Mar 25, 2015 2:19 am

:)

Maybe a Tetris clone next...
User avatar
JWinslow23
 
Posts: 36
Joined: Sun Feb 22, 2015 8:16 pm

Re: 2048 for GameBuino

Postby Sorunome » Wed Mar 25, 2015 7:46 pm

Suggestion: make it reset the save once you lose >:D
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

PreviousNext

Return to Project Guidance & Game development

Who is online

Users browsing this forum: No registered users and 16 guests

cron