Go to file
Matthias Gatto 1023d32c81
stop-screen: use consteness
2024-03-22 19:03:05 +01:00
.github/workflows ci: try fix windows 2024-02-04 12:13:02 +00:00
SDL_mixer@93d264b2bd build: add sdl git module 2021-04-19 01:15:13 +02:00
app/image_viewer rpg-fight: allow not lpcs character 2019-03-02 01:12:00 +01:00
core quickjs: etity.s() 2024-03-04 01:12:45 +01:00
doc/img 📝 docs: review the readme and add image example 2023-04-21 14:55:54 +02:00
docker Update Dockerfile 2023-01-31 04:57:48 +01:00
example/modules remove very oudated and broken examples 2020-11-05 02:09:50 +01:00
games Update README.md 2021-11-28 00:03:02 +01:00
include description: add raw file data, load a file in a DataEntity 2024-02-04 02:06:18 +00:00
modules stop-screen: use consteness 2024-03-22 19:03:05 +01:00
ph7@6fa1f84fdd ph7: add trace (WARNING NEED TO CHANGE SUBMODULE) 2022-07-18 06:39:51 +02:00
scripts-dependancies lua: add Rect.new_ps 2022-08-06 00:03:07 +02:00
sdl-gpu@c2ce97f031 map: can't get negative value 2021-05-21 04:44:29 +02:00
tests entity: optimise yeGetByStr for hash 2023-12-30 00:24:10 +01:00
tinycc@9ef0c42b17 3rdparty: update tcc 2020-11-09 01:21:29 +01:00
.gitmodules entity: initial support for HashEntity 2023-12-29 01:24:51 +01:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT: nyaa 2022-07-11 11:12:10 +02:00
CONTRIBUTING.md Create CONTRIBUTING.md 2023-04-26 13:00:28 +02:00
DejaVuSansMono.ttf sdl: new default path for font 2019-06-27 23:39:54 +02:00
HOW-TO-WEBASM.md doc: small doc howto web 2023-04-06 04:48:18 +02:00
LICENSE Create LICENSE 2017-10-18 10:46:21 +02:00
Makefile build: add clean_ph7 2024-02-04 12:10:09 +00:00
README.md Update README.md 2023-04-21 15:14:15 +02:00
check.sh build: fix error from check.sh 2017-02-02 20:59:17 +01:00
configure build: use build-in glew, because system segfault 2023-09-20 11:38:47 +00:00
configure-helper.sh game: gamemode support 2019-07-23 15:08:25 +02:00
countLine.sh entity: remove entity-cplusplus.cpp as it wasn't use anyway 2022-09-09 10:18:22 +02:00
gdb-tests.sh build: add gdb script 2017-09-01 11:52:49 +02:00
gpl-3.0.txt Create gpl-3.0.txt 2023-02-04 22:31:09 +01:00
package-game.sh build: better game packaging 2020-12-02 02:09:35 +01:00
package-maker.sh pkg: remove gl and x libs 2022-10-09 18:59:53 +02:00
sazanami-mincho.ttf sdl: use japanese font by default 2021-12-30 19:19:29 +01:00
sonar-project.properties Update sonar-project.properties 2024-01-01 13:49:32 +01:00
tests-asan.sh dialogue-box: it move 2018-03-14 15:40:16 +01:00
tests.sh tests: fix pacth in tests.sh 2017-09-01 11:53:50 +02:00
yirl-completion.bash yirl-completion.bash: small improvements 2022-06-21 00:26:44 +02:00
yirl-loader.sh widget: remove widget-callback.h 2017-10-07 14:38:06 +02:00


YIRL isn't a Rogue-like

A Work in progress game engine

Aiming to be fully configurable, scriptable and mod friendly!


irc server: libera chanel: #yirl

  • YIRL is a WIP,
  • YIRL is a game engine aiming to be fully configurable, fully scriptable and mod friendly.
  • YIRL has been started as an school project at EPITECH
Preview from sukeban
A screenshot from the Sukeban project made with YIRL

The first version, the one release at the end of my scholarship can be found on bitbucket: https://bitbucket.org/cosmo_ray/yirl/src


Concept:

The idea behind YIRL is to give to the user some basic tools and widgets that everyone can reuse or wrap into more complex widgets. We can see YIRL as a CMS for video game: Everyone should be able to add module to YIRL, and everyone should be able to wrap modules into more powerful modules.

As an example the snake module is a map with more function and a init, it's basically an inheritance of a map, this allow everyone to add a snake easily in his game. Snake module is written in lua, but as YIRL have a generic script system, we could have written snake in any scripting language. Here is an example how Snake module can be use: https://github.com/cosmo-ray/yirl/tree/master/example/modules/snake. Another example would be how I integrate most games widgets into my RPG Sukeban: I first load the games modules in sukeban start.json: https://github.com/cosmo-ray/Sukeban/blob/master/start.json like snake modules:

    "pre-load" : [
 	     { "path" : "YIRL_MODULES_PATH/snake/", "type" : "module" },
       ...

An then create a widget that is of the type of the desired game that is then push in a container widget: like in action.lua playSnake function:

   local snake = Entity.new_array() -- create the array

   snake["<type>"] = "snake" -- set the widget type
   snake.dreadful_die = 1 -- internal stuff
   snake.hitWall = "snake:snakeWarp" -- which function to call when hit a wall (to make it me like snake2)
   snake.die = Entity.new_func("backToGame") -- what's happend when you die
   snake.quit = Entity.new_func("backToGame") -- when your quit... (backToGame is sukeban function to return to game)
   snake.resources = "snake:resources" -- resource to describe snake sprites/characters
   snake.background = "rgba: 255 255 255 255" -- widget background
   ywPushNewWidget(main, snake) -- push snake widget into main

supportted scripting languages are lua, C(with tinycc), scheme(s7), javascript(quickjs), php 5.3 (ph7) and yb(YIRL own asm) feel free to add your language :).

how to start using YIRL

For now the easier way to use YIRL is to come chat with us and ask for help But you can still understand how YIRL work by:

  • using games using YIRL (https://uso.itch.io)
  • modify some functionality form a game
  • copy one to create your own game/module

Modules

Modules are a very important part of YIRL, a modules can be a set of functions, A widget that implement some game mechanism(like snake), or a full game (like game/vapz)

Each modules have a start file that will serve as entry file, and will tell YIRL how to load every other files. It can be either a json file (start.json), or a C/lua/scheme/javascript file. how to load every other files

##Start a game from the source ./yirl-loader.sh -P $PWD -d path/to/game/module

building

Linux - Mac Os:

git submodule update --init
./configure
make

Due to the way Ubuntu package lua, you need to do ./configure -t ubuntu instead of ./configure

Windows: you need to use msys2: http://www.msys2.org/

git submodule update --init
./configure -t mingw-i686
make

Package Game

for windows you can use package-game-mingw.sh with mingw

for linux (like Arch Linux that I use BTW): package-game.sh

Both script are rarly used because I'm lazy and might require manual inervention to remove some lib Also you should use an old distro (like centos 6) to package you game, otherwise old(or stable) distro might have incompatibility wih glibc

Contribution

Obviously contributions are very welcome, to contribute you can simply make a Pull Request on GitHub, if something is wrong, I'll tell you :) As I didn't have time to write a coding style, in case of contribution, you should just try to imitate code already in place.

I'd like to use Linux coding style, but this would require to change every functions and structures names. A good contribution would be to make YIRL compatible with Linux coding style.

Dependencies

Development package of these libs:

  • glib2
  • lua 53+
  • sdl2, sdl2_image, sdl2_ttf
  • json-c
  • sdl2_mixer with a version >= 2.0.5 (you can use ./configure --clone-sdl-mixer)

Tree:

  • include: headers
    • sys: system header, that can be useful for TCC
    • tinycc: tcc libc header
    • YIRL: YIRL header, use internally and for TCC scripting, but so far, the best documentation, most functions have bindings
      • widget.h: widget base class and common widgets functions
      • events.h; check if a key have been press, windget contain functions to handle events too, but these one are better
      • map.h: a square map
      • menu.h; either a clasique menu or a panel
      • canvas.h: canvas API(for 2D rendering)
      • text-screen.h: a simple text widget.
      • container.h: widget that contain others widgets
      • pos.h: helpers to manipulate everything with a position
      • rect.h: helpers for rectangles
      • sdl-driver.h; internal, look away
      • keydef.h: keyboard touches define base on curses key numbers
      • game.h: starting point, initializ everything, and handle modules
      • entity.h: the YIRL entity system, use everywhere in the engine
      • debug.h: some debug functions
      • description.h: generic api for descriptions files(files that describe entities tree)
      • json-desc.h
      • script.h: generic api for scripting manipulation
      • lua-script.h
      • tcc-script.h
      • native-script.h: allow to create FunctionEntity from YIRL internal API
      • lua-binding.h: binding between yirl api and lua
      • block-array.h: yirl internal array use by ArrayEntity
      • sound.h: yirl abstract sound system
      • sound-libvlc.h: libvlc sound implementation
      • util.h
      • timer.h
  • core: engine sources
  • test: unit tests
  • modules: set of basic YIRL modules, still used a lot, it contain some games too, tiled map parser, and a character generator that use Liberated Pixel Cup sprites
  • games: old crap, on which I don't work anymore
  • example: all examples are outdated
  • doc: documents like sceenshot images

Projects using YIRL

for peoples who don't like github:

https://git.iglou.eu/Matthias/yirl

License:

YIRL is licensed under the LGPL license, the idea behind that, is that you can add a modules under the license you want, but if you make a modification to the engine, you need to share it.

Note: libperl is under Artistic or GPL 3.0, so if you use yirl with libperl, and libperl as gpl3, I guess YIRL became GPLed. (but not with Artistic License). licensing is weird, Anyway, You can use --disable-perl when ./configure