Tutorials on more advanced programming and games

Understanding the language, error messages, etc.

Tutorials on more advanced programming and games

Postby noah » Sun Aug 07, 2016 8:12 am

Hi,
I finally got my Gamebuino :D and I have been through the tutorial sketches and built pong etc. The problem is, what now? I have lots of ideas, but I don't know how I could implement them. Are any of the released games documented well? Or are there any good tutorials available for more advanced games?

I'd like to learn about tilemaps, how should I go about that?

Thanks in advance, noah
User avatar
noah
 
Posts: 25
Joined: Mon Jul 25, 2016 8:32 am
Location: Spiffin' Britain

Re: Tutorials on more advanced programming and games

Postby Sorunome » Sun Aug 07, 2016 9:51 am

The basic idea is to iterate over rows and columns and then draw each tile according to the row/coloumn you are at currently. You can see an example for that here, however that uses one byte for two tiles, thus only allowing 16 different tiles. If you want to have it so that each byte is a tile of its own, you just have to change the getTile function to return pgm_read_byte(world + y*WORLD_W + x);
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Tutorials on more advanced programming and games

Postby noah » Tue Aug 09, 2016 11:04 am

Thanks, I've been looking through the source...
Is there any way I could find that code with the written explanations found in the sample scripts? It's just I don't understand all the reasoning behind all the things that happen.

Thanks again, noah
User avatar
noah
 
Posts: 25
Joined: Mon Jul 25, 2016 8:32 am
Location: Spiffin' Britain

Re: Tutorials on more advanced programming and games

Postby Sorunome » Tue Aug 09, 2016 1:00 pm

I wrote something up over here, maybe that helps?
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Tutorials on more advanced programming and games

Postby naed » Tue Aug 09, 2016 3:48 pm

Yeah take a look at the post Sorunome linked to, he gave Duhjoker lots of advice on tilemaps and how to implement them
User avatar
naed
 
Posts: 140
Joined: Tue May 31, 2016 3:18 pm

Re: Tutorials on more advanced programming and games

Postby noah » Wed Aug 10, 2016 7:44 pm

Right so I got the tilemap array working but I don't understand how collision detection works. How would I use gb.collideBitmapBitmap, does that work with tilemap arrays? If I had something like gb.collideBitmapBitmap(playerX, playerY, player, xOfWall, yOfWall, wallBitmap); what would I put for the wall for it to cover all the wall tiles, and wall coordinates?

thanks, noah
User avatar
noah
 
Posts: 25
Joined: Mon Jul 25, 2016 8:32 am
Location: Spiffin' Britain

Re: Tutorials on more advanced programming and games

Postby Duhjoker » Thu Aug 11, 2016 2:49 am

With tilemaps you will need to use gb.collide.rectrect you can find plenty of help and examples here......

viewtopic.php?f=8&t=3453
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow


Return to Programming Questions

Who is online

Users browsing this forum: No registered users and 13 guests