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 Duhjoker » Wed Jul 06, 2016 3:02 am

Edited ::: no relevant information
Last edited by Duhjoker on Tue Aug 02, 2016 11:26 pm, edited 1 time in total.
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 Sorunome » Wed Jul 06, 2016 5:41 am

you don't convert your hex/ino into a png, you only encode your png with that converter to source code
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Wed Jul 06, 2016 6:04 am

Edited :: no relevant information
Last edited by Duhjoker on Tue Aug 02, 2016 11:27 pm, edited 1 time in total.
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 Sorunome » Wed Jul 06, 2016 7:22 am

Duhjoker wrote:Am I getting close?

how about you try out if you get your desired results? ;)
There are many different ways to create sprites and tilemaps ;)
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Wed Jul 06, 2016 8:51 am

Ok I think I might be starting to understand now. I put my sprites in a folder then use gb.display.drawBitmap to encode the sprites into the program's memory?


Do I also use that command to encode a tile map?


These are my LOZ port sprites. You can download and edit if desired here...........

https://www.dropbox.com/sh/e9pmdyc22np6 ... ivqIa?dl=0
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 » Wed Jul 06, 2016 10:33 am

I think you may be trying to run before you can walk with this, displaying sprites is one of the most simple programming tasks I have found on the gamebuino.

I know your plans are to try and make a Zelda port but you are a million miles away from this if your failing to grasp some of the basics.

I don't mean to sound disrespectful with this post but the first thing you should do as a new user/programmer is read posts on this forum, there is a plethora of information already here that will help you, the wiki has some guidelines and also there are other game examples that you could plaid into the compiler to see example code.

Although I would live to see you prove me wrong and then I'll get to pay an awesome zelda port

Keep asking questions, read lots and if you don't understand what people are replying to you ask them to clarify... I might be new here but I'm learning and I visit the boards daily do anything I can help with I will
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 » Wed Jul 06, 2016 8:36 pm

I've always been a hands on person. Thats how I've learned to make guitars and some other stuff. But I think I'm catching on. Gonna try to compile my tile map at some point today.

No disrespect taken. I've actually been going through threads and saving pages with relevant info.

LOZ and dragon warrior were my favorite two games growing up so I'm lil excited to start a Gamebuino port. Any body wanting to collaborate are free to do so.

Ok so I was playing around with the tile map editor last night aster making all those sprites and when I got done and was happy I hit the generate code button. What it printed out were a bunch integers separated by commas.

Code: Select all
Const byte tile map [] progmem ={ 16,11,

0,0,0,0,0,0,0,0,0,0
2,0,0,0,0,77,77,77, //small example of code generated from the tile map editor
77,2,0,0,0,0,0,0,0,



Now am I to assume that the code has given each Sprite an integer that it then uses to program where each Sprite should go?
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 Sorunome » Wed Jul 06, 2016 9:23 pm

Exactly, you will need to write your routine to display the tilemap, though, based off of that information. It looks to me as if the first two bytes are width and height.
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Newb at game making Sprite and game map developing

Postby Duhjoker » Wed Jul 06, 2016 10:13 pm

Awesome thank you!!!

Yep the tile map is 16 X 11
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 » Thu Jul 07, 2016 5:14 am

I used the tile map editor to make a "room", the starting area for the game, I tried to copy the code it generated and copied the out put and I wrote it into the template I made the other day and it looks like this....

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;

const byte tilemap[] PROGMEM={16,11

0,0,0,0,0,0,0,77,77,0,0,0,0,0,0,0,
0,0,0,0,6,0,5,77,77,0,0,0,0,0,0,0,
0,0,0,5,77,77,77,77,77,0,0,0,0,0,0,0,
0,0,5,77,77,77,77,77,77,0,0,0,0,0,0,0,
0,5,77,77,77,77,77,77,77,4,0,0,0,0,0,0,
77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,
77,77,77,77,77,77,77,77,77,77,77,77,77,77,1,1,
1,2,77,77,77,77,77,77,77,77,77,77,77,1,1,
0,0,77,77,77,77,77,77,77,77,77,77,77,77,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,};

                                     // the setup routine runs once when Gamebuino starts up
void setup(){
                                    // initialize the Gamebuino object
  gb.begin();
                                 
 
}

                                   // the loop routine runs over and over again forever
void loop(){
                                   //updates the gamebuino (the display, the sound, the auto backlight... everything)
                                   //returns true when it's time to render a new frame (20 times/second)
  if(gb.update()){
                                   
    gb.display.drawBitmap(10,10,terrain_rock_master);

                                 
  }
}


since im drawing a tile map do I use a different command than gb.display.drawBitmap? If not what do I use in the parameter brackets?


Also the editor put a byte sheet? This is the code it put out......

Code: Select all
const byte *spritesheet[]={

rock_terrain_master,rockterrain_mountaintop,rock_terrain_valley_SE,rock_terrain_valley_SW,rock_terrain_valley_NE,rock_terrain_valley_NW,port_master,turtle_rock,bush};



Do I add this to the first code block above or do I use this for making another file?
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 16 guests