Battle for Zuthsrah


(Eli Jones) #1

Hello World!

I have a new and exciting game for you all to play, enjoy, and criticize. I bring you, The Battle for Zuthsrah!"

code for installation available at:
:arrow_right: https://github.com/Mre64/BattleForZuthsrah

ENJOY!

-Mre


"Semi-Official" Game List for the Arduboy
"Semi-Official" Game List for the Arduboy
(Ross) #2

Cool! I like your code for attack formations : )


(Josh Goebel) #3

Any images or video?


#4

yes please images and videos !!! :grinning:


(Brian) #5

Is it possible to make it start a new game using one of the buttons rather than having to power-cycle the Arduboy / unplug the USB cable?


(Ross) #6

Adding a game restart:

With your favorite editor, open Zuthsrah.ino. Below is a copy from Github.

After line 108, add a check for a button press and restore the “game start” condition. For example,

  ...
  display.display();
  // add the logic below to the 'Zuthsrah.ino' file
  if (display.pressed(A_BUTTON)) // if 'A' button is pressed,
    gamestate = 1; // then set game state to 1.
}

the function gameover() continues to get called in the loop() function, you just need a way to set the gamestate back to 1.

The code above will at least get you started, you may have to do some troubleshooting or reset some counters, which should be at the top of the .ino file, but I will leave that as an exercise for yourself :older_man:.

If you get it all working, and are happy with the solution, it never hurts to make a pull request to the author’s github : )


(Eli Jones) #7

Sure I can do that, i will implement this week!

-Mre


(Eli Jones) #8

okay! thanks for the heads up, when I get some time this week I will implement a restart function. thanks again ekem

-Mre


(Eli Jones) #9

you got it! Ill add some this week, thanks

-Mre


(Szmozsánszky István) #10

Nice one! There seems to be a music score in there, but it doesn’t seem to play on my device… (DevKit)


(Eli Jones) #11

Yea it’s commented out until I have the time to improve it, I’m about to be real busy with work…


(Kevin) #12

Can we get a screenshot up in here? @Mre64

:smiley:


(Eli Jones) #13

well I cant so no to you haha, here it is:


(curly) #14

a pause would be nice, also im shure there are other sweet spots but the bottom right hand corner is a safe zone, the enemies will never get you there

also for some reason the kill count resets to zero at around 225 (ish)

that being said great game kept me busy for a few hours last night


(Eli Jones) #15

Im so Glad you enjoyed the game! To be honest this version is far from complete, it was a weekend rush job. But i think I will probably go back and implement some much needed fixes, like a pause and a restart first off. Thank you so much for debugging this for me.

Ps the reason the score starts over at 255 is because I was using an uint8_t to fold the score which has a max value of 256 (0-255). I never would have thought that somebody would get that high of a score HAHA, but you are a true master of Zuthsrah! I will make sure to increase the limit as well.

do you think levels would make this better or just keep it a free for all?


(curly) #16

definitly levils also i made a small change i didnt think you would mind (it has some issues lol im new)

i added this

if (display.pressed(A_BUTTON)) // if 'A' button is pressed,
gameState = 1; // then set game state to 1.
belknar.killCount = 0;

to the end of “void gameOver”

basicly i dont want to wear out my power switch.

so when i die i press a and come back, 2 issues though but its good enough for me for now

1 . when you un die you come back exactly where and when you died,( though you can keep holding a and move you might just die a few times before your clear
2. before you press a on the game over page, the kill count says 0,

still small price to pay not to have to flip a switch twice, i didnt want to delve too deep in your code without your permission, but i do think this would be good code for me to play with and learn on (if you dont mind)

oh one more thing the kill count displays the big number (the number you get on the gasme over page, instead of the small number for some reason, but only after you have died and came back


(Eli Jones) #17

you have my permission to play around with this as much as you wish! I believe that is the spirit of this entire device, it would be a shame to not learn.