I have a question. PLEASE HELP!!!

hi as you know i am a highschool programming student, so i don't have alot of experience and because of the fact that i am a senior i will not be going onto programming course II. Now this is not a school project but i would like to make an independent program (having nothing to do with school) i was thinking of making a working pac-man game. first i was wondering if this was possible to make a pac-man game. second i was wondering if i could make ghosts and have them follow a predetermined path. third i was wondering if i am going to have to plot all the points or can i just import an image.

Please get back to me

Comments

DEAR BIG JOHN

YOU HAD MENTIONED RESEARCHING NESTED LOOPS I FOUND SIX PAGES IN THE SECOND EDITHION PROGRAMMING IN TRUE BASIC PROBLEM SOLVING WITH STRUCTURE AND STYLE BY STEWART VENIT AND SANDRA SCHLEIFERS.
IT'S ON PAGES 190-196

Hi, The answer to your

Hi,

The answer to your question is yes, it certainly is possible to write a PACMAN type game.

I would recommend that you use very small image files that you can create with MS PAINT or a similar utility.
You need to create 4 sets of images - one for each direction of travel. If you intend for PACMAN to be animated i.e. a munching action then each set will require 4 to 5 sub images to animate the munching action. It might sound a lot but really you only need one set to start with then use ROTATE in PAINT to generate all the other images.

The ghosts only need one image.

I would also recommend that you write a very small routine that moves PACMAN from one square on the grid to another. Virtually duplicate this routine for the other directions.

I would arrange your program outline as follows:
REM: set up screen dimensions
CALL explain_rules
CALL draw_grid
RANDOMIZE
CALL draw_random_walls
CALL start_PACMANposition ! random initial position

DO

get key keynum

SELECT CASE keynum
CASE 27 ! ESC so abort program
EXIT DO
CASE 301 ! up arrow
CALL move_PACMANup
CASE 302 ! down arrow
CALL move_PACMANdown
CASE 303 ! right arrow
CALL move_PACMANright
CASE 304 ! left arrow
CALL move_PACMANleft
CASE ELSE
! do nothing
END SELECT

CALL release_ghost(count)
FOR n=1 to count
CALL move_ghost(count)
NEXT n

CALL Check_positions(caught,out)! checks collisions and whether PACMAN has got out successfully

IF caught=1 then
CALL announce_game_lost
EXIT DO
ELSEIF out=1 then
CALL announce_game_won
EXIT DO
END IF

LOOP

END

The sub-routines, move_PACMAN, must first check if it is possible to move - are there any walls in the way?

The animated motion is produced by BOX SHOWing the background image at the old location (to rub out the current image), then BOX KEEP the background of the new location, and finally showing the image in its new location.

Each time you randomly release a ghost you must increase the counter by 1. The FOR....NEXT loop lets you randomly move each ghost. The number of ghosts and the way they move will be different for each game you play. Instead of random movement you could target PACMAN as their direction.

That should be enough to start you off.

Regards

Big John

first off

Thank you BIG JOHN for helping me, but I am lost. I'm new to programming and I am not familiar with most of these statements. for example case, call, well the only ones i know are the loops, end, and randomize. could you give me an example of what each one does. also i saw
CALL draw_random_walls, would it be possible to actually use the image for the real pacman level maps. also would it be possible to go off of a life and point system like the real pac-man. for example it keeps points if i get i believe its 250,000 points the i gain a life and if i get eaten by a ghost i lose a life, instead of if i get eaten i'm done for good. Thank you for helping me.

sub routines and call statements

I HAVE JUST READ YOUR SUBROUTINES POST FOR DARENHISS PROGRAM LISTING AND I FAIRLY UNDERSTAND SUBROUTINES AND CALL BUT I STILL DON'T KNOW WHAT ELSE IF, CASE OR THOSE OTHERS MEAN.
THANK YOU

Statements and functions

Click on the HELP menu in TBbronze and select HELP. You will find notes there that explain everything you need to know. Better still, if you have a manual or guide book, then read that for more info.

Big John