Page 1 of 1

FROGGER GAME (NEED HELP)

Posted: Sat Dec 06, 2014 12:00 pm
by VIPER604
So for my school project I have to create a video game. I chose the game frogger. So I have to use DATA arrays to make the images or sprites. I have the Image of Frogger, but I'm not sure how to get him to move in the directions needed. I can get him to move, but it keeps the image of the frog at his original position. So I basically get a bunch of copies of a frog all over my screen. I tried CLS, but i dont want to clear the rest of the stage. Any help would be appreciated. :)

Re: FROGGER GAME (NEED HELP)

Posted: Sat Dec 06, 2014 1:19 pm
by burger2227
Are you using a sprite from a BSAVE image? There are a few ways to set it with PUT, but you may need to GET the background area where the sprite WILL GO first.

1) GET a square as large as the sprite at the position of the background the sprite will go and it will be saved to an array.
2) PUT the sprite image in that location using the upper left corner position only.
3) When there is a change in position, PUT the background back then GET the next background position(1).

Odd shaped sprites will need a mask to use over colored backgrounds.

See my Q-basics tutorial below, Chapter 13.

Re: FROGGER GAME (NEED HELP)

Posted: Sat Dec 06, 2014 1:26 pm
by VIPER604
So what exactly do you mean by the upper left position only? I have it in an array using the get. And if it is an odd shaped sprite. Do you have a link to your tutorial?

Re: FROGGER GAME (NEED HELP)

Posted: Sat Dec 06, 2014 1:46 pm
by burger2227
GET needs box coordinates from both TLC and BRC. PUT only uses the TLC coordinates and array name with actions. Cannot be off screen!

PUT [STEP](column, row), Array([index]) [,{PSET|PRESET|AND|OR|XOR}]

The INTEGER array size would be the sprite box width * height for both arrays.

The Q-Basics link is in my signature below.