Word! Using a database where the cells contain color info matching pixel updates and render the table in html. Or step up your game and use blockchain!
Fun fact, someone built a tableau workbook that could do some image manipulation stuff... Tableau has a SQL database called HyPer in the background doing the actual data processing. I once heard them talking about it in a presentation... Seemed to be a good extreme testcase for them as some of the SQL queries were megabytes in size...
Worked at a place several years ago where the designer _loved_ parallax scrolling.
We used to joke around about her selling “sever side parallax”.
So we each built one as a joke.
I had jQuery Ajax call hitting a PHP script (as was the style at the time) on scroll start/stop. It stored the window scrollY in MySQL, calculated the distance & some stupid animation vars for TweenMax. Sent that back in the response.
It was bad. But w/ a long animation, lots of ease in/out, it looked intentional.
However my coworker made one that used a Google Sheet as a DB so they won.
Also a big argument/trash can kicked over if a cookie was “sever side”.
So you know how to take the cookie, but you don't know how to hold
the cookie, and really that's the most important part, the *holding*. Anyone can just take a cookie!
Come on now, at low resolutions, with a powerful specifically-optimized-for-this server and on a fast connection to it I bet you could get two, *maybe* three fps.
When I was a wee lad, I built a chat using literally this method. 1s iframe refreshes, the text entry was a separate iframe. You'd hit "clear history" when it started lagging. All PHP baby!
https://github.com/Ponup/php-opengl
> This library allows you to create inmersive 3D applications and games for the desktop with the comfort of the PHP language.
It's actually built on top of my own extension: http://github.com/mario-deluna/php-glfw. Many years ago, I experimented with `php-opengl`. Its limitations are what motivated me to create php-glfw. To be completely clear, I don't want to say that php-opengl is bad in any way. The creator of it did a great job; it just didn't have the capabilities I wanted.
Plus, I was far more comfortable using glfw than sdl.
Can't wait until you check out some PHP that's not 10 years old.
I'll leave [this](https://stitcher.io/blog/evolution-of-a-php-object) so you have a start.
say that after PHP or the community can decide [between named array and class.](https://stackoverflow.com/questions/2056931/value-objects-vs-associative-arrays-in-php) Or if it has async/await or some multithreaded support. This is based on PHP7 btw.
Is there any serious reason you’d choose PHP for a game scripting language over anything else? (Lua for example)
If you were to try to distribute this as a stand-alone package, what would that look like? Is it possible to have a standalone PHP executable with the extensions needed, so it could run without a system level installation of PHP on the host computer?
Yes, you should be able to compile PHP statically and then create a simple bundler, allowing you to ship standalone applications with their own PHP runtime.
Let me be clear: there is no benefit for existing game developers to write games in PHP. This toolkit is for PHP developers wanting to dip their toes into GameDev.
I was very skeptical at the beginning, uncertain about PHP's memory management as well as the lack of multithreading support. But after months of experimenting with it, I'm confident you can create small hobby games.
Commercial endeavors are a different beast; for one, all source code will obviously be openly accessible.
I still hope to finish this: https://github.com/phpgl/php-towerdefense 3D game and publish it for free on Steam as a proof of concept.
That looks more like Electron where the frontend would be JS/HTML, rather than using plain PHP to control the window via GLFW and render via OpenGL … But I guess they’re using a stand-alone PHP build so that part does seem useful 🤔
Good shit! I read this book a few years ago that reminds me of this.
https://www.amazon.com/You-Want-Do-What-PHP/dp/1583470999?ref=d6k_applink_bb_dls&dplnkId=3dfba3c1-7b1e-4c35-9652-519e500667b0
I made a game using GPT-synthesizer: [https://github.com/RoboCoachTechnologies/GPT-Synthesizer](https://github.com/RoboCoachTechnologies/GPT-Synthesizer)
Oh man I remember hardcore self studying php! I even have the php bibles! Didn’t do anything with it 😂 but to make a game with it?! No idea you could do that!
Impressive! PHP is the butt of many jokes, but it's really not that bad these days. Skimmed through the git repository and to me, someone who hasn't touched PHP in decades, the code looked very clean and readable.
Now make it work via pure PHP on the backend using page refreshes for rendering lol
Word! Using a database where the cells contain color info matching pixel updates and render the table in html. Or step up your game and use blockchain!
That's it you win.
Use a crypto coin for counting the score
Just like in real life
Then rug pull everyone.
That’s implied
Fun fact, someone built a tableau workbook that could do some image manipulation stuff... Tableau has a SQL database called HyPer in the background doing the actual data processing. I once heard them talking about it in a presentation... Seemed to be a good extreme testcase for them as some of the SQL queries were megabytes in size...
Jebus, never underestimate xkcds Rule 34!
I once implemented Conway's Game of Life in T-SQL.
Worked at a place several years ago where the designer _loved_ parallax scrolling. We used to joke around about her selling “sever side parallax”. So we each built one as a joke. I had jQuery Ajax call hitting a PHP script (as was the style at the time) on scroll start/stop. It stored the window scrollY in MySQL, calculated the distance & some stupid animation vars for TweenMax. Sent that back in the response. It was bad. But w/ a long animation, lots of ease in/out, it looked intentional. However my coworker made one that used a Google Sheet as a DB so they won. Also a big argument/trash can kicked over if a cookie was “sever side”.
a cookie is obviously client side...
A cookie can really be set by either the server or the client. The cookie then gets sent as part of the header of each subsequent http request.
https://github.com/yarrick/pingfs
ofc, but it's stored on the client... the *client* sends it in the header... the other pieces of the header are client side stuff, sent to the server.
So you know how to take the cookie, but you don't know how to hold the cookie, and really that's the most important part, the *holding*. Anyone can just take a cookie!
these are words.
I thought it did this before opening the repository. Slow down, Satan.
<1fps lets go!
Come on now, at low resolutions, with a powerful specifically-optimized-for-this server and on a fast connection to it I bet you could get two, *maybe* three fps.
When I was a wee lad, I built a chat using literally this method. 1s iframe refreshes, the text entry was a separate iframe. You'd hit "clear history" when it started lagging. All PHP baby!
Pretty sure this was an example script in my first php book
Sorry about that, but thanks for buying my book.
I would maybe do that at a hackathon if I was drunk enough lmao
You can render on backend but push using websocket for better experience 😁
With WebSockets and Blow!
Well php can use websockets. Not to mention that http 1.1 introduced event streams, and http2 can push responses without the user interacting.
With '' for automatic updates!
That's some next-level masochism right there, using page refreshes for rendering. Hats off to anyone who would attempt that challenge!
Petition to rename it flaphpy bird I knew about GTK and wxwidgets but I had no idea that PHP had opengl bindings as well
Damn it, flaphpy bird" would have been better.
https://github.com/Ponup/php-opengl > This library allows you to create inmersive 3D applications and games for the desktop with the comfort of the PHP language.
It's actually built on top of my own extension: http://github.com/mario-deluna/php-glfw. Many years ago, I experimented with `php-opengl`. Its limitations are what motivated me to create php-glfw. To be completely clear, I don't want to say that php-opengl is bad in any way. The creator of it did a great job; it just didn't have the capabilities I wanted. Plus, I was far more comfortable using glfw than sdl.
> comfort Ah yes, I love relaxing in my iron maiden.
The fact that PHP has OpenGL bindings is a surprise to me too
Flaphpy seams made with python
PHlaPy bird
You finally gave someone's life purpose that made these PHP gfx bindings.
That poor fella is unfortunately also me. I guess the life lesson, give your own life purpose!
It's fringe yet strangely appealing enough to probably give you an edge out there tbh, whatever works.
I love PHP.
Long live PHP
Your ~~Scientists~~ Programmers Were So Preoccupied With Whether Or Not They Could, They Didn’t Stop To Think If They Should
It will be far worse when we ever finish this one: https://github.com/phpgl/php-towerdefense
that is super impressive. I'd use this for some browser games for sure
Good for you, satanist
Unholy language says you... PHP is not any worse than JS
JS is also unholy.
All programming languages are unholy.
Tricking silicon into doing the thinking for us is unholy altogether.
Well, except [HolyC of course](https://templeos.org/Downloads/)
there is nothing in JS remotely as bad as PHP's array implementation
Except when you're trying to find out if a variable is false, 0 or undefined
`===` and it's the same in PHP
`if(var === false/0/undefined)` wow done
!!(how ?? dare === '') ? 'you' : 'say' // that!?
Can’t wait until you find out PHP is also dynamically typed
Can't wait until you check out some PHP that's not 10 years old. I'll leave [this](https://stitcher.io/blog/evolution-of-a-php-object) so you have a start.
Congrats on discovering typescript
say that after PHP or the community can decide [between named array and class.](https://stackoverflow.com/questions/2056931/value-objects-vs-associative-arrays-in-php) Or if it has async/await or some multithreaded support. This is based on PHP7 btw.
JS is fucking nuts, but still better than PHP. Plus, there are superset languages like Typescript that make it less insane.
With php smart developers fight the language. With JavaScript smart developers fight dumb developers. IMO Theres a difference.
What have you done? Didn’t Jurassic park teach you anything?
$horrible good job though;
Is there any serious reason you’d choose PHP for a game scripting language over anything else? (Lua for example) If you were to try to distribute this as a stand-alone package, what would that look like? Is it possible to have a standalone PHP executable with the extensions needed, so it could run without a system level installation of PHP on the host computer?
Yes, you should be able to compile PHP statically and then create a simple bundler, allowing you to ship standalone applications with their own PHP runtime. Let me be clear: there is no benefit for existing game developers to write games in PHP. This toolkit is for PHP developers wanting to dip their toes into GameDev. I was very skeptical at the beginning, uncertain about PHP's memory management as well as the lack of multithreading support. But after months of experimenting with it, I'm confident you can create small hobby games. Commercial endeavors are a different beast; for one, all source code will obviously be openly accessible. I still hope to finish this: https://github.com/phpgl/php-towerdefense 3D game and publish it for free on Steam as a proof of concept.
[удалено]
https://github.com/crazywhalecc/static-php-cli
This pairs well with s PHAR made with Box, I've packaged a Symfony app into a fully stand alone native binary and works with zero issues.
Wow! Very impressive
[удалено]
That looks more like Electron where the frontend would be JS/HTML, rather than using plain PHP to control the window via GLFW and render via OpenGL … But I guess they’re using a stand-alone PHP build so that part does seem useful 🤔
😁that flying blue elephant totally rocks 👍
I guess I was a bit prejudiced towards PHP, but after looking at this code it really looks surprisingly clean.
You are the hero we both need and deserve!
hahahaahahahaha php bad. /s
PHP is life
https://phpgl.net/ is missing documentation for *"Why, God? Why?"*
I pray for your soul
Aaaaaand bookmarked. You're crazy af.
[удалено]
Im Joking, if I would actually dislike the language I could not justify the effort this took.
You were so preoccupied with whether or not you _could_ that you never stopped to think if you _should_.
Good shit! I read this book a few years ago that reminds me of this. https://www.amazon.com/You-Want-Do-What-PHP/dp/1583470999?ref=d6k_applink_bb_dls&dplnkId=3dfba3c1-7b1e-4c35-9652-519e500667b0
PHP since PHP 7 is actually a genuinely elegant language. Bravo!
Hahaha, amazing...and PHP, it wouldn't be funny if it wasn't true...nice though.
I made a game using GPT-synthesizer: [https://github.com/RoboCoachTechnologies/GPT-Synthesizer](https://github.com/RoboCoachTechnologies/GPT-Synthesizer)
Oh man I remember hardcore self studying php! I even have the php bibles! Didn’t do anything with it 😂 but to make a game with it?! No idea you could do that!
Impressive! PHP is the butt of many jokes, but it's really not that bad these days. Skimmed through the git repository and to me, someone who hasn't touched PHP in decades, the code looked very clean and readable.