ProductPromotion
Logo

Lua

made by https://0x3d.site

GitHub - tylerneylon/pacpac: A lua-based Pac-Man clone.
A lua-based Pac-Man clone. Contribute to tylerneylon/pacpac development by creating an account on GitHub.
Visit Site

GitHub - tylerneylon/pacpac: A lua-based Pac-Man clone.

GitHub - tylerneylon/pacpac: A lua-based Pac-Man clone.

PacPac

This is Pac-Man from a parallel universe.

PacPac Title

PacPac Level Samples

There are 3 mazes to play through. This is thrice as many as the original pac-man :)

You need the löve game engine to play. The current code is written for löve v0.9.2.

The original code was written in under 24 hours as a challenge. My wife didn't believe I could make a pac-man-like game in a day. Here's a fun first 24-hour evolution of the game in screenshots.

How to install and run

  1. Download and install löve. (Current code has been tested with löve v0.9.2.)
  2. Download and unzip the zipfile of this repo.
  3. Double-click the file pacpac.love. Alternatively, in OS X and Ubuntu, type love pacpac.love from the command line - which assumes the love executable is in your path.

Level Editing

I've set up the game so that you can make your own levels without having to know how to program. Just edit level1.txt or any other levelN.txt file to change that level. The file format is explained within those files, and this format is designed to be human-friendly and flexible.

If you're running PacPac using pacpac.love, then you need to run make_love_file.sh before the level changes will show up in the game. This shell script is meant to be run from the command line by cd'ing into your pacpac directory (the one containing make_love_file.sh) and typing the command ./make_love_file.sh.

Contributions

It would be awesome if other coders contributed more levels. I'd like each level to add something new to the game. For now, level 2 adds a new layout and color, which in most games would not count as "new" but since Pac-Man has such a strong 1-layout tradition, I'm counting it as new.

My code philosophy for PacPac is to keep the code a little dirty, as in using global variables freely. Seriously. It's not that dirty is good, but rather that getting things done is good. So I'm asking for contributions that fix bugs or improve gameplay, but are not focused on refactoring. Refactoring is fine as a by-product of other changes, though.

If you'd like to add a level, please read the next section to understand what kind of level designs would fit in with the game. Thanks!

Things That Could be Added

Levels

Below are a few ideas for later levels. It would be cool to arrange them in the game from easiest to hardest.

  • New ghost AI's in different colors.
  • A gun that can shoot ghosts.
  • A level with keys that can open doors. Doors are basically walls that you can erase with a key.
  • A level with portal-like mechanics. Maybe a warp door that changes connected doors, or a warp gun. (This sounds a little scary to have to debug.)
  • A level where the hero and ghosts switch roles. By default, the ghosts are weak - i.e., flashing white/blue and can be eaten. The ghosts eat dots, and if they eat a superdot, then the hero becomes vulnerable - i.e., the ghosts appear non-flashing temporarily. However, the ghosts no longer reincarnate, and it is the hero's goal to eat all of them.

Once we have 10 good and mostly bug-free levels, I'll consider the game to be v1-ready.

Other features

Summary:

  • Tasty foods for bonus points
  • One or maybe two extra lives for certain score points
  • Replay a previously-played game
  • Analytics
  • Server-based high-score-of-the-day

Tasty foods

In the original game, you can eat fruit like apples and oranges. It would be cool to add more fun foods like pizza, burgers, fries, and waffles. Maybe cinnamon rolls. Foods that are tasty and would make for fun pixel art.

Extra lives

In the original game, you also get an extra life once you reach a certain score. This is a nice feature that we could include in PacPac.

Game replay

Automatically save all the effective commands the user provides so that we can exactly replay that game as a watch-only experience. Maybe this could happen automatically for the highest-scoring game, which would be displayed from the title screen if the user is idle.

There are a couple points to be careful about. The game currently uses a random number generator, so we'd have to save the seed used. It also depends on the dt values sent in to update, so we'd have to be careful about how the replay worked with the dt values. That might be tricky. Finally, there is technically analog input available through gamepads, but this can be discretized so that we only need to remember the successful calls to dir_request.

Analytics

By this, I mean heat maps of death locations on each level, and average time-of-life per level. This could help us figure out which levels are most challenging. From there we could do things like modify too-hard or too-easy sections, and make sure the levels are in the right order.

Server-based scores

This is self-explanatory. Even better is being able to download and watch a replay of good high scores.

Credits

This game uses the font 8bitoperator created by GrandChaos9000 (aka Jayvee D. Enaguas) and is distributed under the CC-BY-SA license.

Thanks to jonfk for upgrading the code for löve v0.9.2.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory