Skip to content

perigrin/perl-game-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perl Game Lab

Getting Started

Open in GitHub Codespaces

The codespace has noVNC installed, you can access the desktop by going to http://localhost:6080.

To start the demo game simply run perl bin/game.pl

On your own machine

On OSX you need install with homebrew and App::cpm:

    brew install raylib
    PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig" cpm install

On other systems the installation dance is left as a lemma for the reader. Alien::raylib currently will build an older version of Raylib so you need to use a system library, or a patched version of Alien::raylib.

Windows 11

  1. Install the latest Ubuntu distribution on WSL from the Microsoft Store. Currently it's Ubuntu 22.04.3 LTS.
  2. Update the OS:
 sudo apt-get update
  1. Install necessary packages:
sudo apt install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libz-dev
sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
  1. Install perlbrew:
curl -L https://install.perlbrew.pl | bash
  1. Update your PATH:
source ~/perl5/perlbrew/etc/bashrc
  1. Install perl 5.40.0:
perlbrew install 5.40.0
  1. Start using perl 5.40.0:
perlbrew switch 5.40.0
  1. Install cpanm using all the defaults:
cpan App::cpanminus
  1. Install updated raylib modules:
cpanm https://github.com/perigrin/Alien-raylib5.git
  1. From your HOME directory clone repo:
git clone https://github.com/perigrin/going-rogue-class.git
  1. cd to the repo root directory:
cd going-rogue-class
  1. install dependencies:
cpanm --installdeps .
  1. Comment out the "use local::lib qw(local);" line in bin/game.pl if it exists.
  2. Run the game. It should pop up an x11 window. If you see a green @ sign in the middle, you have won!
perl bin/game.pl

Ubuntu

# Install perlbrew
curl -L https://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
 
# Initialize
perlbrew init
 
# See what is available
perlbrew available
 
# Install some Perls
perlbrew install 5.40.0

# Switch to perl 5.40.0
perlbrew switch 5.40.0
cpan App::cpanminus

# Install Alien::RayLib
sudo apt-get install -y libasound2-dev \
            libxcursor-dev libxinerama-dev mesa-common-dev \
            libx11-dev libxrandr-dev libxi-dev \
            libgl1-mesa-dev libglu1-mesa-dev
git clone https://github.com/perigrin/Alien-raylib5
cd Alien-raylib5
cpanm Alien::raylib # To pull Alien raylib dependences
perl Makefile.PL
make install

# Game installatiom
git clone https://github.com/perigrin/going-rogue-class
cd going-rogue-class
cpanm Raylib::FFI
perl bin/game.pl

About

A space for building games in Perl using Raylib::FFi

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published