Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post Posted: March 19th, 2017, 7:59 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3099
Location: Japan
Yea, in Snek I restrict the use of Location for positions on the game grid.

Later on in Memesweeper, I create a class Vei2 (2D integer vector type) and I use it for both position on screen and position on the game grid. When I do this, I try to make it clear in the variable name what the usage of the Vei2 is (screen or grid).

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: March 19th, 2017, 5:40 pm 
User avatar

Joined: September 17th, 2013, 5:55 am
Posts: 30
Location: USA
Can't wait to start studying this. One of my favorite games from many years ago when games were really simple. :D

I used to beat all my friends. ;) You could play two players against each other, each controlling a snake - 2 snakes on the screen, sitting side by side and using different keys on the same keyboard. You'd not only try to collect objects but also try to trap the other guy's snake to kill him. Lots of fun times. :lol:

If I'm remembering right, the one I used to play was developed with Qbasic and was coming as part of the MS-DOS package.


Top 
 Profile  
Reply with quote  
 Post Posted: March 19th, 2017, 11:04 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2320
Location: Oklahoma, United States
Multibyte wrote:
Can't wait to start studying this. One of my favorite games from many years ago when games were really simple. :D

I used to beat all my friends. ;) You could play two players against each other, each controlling a snake - 2 snakes on the screen, sitting side by side and using different keys on the same keyboard. You'd not only try to collect objects but also try to trap the other guy's snake to kill him. Lots of fun times. :lol:

If I'm remembering right, the one I used to play was developed with Qbasic and was coming as part of the MS-DOS package.



NIBBLES, that was my first programming experience. I did the same thing making it 3 player so my two bros could play along.

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
 Post Posted: March 20th, 2017, 2:16 am 
User avatar

Joined: September 17th, 2013, 5:55 am
Posts: 30
Location: USA
albinopapa wrote:
Multibyte wrote:
Can't wait to start studying this. One of my favorite games from many years ago when games were really simple. :D

I used to beat all my friends. ;) You could play two players against each other, each controlling a snake - 2 snakes on the screen, sitting side by side and using different keys on the same keyboard. You'd not only try to collect objects but also try to trap the other guy's snake to kill him. Lots of fun times. :lol:

If I'm remembering right, the one I used to play was developed with Qbasic and was coming as part of the MS-DOS package.



NIBBLES, that was my first programming experience. I did the same thing making it 3 player so my two bros could play along.


Yes, it was NIBBLES. I had forgotten the name. :)


Top 
 Profile  
Reply with quote  
 Post Posted: March 21st, 2017, 6:45 pm 
 

Joined: February 14th, 2017, 7:32 pm
Posts: 39
Just as a side note, why are we making a grid for the snake game? Why not finetune it?


Top 
 Profile  
Reply with quote  
 Post Posted: March 21st, 2017, 7:43 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2320
Location: Oklahoma, United States
Zedtho wrote:
Just as a side note, why are we making a grid for the snake game? Why not finetune it?



What do you mean fine tune it?

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
 Post Posted: March 22nd, 2017, 1:09 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3099
Location: Japan
I imagine he means, why not allow the position of the snake to be more fine-grained. The main reasons are: 1) the original snake game is done on a relatively coarse-grained grid and 2) I wanted to introduce the ideas of grid-based games because it's a pattern that appears extremely frequently in games.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: March 22nd, 2017, 6:03 am 
 

Joined: February 14th, 2017, 7:32 pm
Posts: 39
Thanks!
Yeah I couldn't find the right word to describe what I meant, sorry


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3, 4

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: