make a pac-man game tutorial

Learn how to make certain types of games and use gameEditor.

make a pac-man game tutorial

Postby krenisis » Sun Nov 29, 2009 12:22 am

I know every one remembers wasting coins on pac-man so now i will take you through making a simple version. This should help newbies be able to make a complete simple game.Here some art to get started. Use the graphics i supplied on these pages.
Attachments
pac down.png
pac down.png (1010 Bytes) Viewed 47682 times
pac up.png
pac up.png (1013 Bytes) Viewed 47682 times
pac forword.png
pac forword.png (905 Bytes) Viewed 47682 times
pac left.png
pac left.png (922 Bytes) Viewed 47682 times
pac dot.png
pac dot.png (277 Bytes) Viewed 47682 times
Last edited by krenisis on Wed Jun 23, 2010 5:30 pm, edited 1 time in total.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Sun Nov 29, 2009 12:47 am

ok if you want save the art that i supply here as photos to your computer you can use them or make your own art.Lets start programming.
1) go to new game
2)now add actor pac-man
3)add all 4 animations to pac-man
4)now we are going to make pac-man move ...go to events ...click on key down....press the key you want to use to move pac-man..now go down to add action ..select script editor..do this as you input each of pac-mans movements..
MAKE PACMAN MOVE LEFT x=x-8;ChangeAnimation("Event Actor", "pac left", FORWARD);

MAKE PACMAN MOVE RIGHT x=x-8;ChangeAnimation("Event Actor" , "pac right",FORWARD);
MAKE PACMAN MOVE UP y=y-8;ChangeAnimation("Event Actor", "pac up", FORWARD);
MAKE PACMAN MOVE DOWN y=y+8;ChangeAnimation("Event Actor", "pac down", FORWARD);
Attachments
blue wall long.png
blue wall long.png (567 Bytes) Viewed 47680 times
blue wall sidesways.png
blue wall sidesways.png (516 Bytes) Viewed 47680 times
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Sun Nov 29, 2009 1:31 am

ok now add actor walls and add animations sideways and up and down

now we going to make sure pac-man doesnt go through the walls.
1)click on pac-man ...click on events... click on collision .....on any side of actor walls ..click yes on repeat on collision...go to add action....
go to physical response
1
1
0
1
click on immediate action
ok now we half way done
Attachments
mean yellow.png
mean yellow.png (539 Bytes) Viewed 47675 times
mean red.png
mean red.png (457 Bytes) Viewed 47675 times
mean green.png
mean green.png (529 Bytes) Viewed 47675 times
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Sun Nov 29, 2009 1:44 am

Ok now add 3 ghost actors i supplied some here or you could add your own.On each ghost actor you do this
1)ok click on ghost actor ....click on events ....click on draw actor ....click on add action ....click on script editor..
2)ok on the script editor go to bottom of screen click on variables/functions go to 2nd column click on..
move to
relative to pac-man actor
avoid wall actor
click on immedate response.

OK now add to actors
1)add dots actor use small yellow dot
2)add score actor now
ok relax this is almost over
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Sun Nov 29, 2009 2:11 am

Ok click on pac-man actor go to clone now go to array click as many as u need.
1)now click on score actor go to text
2)now input 0000 as score
3)click on pac-man ...click on events..click on collision...on any side of dots...click on action...go to script editor...and type this..

score.textNumber=score.textNumber+10;

4)now go back to collision ...on any side of dots....click on action....click on destroy actor...in the actor box choose collide actor ..click immediate response..

OK thier you go a pac-man game , for more features like power pellets and eating ghost learn some more coding and you will have it.Any question pm me or any of our fine staff.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby MrJolteon » Sun Nov 29, 2009 11:12 am

I made a pacman game once.
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: make a pac-man game tutorial

Postby DST » Mon Nov 30, 2009 8:46 am

try this:
when adding the animations, give them single int names. pac right=0; pac up =1; pac left=2; pac down=3;
then add a global variable called dir;

Then on keydowns, add them like this:
key right
dir=0;

key up
dir=1;

key left
dir=2;

key down
dir=3;

Then in pacman>draw actor:
Code: Select all
char anim[2]="";
sprintf(anim, "%i", dir);
ChangeAnimation("Event Actor", anim, NO_CHANGE);
angle=(dir*90);
directional_velocity=8;
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Thu Dec 10, 2009 3:32 am

Thank you DST can any experianced programmer make the power pellets part , because i dont know how to do it without using alot of code. I want to most effient way possible.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby Scorpion50o1 » Tue Dec 29, 2009 6:54 am

could you make a collision event on the power pellet that when u collide with it u destroy the event of pac-man dying form collision on ghost and add collision with ghost destroy ghost. Also collision with it change animation of ghost to blue. and collision with it create timer (i dont know 2500 miliseconds) and after the timer create the event collision on pac-man by ghost destroy pac-man and change animation of ghost back to its color. :mrgreen:
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: make a pac-man game tutorial

Postby Bee-Ant » Tue Dec 29, 2009 7:16 am

Dont understand what you mean...its confusing
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: make a pac-man game tutorial

Postby Scorpion50o1 » Thu Dec 31, 2009 3:12 am

* power pellet > collision on any side of power pellet > disable event - pac-man dies from collision on ghost.
* ghost > collsion on power pellet change animation to blue ghost > create timer [power pellet off] > collsion on ghost by pac-man move ghost to box.
* timer up > enable event of collsion on pac-mon destroy pac-man > change animations of ghost to normal.
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: make a pac-man game tutorial

Postby krenisis » Fri Jan 01, 2010 6:48 am

can you make a ged. of that s-5001 ... that will be awesome
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: make a pac-man game tutorial

Postby Scorpion50o1 » Fri Jan 08, 2010 3:48 am

Guess i could just been busy with school. :O
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: make a pac-man game tutorial

Postby savvy » Tue Jul 13, 2010 12:10 pm

One thing to add to this is..DONT over complicate things, get your code and sprites sorted out 1st, do it in a planned out way so that u dont miss important bits out.
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: make a pac-man game tutorial

Postby happycrab » Fri Oct 15, 2010 7:31 am

i think i figured out how to make pacman die when he hits a ghost. can anyone tell me how to make the screen follow pacman? I made the maze bigger than the white square... and how can i make the score stay in a fixed location after i make the screen stay centered around pacman? also, how do i make the ghosts move faster?
~Meow~
User avatar
happycrab
 
Posts: 16
Joined: Fri Oct 15, 2010 3:48 am
Location: USA
Score: 0 Give a positive score

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests