Giter Site home page Giter Site logo

opengl-demo's Introduction

PHP OpenGL (SDL) Demo

PHP 8.1+ Latest Stable Version Latest Unstable Version License MIT

Please note that this is only a demo and may contain non-optimal, crazy and completely unbelievable programming techniques (Well, besides the fact that this code is written by a PHP 🐒 developer who has never encountered game development).

If your psyche was injured please consult a doctor.

Peace <3


Oh yes, according to my information, nobody has ever done such things in pure PHP.

Demo in action: https://www.youtube.com/watch?v=vsBbJbhKeeU

Requirements

  • PHP 8.1+
  • ext-ffi
  • Composer
  • Windows, Linux or Unix (over X11 and Wayland), MacOS

Additional Requirements (MacOS and Linux only)

  • SDL 2.0+
  • SDL Image 2.0+
  • SDL TTF 2.0+

Installation

Windows

  • composer install
  • php app.php

Linux

  • sudo apt install libsdl2-2.0-0 -y
  • sudo apt install libsdl2-image-2.0-0 -y
  • sudo apt install libsdl2-ttf-2.0-0 -y
  • composer install
  • php app.php

MacOS

  • brew install sdl2
  • brew install sdl2_image
  • brew install sdl2_ttf
  • composer install
  • php app.php

Docker

  • docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTHORITY $(docker build -q .)

General Information

  • The "./engine/" directory contains deprecated code that will be removed in the future (for now it is required for the demo to work). All actual code is currently contained in the ./libs/ directory and some part of the old code has already been replaced with the current one.
  • It is planned to move away from separate installation of binaries (SDL, SDL Image, etc...) and ship them together with the application. The ./libs/binaries-downloader package is responsible for their installation. Assemblies are available here in the "assets" section here: https://github.com/SerafimArts/opengl-demo/releases/tag/0.0.1
  • It is planned to move away from SDL support and switch to native OpenGL API (This is one of the reasons why MacOS can disappear from the list of available operating systems), and then Vulkan API.
  • After rewriting the graphics pipeline, it is planned to add a sound/audio engine (fuck knows how to do it).

opengl-demo's People

Contributors

serafimarts avatar bobimicroweber avatar ghostwalkers avatar purhur avatar xslackx avatar dependabot[bot] avatar

Stargazers

John Laswell avatar  avatar Kyrian Obikwelu avatar LiKun avatar Stacy Robinson avatar Vladislav Gladky avatar Dave avatar Chad McAdams avatar Oleg Chulkov avatar Jacek Andrzejewski avatar Serge Postrash avatar Alexander Egorov avatar Yevhenii Tsiura avatar  avatar Crispy Computing Machine.  avatar Software Nerd avatar  avatar Zeljko Mitic avatar  avatar Arsen Goian avatar Ciri avatar Thanh Trần avatar Reinan Gabriel avatar AuroraHe avatar Siarhei Bautrukevich avatar  avatar Lizzy  avatar geste avatar  avatar Alex avatar  avatar guo shawn avatar Иван Колотилкин avatar Jean pasqualini avatar Peter Lembke avatar Alexander Loutsenko avatar Rareș avatar Lennard van Gunst avatar  avatar Ilija Tovilo avatar Kennedy Tedesco avatar Chin Leung avatar Peter Brinck avatar uzulla / Junichi Ishida avatar Thomas Steinmetz avatar Jessie Siat avatar Ion Bazan avatar Anton Karpov avatar Nikolas Evers avatar Gábor Egyed avatar Mary De Nóbrega avatar Mantas Urnieža avatar Anatolie Marinescu avatar Jordan LeDoux avatar  avatar Railken avatar Aryel Tupinambá avatar Matt Randles avatar xx1024 avatar Luis Miguel avatar Alexey Lukyanenko avatar Ricardo Kovalski avatar Dmitry avatar Oleg Andreyev avatar Kristijan Marić avatar  avatar Vitaly Artemyev avatar Anton Demanov avatar Marco Lindemann avatar Maxim avatar Yuri Oblovatskyi avatar Илья avatar Sergey avatar Dmitriy Kepov avatar Kwame Oteng Appiah-Nti avatar Alan Bondarchuk avatar Lukas Kirylak avatar Ivan Sivák avatar Paweł Klebba avatar Jitendra Adhikari avatar Credomane Evonguard avatar Jason Vaillancourt avatar Ivailo Stoianov avatar  avatar Peter Ivanov avatar  avatar Alex Rock avatar Guillaume MOREL avatar Danilo Henrique de Canini avatar Patrick Chagas avatar Ahmed Abdou avatar Aleksei Gagarin avatar 0x48415a484952 avatar Ganon avatar Aliaksei Sanikovich avatar Konrad Alfaro avatar Andrew Felchak avatar Insolita avatar Fábio Pichler avatar yianz avatar

Watchers

Eugeny Fomin avatar Sean Morris avatar James Cloos avatar Zeljko Mitic avatar Randy Schütt avatar  avatar Peter Ivanov avatar Andrew Felchak avatar Lukas Kirylak avatar  avatar

opengl-demo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.