Newb at game making Sprite and game map developing

Understanding the language, error messages, etc.

Re: Newb at game making Sprite and game map developing

Postby Sorunome » Fri Jul 29, 2016 12:58 pm

I'm sorry, I'm not more helping you with these questions. They all have well-documented answers and multiple examples to them. You also still have very basic issues with C++ as in not knowing where to put code.
Please take a look at tutorials, there are specific gamebuino-ones in the wiki and you could also use just about any arduino tutorial to help you with those first few steps, but I do not support trying to make something quite complex if the simple concepts of functions and variable scopes and thelike aren't understood yet.

However, when you gained some more experience, feel free to ask any more questions ^.^
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Newb at game making Sprite and game map developing

Postby naed » Fri Jul 29, 2016 6:40 pm

I'm still learning but will load up your code and see what it looks like for me

Just give me a few hours so I can get to a computer ;)

EDIT:

Wow your code is messed up, no wonder your getting lots of errors - and its simple things too that your missing (and like i said i'm a Noob when it comes to this but even i can see these errors)

firstly your gb error - you must ALWAYS have this at the start of your code
Code: Select all
//creates a Gamebuino object named gb
Gamebuino gb;


secondly you don't have enough "}" tokens to close your code

thirdly you do not declare anything at all for this bit of code
Code: Select all
if(gb.buttons.repeat(BTN_A,1)){
        if(shootdelay<=0){
            shootdelay=15-(player.rate*10/50);
            initShoot();
          }


after trying my hardest to work out what you were trying to code and correcting what i could (I commented out the shoot part above) i got this to compile and display
Code: Select all
//imports the SPI library (needed to communicate with Gamebuino's screen)
#include <SPI.h>
//imports the Gamebuino library
#include <Gamebuino.h>
//creates a Gamebuino object named gb
Gamebuino gb;

                                                       /// room 1 in hexadecimal
const byte room_1[] = {88,48,
0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x6f,0xff,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xaf,0xff,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x7f,0xff,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xef,0xff,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x65,0xbf,0x5b,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xae,0xbf,0xeb,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x75,0xff,0x5f,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xe7,0xbf,0x7b,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x5b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90,};



//sever sprites

const byte sever_rear[] PROGMEM = {6,6,1,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,};
const byte sever_right[] PROGMEM = {6,6,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1,0,1,0,1,1,0,1,0,1,1,1,1,1,1,1,0,0,1,1,};
const byte sever_front[] PROGMEM = {6,6,1,1,1,1,1,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,};
const byte sever_left[] PROGMEM = {6,6,0,1,1,1,1,1,1,0,1,1,1,0,1,1,0,0,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,};

#define NUM_SPRITES 4
const byte* Sprites_player[NUM_SPRITES] = {sever_rear, sever_right, sever_front, sever_left,};

///////player variables

typedef struct {
  int x;
  int y;
  int vx;
  int vy;
  int orientation;
}Config;
Config player;

const byte bullet[] PROGMEM = {2,2,1,1,1,1,};

float shootdelay;

typedef struct{
  boolean on;
  int x;
  int y;
  int vx;
  int vy;
  int orientation;
}
confshoot;



/////////GAME

void setup() {
  // put your setup code here, to run once:
  gb.begin();
  gb.titleScreen(F("Myth of Esmerelda"));
};

void initPlayer(){
  player.x=0;
  player.y=0;
  player.vx=0;
  player.vy=0;
  player.orientation=3;
};



void loop(){
  // put your main code here, to run repeatedly:
  if(gb.update()){
    gb.display.setColor(BLACK);
    gb.display.drawBitmap(0,0,room_1);
   

   
      if(gb.buttons.repeat(BTN_RIGHT,1)){
        player.x = player.x + player.vx;
        if(gb.buttons.repeat(BTN_A,1)){
        }else{
          player.orientation=1;
        }
      }
     
      if(gb.buttons.repeat(BTN_LEFT,1)){
        player.x = player.x - player.vx;
        if(gb.buttons.repeat(BTN_A,1)){
        }else{
          player.orientation=3;
        }
      }
     
      if(gb.buttons.repeat(BTN_DOWN,1)){
        player.y = player.y + player.vy;
        if(gb.buttons.repeat(BTN_A,1)){
        }else{
          player.orientation=2;
        }
      }
     
      if(gb.buttons.repeat(BTN_UP,1)){
        player.y = player.y - player.vy;
        if(gb.buttons.repeat(BTN_A,1)){
        }else{
          player.orientation=0;
        }
      }
     
//      if(gb.buttons.repeat(BTN_A,1)){
//        if(shootdelay<=0){
//            shootdelay=15-(player.rate*10/50);
//            initShoot();
//          }
      }
  }


but it does nothing more than display random pixels on the screen



What you need to do is break this down into chunks, your first task should be getting your room to display correctly as i'm not even certain you have managed this yet - upload your room sprites if you want me to help you with this
User avatar
naed
 
Posts: 140
Joined: Tue May 31, 2016 3:18 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Fri Jul 29, 2016 9:21 pm

Sorunome please don't be offended and I'm not trying to be rude but what tutorials are you talking about exactly? There are 4 video tutorials that I can find 2 in English and two more I can't understand because they are in French. I've asked several times about examples in the arduino library or in other games but you keep telling me to look at tutorials. I don't know which "examples" to look at. The getting started guides do not help either.

Every thing I've tried but what you gave me I took from what I could understand out of what info I was given.

The brackets are something I'm still trying to learn. The placement confuses me about where and which ones to use at the beginning and end of the code blocks.

Naed ok thank you here's what I was trying to do. Could have swore I added the Gamebuino gb. Now I see I didn't.

The shoot key command was something I found thought I would try it since my link character will shoot projectiles when at full health.

I thought I had the drawBitMap command under control but let me try again to just display my room Sprite.

Thank you both for your help I'm trying to understand I really am.

also I took the player movement code from descent into heel a Gamebuino game with almost the same set up as the Zelda game but with random dungeon rooms and random monster encounters. It's the only example I can find that has what I'm trying to do. Please take a look at the source code as I think parts of it can be used in my game.

https://github.com/etienne72230/Descent ... toHell.ino
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Newb at game making Sprite and game map developing

Postby naed » Fri Jul 29, 2016 9:54 pm

haha! its ok we all have to start somewhere i guess... I struggled to start off with, there are very little gamebuino specific tutorials available, but by simply reading the forums you will find a wealth of information and also by looking at other peoples projects/game code you will grasp at least the basics rather quick, I only started coding about 2 months ago and my latest project i'm really proud of (see it here)

I find it easier to build my projects in parts, then put the parts together to get a full project

the main issue you have is your adding code that is irrelevant right now, adding movement code without even displaying a character sprite seems pretty pointless to me (because you can't even see if it is working), if i was creating a similar project to yours i'd break my workload down into several parts

1 - display room/map
2 - display character
3 - enable movement for character
4 - set character collision boundaries
5 - etc...
User avatar
naed
 
Posts: 140
Joined: Tue May 31, 2016 3:18 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Fri Jul 29, 2016 10:15 pm

Awesome we can do it that way.

Im really starting to get a lil confused and frustrated, I used this example I snatched from the first video tutorial.

Image

Hold on going to have to update
ok im back.

the only thing I changed was the sprite the name and the location but I get expected primary expression before ) token on the drawbitmap line.


I also took the same code and tried to verify that and same problem. I tried this exact example when I first started trying to learn and had no problem with it.

Code: Select all
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;


const byte PROGMEM room_1[] = {88,48,
0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x6f,0xff,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xaf,0xff,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x7f,0xff,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xef,0xff,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x65,0xbf,0x5b,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xae,0xbf,0xeb,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x75,0xff,0x5f,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xe7,0xbf,0x7b,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x5b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90,};




void setup() {
  // put your setup code here, to run once:
   gb.begin();
   gb.titleScreen(F("Myth of esmerelda"));
}

void loop() {
  // put your main code here, to run repeatedly:
   if(gb.update()){
    gb.display.drawBitmap(0,0,room_1,);
   }
}


Im unaware where to put the setcolor commands for the background and sprite. im sure theres a better way but the examples I have are for three colours, white grey and black.

Also confused about where exactly progmem should be placed, before or after ' sprite[]'
I don't expect or want any body to write or do the work for me all I ask is for corrections or suggestions for a better way to write it or correct it.

again thank you for helping me
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Newb at game making Sprite and game map developing

Postby naed » Fri Jul 29, 2016 10:41 pm

you have one too many commas in line 68 (it's expecting another variable and not finding it)

after removing i can load and see your map/room perfectly

EDIT

also I've always placed it after, but have tried both and it doesn't seem to matter too much

both

const byte sprite[] PROGMEM =

and

const byte PROGMEM sprite[] =

seem to work with no issues
User avatar
naed
 
Posts: 140
Joined: Tue May 31, 2016 3:18 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Fri Jul 29, 2016 11:34 pm

Awesome!!!!! Thank you. Thought it might be something rookie but I was going a lil mind blind if you get the sci-fi reference.

Ok so now that I can build a room let's try placing my sever player sprite in the room. Would you mind linking me to the right info please!!!

Has any one ever heard of played 3D Tetris? Instead of stacking the blocks vertically your looking into a square and you can rotate the pieces on the X the Y and the Z to fill the square and make lines disappear. It's kind of obscure I haven't been able to find to download but it would be an interesting game for the line up.
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Newb at game making Sprite and game map developing

Postby naed » Fri Jul 29, 2016 11:56 pm

I will presume you want your character sprite to be white (due to the black background)

to draw your Sever player sprite you do it exactly the same way you drew your background to screen, just change the x&y co-ords so he is in the center

to make him display as white add this
Code: Select all
gb.display.setColor(WHITE);
User avatar
naed
 
Posts: 140
Joined: Tue May 31, 2016 3:18 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Sat Jul 30, 2016 2:40 am

Ok I'm back had to do some yard work and dinner.

Actually I would like any drawn pixel to be black. So i think I need to set the background to white and the sprites to black.
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Sat Jul 30, 2016 4:24 am

Ok so I did what you said about adding the sever sprite but im having trouble getting the colors right for it too display both the sever sprite and the room sprite as black with a white background. I can get it all white or black and white with the room sprite pixels as white with a black background, but I cant the room sprite to be black pixels and a white background. So its not displaying the sever sprite which I placed at 1,1,.

Here is my code I know I have the colours mixed up in the gb.display.setColor() because I was playing with them. also think I might need to be schooled in what background foreground actually mean so maybe ill understand better.

Code: Select all
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;


const byte PROGMEM room_1[] = {88,48,
0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x6f,0xff,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xaf,0xff,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x7f,0xff,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xef,0xff,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9f,0xff,0xa6,0x9a,0x69,0xa6,0x90
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x65,0xbf,0x5b,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xae,0xbf,0xeb,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x75,0xff,0x5f,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xe7,0xbf,0x7b,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9a,0x7f,0xa7,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x5b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0x59,0x6f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x59,0x60
,0xeb,0xaf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xa0
,0x5d,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x70
,0x79,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xe0
,0xa6,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa6,0x90
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90
,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x65,0x96,0x59,0x60
,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xae,0xba,0xeb,0xa0
,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x75,0xd7,0x5d,0x70
,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe7,0x9e,0x79,0xe0
,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x9a,0x69,0xa6,0x90,};

const byte sever_front[] PROGMEM = {6,6,1,1,1,1,1,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,};



void setup() {
  // put your setup code here, to run once:
   gb.begin();
   gb.titleScreen(F("Myth of esmerelda"));
}

void loop() {
  // put your main code here, to run repeatedly:
   if(gb.update()){
    gb.display.setColor(BLACK);{
    gb.display.drawBitmap(0,0,room_1);
   }
   gb.display.setColor(WHITE);{
   gb.display.drawBitmap(1,1,sever_front);
   
   }
    gb.display.setColor(BLACK);
    }
}


Also don't know if the third gb.display.setColor() is needed.
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

PreviousNext

Return to Programming Questions

Who is online

Users browsing this forum: No registered users and 6 guests

cron