Author Topic: PacMan game v1.2 completed. More refined version of v1.1  (Read 14130 times)

0 Members and 1 Guest are viewing this topic.

RainCode v1.2

  • Guest
PacMan game v1.2 completed. More refined version of v1.1
« on: May 17, 2014, 07:37:42 AM »
Hi guys,

just finished the ver 1.2 Pacman game (see video link below but the video recording frame rate is low).
- Better control of game speed as now using timer control suggested by irneb.
- Better graphics as now using rendered background rather than Autocad entities.
- more gameplay : added memory tiles puzzle, somersault and hurling Pacman to a spot. Hurling is for the boss battle.
- it will play 16 levels out of 32 levels randomly.
- games are menu driven.

You need to set autocad path to the pacman folder. It s best it is in the root directory eg. C:\pacman or D:\pacman.

Download the lisp here in the swamp


Download the zip files contains images/data/sound in this youtube video links (dont know why video goes to this site instead of computers)
http://www.youtube.com/watch?v=Tp6ZPKZM66Y&feature=youtu.be
« Last Edit: May 17, 2014, 07:57:32 AM by RainCode v1.2 »

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #1 on: May 17, 2014, 08:36:01 AM »
Amazing!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #2 on: May 17, 2014, 09:16:16 AM »
Wow! That is cool.
TheSwamp.org  (serving the CAD community since 2003)

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #4 on: May 17, 2014, 03:25:42 PM »
I haven't tested the code, but I must say that the demo looks very impressive!

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #5 on: May 17, 2014, 07:51:12 PM »
I haven't tested the code, but I must say that the demo looks very impressive!
Same sentiment here!  WOW! 
 I am not going to even try it.  I will be suck into the game and not get any work done.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

pBe

  • Bull Frog
  • Posts: 402
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #6 on: May 17, 2014, 07:54:25 PM »
Nice of you to share, interesting to see how you restrict the pacmans' movement.

Thanks RainCode V1.2 <-- a more refined version of RainCode v1.1 ?  :)

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #7 on: May 18, 2014, 02:58:21 AM »

awesome, your lisp fu is good :)
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #8 on: May 18, 2014, 11:21:57 AM »
Glad to hear you guys like the game.

But I must say, I still have alot to learn about AutoLisp.

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #9 on: May 18, 2014, 11:32:08 AM »
it is a good feeling to me when I think of it, people enjoying the game in another part of this planet.

The time zone can be different, it may be when I am in the middle of my sleep and people at other side of this planet is enjoying something I created - that is a nice feeling
:)

liuhaixin88

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #10 on: May 18, 2014, 11:38:29 AM »
Very nice ! Thank you for sharing.

liuhaixin88

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #11 on: May 18, 2014, 10:25:47 PM »
error happened (when appload)
================================================================================
   PacMan [v1.2].LSP for AutoCAD v2002 loaded ...
                         Type Ppz to start game
================================================================================
   Create Custom level>> WS=define gameplay viewsize,
                         DP=draw pathline, DW=draw wall,
                         SD=draw smalldots, BD=entmod to big dot
                         MapGame=write game level to file
--------------------------------------------------------------------------------
   Misc. function     >> HL=toggle Highlight on/off,
                         EF=toggle image frame on/off
                         GM=toggle grid mode on/off
                         AN=create animation path (creating Logo animation etc)
--------------------------------------------------------------------------------
; error: bad argument type: stringp nil

Command:

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #12 on: May 19, 2014, 10:52:48 AM »
error happened (when appload)
================================================================================
   PacMan [v1.2].LSP for AutoCAD v2002 loaded ...
                         Type Ppz to start game
================================================================================
   Create Custom level>> WS=define gameplay viewsize,
                         DP=draw pathline, DW=draw wall,
                         SD=draw smalldots, BD=entmod to big dot
                         MapGame=write game level to file
--------------------------------------------------------------------------------
   Misc. function     >> HL=toggle Highlight on/off,
                         EF=toggle image frame on/off
                         GM=toggle grid mode on/off
                         AN=create animation path (creating Logo animation etc)
--------------------------------------------------------------------------------
; error: bad argument type: stringp nil

Command:

Try setting the PacMan folder to AutoCad path


GDF

  • Water Moccasin
  • Posts: 2081
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #13 on: May 19, 2014, 11:05:51 AM »
Tried it in Visual Lisp Editor:

error: PPF Internal: unexpected ctoken type
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #14 on: May 19, 2014, 12:23:38 PM »
wow
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

liuhaixin88

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #15 on: May 19, 2014, 10:25:13 PM »
error happened (when appload)
================================================================================
   PacMan [v1.2].LSP for AutoCAD v2002 loaded ...
                         Type Ppz to start game
================================================================================
   Create Custom level>> WS=define gameplay viewsize,
                         DP=draw pathline, DW=draw wall,
                         SD=draw smalldots, BD=entmod to big dot
                         MapGame=write game level to file
--------------------------------------------------------------------------------
   Misc. function     >> HL=toggle Highlight on/off,
                         EF=toggle image frame on/off
                         GM=toggle grid mode on/off
                         AN=create animation path (creating Logo animation etc)
--------------------------------------------------------------------------------
; error: bad argument type: stringp nil

Command:

Try setting the PacMan folder to AutoCad path

I Create a folder in C: disk ,rename "PacMan" , add this floder to support file search path.
appload "PacMan [v1.2].LSP" An error occurred “error: bad argument type: stringp nil”

What steps are still missing?

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #16 on: May 20, 2014, 03:49:50 AM »
Tried it in Visual Lisp Editor:

error: PPF Internal: unexpected ctoken type

hmmm...honestly I really dont know what that means. Does anyone know  ?

Are you running it on Autocad 2002 ?

liuhaixin88

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #17 on: May 20, 2014, 03:56:41 AM »
Tried it in Visual Lisp Editor:

error: PPF Internal: unexpected ctoken type

hmmm...honestly I really dont know what that means. Does anyone know  ?

Are you running it on Autocad 2002 ?


This routine only run on acd2002 ?   

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #18 on: May 20, 2014, 04:02:12 AM »
To Liuhaixin88,

Try this...

upzip the file pacman (v1.2).zip to a temp folder.
Then move the whole Pacman folder to drv C. 

Hope this will help.

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #19 on: May 20, 2014, 04:07:19 AM »

(was searching for the modify button for
 the first page but cant find it)


This lisp only works on AutoCad v2002.

Sorry..

« Last Edit: May 20, 2014, 04:17:10 AM by RAIN CODE »

liuhaixin88

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #20 on: May 20, 2014, 04:22:54 AM »

(was searching for the modify button for
 the first page but cant find it)


This lisp only works on AutoCad v2002.

Sorry..

You are  OP ? so please Login using  “ RainCode v1.2 ” ,

divtiply

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #21 on: May 20, 2014, 04:45:29 AM »
Raincode:

Your VBA code is incompatible with x64.
Consider to remove VBA dependency.

Here is the snippet:
Code: [Select]
(defun play-sound (url)
  (vl-load-com)
  (vlax-put-property (cond (*windowsmediaplayer*)
                           ((setq *windowsmediaplayer* (vlax-create-object "WMPlayer.OCX"))))
                     'url url))

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #22 on: May 22, 2014, 05:32:01 AM »
Raincode:

Your VBA code is incompatible with x64.
Consider to remove VBA dependency.

Here is the snippet:
Code: [Select]
(defun play-sound (url)
  (vl-load-com)
  (vlax-put-property (cond (*windowsmediaplayer*)
                           ((setq *windowsmediaplayer* (vlax-create-object "WMPlayer.OCX"))))
                     'url url))

I am not familiar with VBA code. What does the above code do ?

But this thing only run on Acad ver 2002.



RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #23 on: May 22, 2014, 05:39:49 AM »

(was searching for the modify button for
 the first page but cant find it)


This lisp only works on AutoCad v2002.

Sorry..

You are  OP ? so please Login using  “ RainCode v1.2 ” ,

oh ya I was using another ID.
Created another one becos I tried to log in
at the cybercafe but forgotten about the password. Hate to travel back home to get password.

RainCode v1.2

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #24 on: May 25, 2014, 02:54:39 AM »
Video posted but still in processing for alomst 45 mins already... ??? Is this normal

Anyway, the Video Links below are for,  "How to.... for PacMan v1.2 game"

How to create a PacMan custom level
(using AutoCad)
http://www.youtube.com/watch?v=m96x8KNlXj4&feature=youtu.be


How to create a Jpeg background
(required PhotoShop CS2)
http://www.youtube.com/watch?v=bvbTbmel_Go&feature=youtu.be

How to use Automate Batch editing to create background effect in bulk
(required PhotoShop CS2)
http://www.youtube.com/watch?v=UMc7tCoetcw&feature=youtu.be

divtiply

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #25 on: May 25, 2014, 01:05:21 PM »
Raincode:

Your VBA code is incompatible with x64.
Consider to remove VBA dependency.

Here is the snippet:
Code: [Select]
(defun play-sound (url)
  (vl-load-com)
  (vlax-put-property (cond (*windowsmediaplayer*)
                           ((setq *windowsmediaplayer* (vlax-create-object "WMPlayer.OCX"))))
                     'url url))

I am not familiar with VBA code. What does the above code do ?

The exaple provided is not VBA code, this is VisualLisp. It plays sound files (wma, mp3 & others supported by Windows Media Player). Should work with AutoCAD 2000 & above (x32/x64), BricsCAD (x32/x64), ZWCAD, GstarCAD, progeCAD and probably CorelCAD (heck, what a zoo!)

try (your path to file may vary):
(play-sound "c:\\windows\\media\\tada.wav")

Your sound playing code depends on VBA DVB files. VBA DVB code is not supported in BricsCAD x64. AutoCAD 2009 & above supports VBA with additional module instalation only. AutoCAD x64 VBA needs different code (it's about function pointers).

To make your code more portable I recommend to rewrite sound routines using only VisualLisp. You may use my snippet for it.

But this thing only run on Acad ver 2002.

With a little modification it should run under all above mentioned CADs.
« Last Edit: May 25, 2014, 01:27:15 PM by divtiply »

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #26 on: May 27, 2014, 11:44:15 AM »
At first I try to run this lisp on Autocad ver
2008 but the screen turned white. I dont
know why that happened then I write it for
Autocad ver2002.

The sound code wasnt written by me. I
found it on a forum.

But if I change the sound code to make it
run on higher ver it still cannot run becoz
the screen turned white.

You ahould try it on higher ver then you
will know what I mean.


cmwade77

  • Swamp Rat
  • Posts: 1443
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #27 on: May 27, 2014, 06:54:52 PM »
I only have AutoCAD 2014 and 2015, so I can't play with this, looks cool though.

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #28 on: May 27, 2014, 11:48:07 PM »
I only have AutoCAD 2014 and 2015, so I can't play with this, looks cool though.

I want it to run on higher ver too so other
ppl with higher can play it but I just
dont know how to solve the white screen
problem.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #29 on: May 28, 2014, 12:57:59 PM »
I only have AutoCAD 2014 and 2015, so I can't play with this, looks cool though.

I want it to run on higher ver too so other
ppl with higher can play it but I just
dont know how to solve the white screen
problem.
I would like to even get that far, but I get the same issue as in this post:
http://www.theswamp.org/index.php?topic=47087.msg521312#msg521312

Perhaps if I can get that error resolved, then I can look at the white screen error.

RainCode v1.2

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #30 on: June 01, 2014, 04:04:38 AM »
I only have AutoCAD 2014 and 2015, so I can't play with this, looks cool though.

I want it to run on higher ver too so other
ppl with higher can play it but I just
dont know how to solve the white screen
problem.
I would like to even get that far, but I get the same issue as in this post:
http://www.theswamp.org/index.php?topic=47087.msg521312#msg521312

Perhaps if I can get that error resolved, then I can look at the white screen error.

That issue is becos have to set pacman folder to autocad path...
anyway check my newer post.

77077

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #31 on: September 29, 2014, 01:55:36 AM »
Just support cad 2002 ,? not many people will use ...


RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #32 on: October 20, 2014, 12:08:28 PM »
Just support cad 2002 ,? not many people will use ...

I dunno... I tried on other version but screen turned white.

mailmaverick

  • Bull Frog
  • Posts: 493
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #33 on: November 14, 2014, 12:41:52 PM »
I get following error :-

Error loading ErasePlay.dcl
bad argument type: stringp nil

RAIN CODE

  • Guest
Re: PacMan game v1.2 completed. More refined version of v1.1
« Reply #34 on: November 17, 2014, 02:57:49 AM »
can u give more info like what acad ver u running ?

did u set the pacman path ?

This is a old ver. A newer ver is as link below
 http://www.theswamp.org/index.php?topic=47941.0

And a patch for blue blinking monsters  for newer ver is as below
 http://www.theswamp.org/index.php?topic=48160.0

for your info I am not writing any games right now but playing professional made games - Resident Eeeevvvviiilllll 5 etc

see ya all later
« Last Edit: November 17, 2014, 03:14:29 AM by RAIN CODE »