Share your games and programs with the community.
Post a reply

Re: My WIP snake game

Sun Apr 26, 2015 4:34 pm

Thats great :D ! Just that you misspelled classic in some of the fonts. Could you send me zip with the assests then? I'll start making the menu tomorrow then.

Re: My WIP snake game

Sun Apr 26, 2015 4:54 pm

Yes, I whipped it together a bit quickly :-)

Which should I send you? As a sprite sheet or single files? Or binary array? Though I supose the latter depends on how you want to implement it, so I better leave that to you.

Re: My WIP snake game

Sun Apr 26, 2015 5:13 pm

Hey, if it helps you can take a look at my Title Screen Code, near the bottom of the sketch.
This allows to show a logo, which can be 84*48 pixels big.
Might not be much, but it would certainly allow anyone making a logo to have a bit more room.
Also, it has some controls built-in.

Re: My WIP snake game

Sun Apr 26, 2015 6:13 pm

Marcus wrote:Which should I send you? As a sprite sheet or single files? Or binary array?

I'm thinking single files, I hope all of this content fits in the flash memory or that my code dosen't slow down when I'm using sprites. If it does tough I'll just rewrite it. I'm gonna need to do it anyway because I'll need OOP for two players.

Re: My WIP snake game

Sun Apr 26, 2015 6:24 pm

Skyrunner65 wrote:Hey, if it helps you can take a look at my Title Screen Code, near the bottom of the sketch.
This allows to show a logo, which can be 84*48 pixels big.
Might not be much, but it would certainly allow anyone making a logo to have a bit more room.
Also, it has some controls built-in.


Love how your code is organised :) . I don't think thats the way I'm going to do it but thanks. I don't know anything about 'pointers' or the 'extern' stuff you use there tough. But I've done fine without them t'ill now. I should really start reading my C programming book I bought tough...

Re: My WIP snake game

Sun Apr 26, 2015 7:21 pm

Alright, but which of the fonts? :-)

Simple black-and-white images or do you use a palette with transparency? Do you utilize gray-scale?

Re: My WIP snake game

Sun Apr 26, 2015 8:13 pm

I'm pretty new to this so I'll take simple black and white's :lol:

Re: My WIP snake game

Sun Apr 26, 2015 8:59 pm

You still did not mention what font :-) I just picked two;


I used a batch-conversion tool to make PNG and monochrome versions, if something does not look right, let me know.
Attachments
ORM-sprites.zip
(204.99 KiB) Downloaded 333 times

Re: My WIP snake game

Mon Apr 27, 2015 11:48 am

Here, I'll show you everything for the Title Screen. (It's Pretty Simple)
Code:
void titlescreen(){  //This is a separate function, like loop() or setup()
  while(1){
    if (gb.update()){
      gb.display.drawBitmap(0, 0, logo);
      if (gb.buttons.pressed(BTN_A)) { //plays a noise and breaks out of the title screen when A is pressed
        gb.sound.playOK();
        gb.battery.show = false;
        break;
        break;
      }
      if (gb.buttons.pressed(BTN_C)) {
        gb.changeGame(); //change game when C is pressed
      }
    }
  }
}


//example:
void setup(){
//A bunch of other stuff...
  titlescreen(); //calls on the title screen code
}

Does that explain it to you?

Re: My WIP snake game

Mon Apr 27, 2015 5:22 pm

Just to be sure you didn't missed it, there is a defaut titleScreen() function in the core Gamebuino Library, along with examples to explain how it works.
Post a reply