Skip to content

dinau/raywars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayWars : Star Wars-style opening crawl example program with Raylib

"May the Raylib be with you."

alt

Prerequisites


If you try to use except script language, install gcc, make, MSys2 console / commands(cp, rm ...)

Download Raylib library [Only for C, Nimony, Nelua]


  1. cd your_work_dir
    git clone https://github.com/dinau/raywars
  2. Download Raylib binary
    Windows: raylib-5.5_win64_mingw-w64.zip
    Linux: raylib-5.5_linux_amd64.tar.gz)
    then extracts it.

  3. Rename raylib-5.5_win64_mingw-w64 to raylib
    (for Linux: rename raylib-5.5_linux_amd64 to raylib)

  4. Copy raylib

    • Windows

      mkdir -p     libs/windows
      cp -r raylib libs/windows/  
    • Linux

      mkdir -p     libs/linux
      cp -r raylib libs/linux/  
  5. Folder structure:

    your_work_dir
     |-- raywars
     |   `-- src
     |       |-- c
     |       |-- c3
     |       snip
     | 
     `-- libs
         |-- windows
         |   `-- raylib    <==
         `-- linux
             `-- raylib    <==

Programs

C

pwd 
raywars/src/c

Windows / Linux
Use gcc compiler

make run
C3

C3 Compiler Version: 0.7.8

Install C3lang

Windows / Linux

pwd
raywars/src/c3

c3c vendor-fetch raylib55
make run
FreeBasic

FreeBASIC Compiler - Version 1.10.1 (2023-12-24), built for win64 (64bit)

  1. Clone raylib4fb

    cd your_work_dir/libs
    git clone https://github.com/mudhairless/raylib4fb
  2. Folder structure:

    your_work_dir
     |-- raywars
     |   `-- src
     |       |-- c
     |       |-- c3
     |       |-- FreeBasic
     |       snip
     | 
     `-- libs
         `-- raylib4fb       <== For FreeBasic
  3. Build and run

    pwd 
    raywars/src/freebasic

    windows

    make run
Go

go 1.25.5

pwd 
raywars/src/go

windows

make run
Julia

Work in progress

Julia 1.12.2
Using https://github.com/imohag9/RaylibWrapper.jl

pwd 
raywars/src/julia

julia
julia>]
(@v1.12) pkg> add https://github.com/imohag9/RaylibWrapper.jl

windows1

make run
Nelua

  1. Install MSys2/MinGW (Windows OS)

  2. Install NeLua

  3. Clone Raylib.nelua library
    Raylib.nelua: (git SHA-1: a91ad75074e126679adbe91ab369f4d62d1563b4)

    pwd
    your_work_dir/libs
    git clone https://github.com/AuzFox/Raylib.nelua
  4. Folder structure:

    your_work_dir
     |-- raywars
     |   `-- src
     |       |-- c
     |       |-- c3
     |       snip
     | 
     `-- libs
         |-- Raylib.nelua   <== For Nelua
         |-- windows
         |   `-- raylib
         `-- linux
             `-- raylib
  5. Building and runing

    pwd 
    raywars/src/nelua

    Windows / Linux
    Use gcc compiler

    (It should be built on MSys2 console on Windows)

    make run
Nim

Install Nim-lang

Windows / Linux
Use gcc compiler

pwd 
raywars/src/nim

nimble install naylib
make run
Nimony v0.2

Nimony v0.2 (with Raylib sample) : Manual / Github

pwd 
raywars/src/nimony

Windows / Linux
Use gcc compiler

(It should be built on MSys2 console on Windows)

make nim
Node.js / JavaScript

Install Node.js (v22.16.0)
Using node-raylib
Windows / Linux

pwd 
raywars/src/nodejs
npm install 

make       # or npm start

or double click raywars.vbs on Windows

Odin

Install Odin
Using odin version dev-2025-11 (-nightly:e5153a9)

  • For Windows OS
    1. Download raylib-5.5_win64_msvc16.zip then extracts it.

    2. Rename raylib-5.5_win64_msvc16 folder to raylib_msvc

    3. Copy raylib to libs folder

      pwd
      your_work_dir
      mkdir -p          libs/windows
      cp -r raylib_msvc libs/windows/  
    4. Folder structure:

      your_work_dir
       |-- raywars
       |   `-- src
       |       |-- c
       |       |-- c3
       |       snip
       | 
       `-- libs
           |-- windows
           |   `-- raylib_msvc    <== for Odin
           `-- linux
               `-- raylib   

Windows / Linux

make run
Lazarus / Pascal

Prerequisites:
Lazarus IDE and FPC 3.3.1 or newer
ray4laz package installed in Lazarus

Thank you for P.R. @GuvaCode.

Python

  • Windows : Python 3.14.0

  • Linux: Debian / Ubuntu : Python 3.13.5

    sudo apt install python3-pip
pip install raylib==5.5.0.3 --break-system-packages

(https://github.com/electronstudio/raylib-python-cffi)

pwd 
raywars/src/python

python raywars.py      # or python3 raywars.py
Ruby

For Windows install Ruby installer: Ruby 3.4.8
Linux: Ruby 3.3.8

pwd 
raywars/src/ruby

gem install raylib-bingings

ruby raywars.rb             # or double click raywars.rbw on Windows
Rust

For Windows set enviroment variable path LIBCLANG_PATH,
set LIBCLANG_PATH=C:\path\to\libclang_dll_folder

pwd 
raywars/src/rust

make run
Zig

zig-0.15.2:

pwd 
raywars/src/zig

Windows / Linux

make run

Credit


  • Music
    ./resources/Classicals.de - Strauss, Richard - Also sprach Zarathustra, Op.30

    "Also sprach Zarathustra, Op.30"
    Provided by Classicals.de
    Conducted by Philip Milman (https://pmmusic.pro/)
    Licensed under CC BY 3.0
    https://www.classicals.de

Footnotes

  1. If access to raylib.dll is denied, please grant read and execute permissions to raylib.dll.