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 » Sat Jul 23, 2016 12:10 am

Ok do I put the ......

Code: Select all
void drawMap (){ stuff

}


Before both the void setup and the void loop? Or before both?

Also shouldn't I have gb.display before the drawMap(); command in the void loop?
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 23, 2016 4:23 am

Ok I've tried putting the void drawMap code before, between and above and I still get a

Code: Select all
Exit status 1
A function-definition is not allowed here before ' } ' token


At either the void setup line or the void loop line.
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 » Sat Jul 23, 2016 9:02 am

What's your code?

Also, this is pretty basic stuff, i'd recommend looking at a tutorial... There are a few linked here: http://gamebuino.com/wiki/index.php?title=Learning I don't know how good they are, though
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 » Sun Jul 24, 2016 8:17 am

Well I figured out the "{" I was having. I was missing this "}" before the void loop. Forgot it needed 3 for the end of the drawMap routine.

Ok so now it does compile but it prints this out......

Image

It's huge, and I think I have a wrong number or two in the drawWorld routine, you can see link in a rock_terrain Sprite.

So I need to shrink it to fit the screen. Can you link me to that please.

Also it looks like it's not using the grey scale. It's two tone black and white.
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 » Sun Jul 24, 2016 8:27 am

Well, 16x16 sprites are huge on such a big screen ;)

Also, for grayscale you have to draw two tilemaps on top of each other with different drawing color.
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 » Sun Jul 24, 2016 8:42 am

Ok so I need two layer sprites?

And there's no way to shrink that?
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 » Sun Jul 24, 2016 9:43 am

Even if my sprites were 8 X 8 the whole 16 x 11 map wouldnt fit.
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 » Sun Jul 24, 2016 9:57 pm

Ok well I've been looking and don't see any way I can fit my map to the the screen so that's a lil disappointing. Especially after making all the sprites.

I guess I need to think smaller. Maybe I could make a bunch of bit maps as my rooms instead of using a ton of sprites to make the room. Like descent into heel.

Ok so first question and prolly should have asked this a while back.....how many..pixel X pixel can I fit on to the screen with out having to scroll?

What would you reccomend on Sprite size to fit in these rooms. Not gonna get much detail out of 8 X 8 sprites.
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 » Sun Jul 24, 2016 10:22 pm

You can find the screen dimensions in the wiki ;)

or, well, on the front page
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 » Mon Jul 25, 2016 2:07 am

Oops!!!!! Ok I see now.

Ok I did some looking on 8 X 8 sprites and I think I can still make some nice looking sprites as long as I can get the grey scale working.

Ok so let me ask for a clarification. To get grey scale I need to make a Sprite with layers each layer containing one color. How many layers can be used. I would like to use clear (white), black and two different greys light and dark.

Update ok I did some looking and saw the grey scale render and its example. But it said gb.setcolor instead.

You said I need layers. So I need to make at least 3 different sprites per object (1. With white, one with , one with black) then I can set the color for each set of sprites then re-join using code to produce an image with grey?

What exactly is color "invert" ?
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 60 guests