Pacman!

Pacman!

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Pacman!

Post by zwzsg »

For those bored specs.

Instruction:
- Dump pacman.lua into \LuaUI\Widgets\
- Make sure LuaUI is on, press F11 and activate pacman widget
- You are the yellow ball, your goal is to eat all the dots.
- Blue ghost are edible, purple ones are deadly.
- Use arrow keys to move
- Use + - to adjust speed

Note: Totally unoptimised, could be done way more efficiently. It's just a lua translation of a pacman I wrote last year in another language.

Image
Attachments
pacman.lua
The widget!
(17.18 KiB) Downloaded 66 times
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Pacman!

Post by Gota »

Lol will u make random level generator?multiplayer?
made a game inside your game so you can play while you play?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Pacman!

Post by zwzsg »

Gota wrote:Lol will u make random level generator?
Random, probably not, but yeah, it could use some level and that would be easy to add.

Also, works best on Comet Catcher because of width/height ratio:

Image
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Pacman!

Post by Gota »

Bomberman multiplayer while we spec?
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Pacman!

Post by CarRepairer »

This is the most simultaneously retarded and awesome widget I've seen here yet. Well done, and you're insane.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Pacman!

Post by zwzsg »

Gota: Look, I just wanted to write a full game as a widget to prove my point about how the whole engine can be ditched and replaced by a Lua interpreter, as nowaday any modders requesting new engine is answered to Lua it. I just picked pacman because it's simple and I had already coded it. Writing a multiplayer bomberman Spring widget is certainly doable, but I'm not going to code it myself now.

I fact after pacman I had planned to port my TA javascript port to a Spring widget.
Last edited by zwzsg on 30 May 2009, 23:09, edited 1 time in total.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Pacman!

Post by imbaczek »

/me wants asteroids and nibbles with shared ingame highscore
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Pacman!

Post by Gota »

zwz i was just kidding not actually asking u to make it.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Pacman!

Post by zwzsg »

But it could totally be made.

Pacman, Bomberman, Nibbles, Asteroids, Breakout, Tetris, are simple enough game that a single person can code them in a day to half a week. From what I've read in other widget's thread, widgets can communicate to other players same widgets, so multiplayer is also totally possible.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Pacman!

Post by aegis »

starcraft minigame
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Pacman!

Post by CarRepairer »

aegis wrote:starcraft minigame
TA minigame.

edit: in before yo dawg.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Pacman!

Post by trepan »

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Pacman!

Post by lurker »

zwzsg wrote:I fact after pacman I had planned to port my TA javascript port to a Spring widget.
CarRepairer wrote:TA minigame.
Poor CarRepairer, I think the stress has finally gotten to him.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Pacman!

Post by KDR_11k »

I was thinking about a Tetris widget (inspired by the Tetris plugin for UT '99) but considered the mechanics too complicated to implement. I think it'd be better if your Pac Man ran in a window in the GUI instead of overlaid on the terrain.
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

Re: Pacman!

Post by Tribulexrenamed »

KDR_11k wrote:I was thinking about a Tetris widget (inspired by the Tetris plugin for UT '99) but considered the mechanics too complicated to implement. I think it'd be better if your Pac Man ran in a window in the GUI instead of overlaid on the terrain.
Overlaid on the terrain produces more lulz. I run a modified version of this widget whenever i play spring now, only my com is the pacman. Usually, I have to go air to keep up with the ghosts.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Pacman!

Post by zwzsg »

KDR_11k wrote:I think it'd be better if your Pac Man ran in a window in the GUI instead of overlaid on the terrain.
My aim wasn't to provide the best pacman experience ever, but to demonstrate how Spring's lua is extensive enough to write a full game completly disregarding the hard coded engine logic. Being overlaid on terrain gives a better feeling of "this is done within Spring" than a little window on the Gui, which would feel too artificial, too detached from the rest of Spring.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Pacman!

Post by Argh »

That is definitely a nice stunt.

Very nice :-)
User avatar
kburts
Posts: 134
Joined: 22 Mar 2009, 00:36

Re: Pacman!

Post by kburts »

can other people see this or just the person playing?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Pacman!

Post by zwzsg »

Just the person playing. It's a widget. A Lua UI.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Pacman!

Post by manolo_ »

bomberman for specs would be awesome :D, could you bind the widget to a key?
Post Reply

Return to “Lua Scripts”