Stabyourself / nottetris2

A mess
Do What The F*ck You Want To Public License
107 stars 26 forks source link

Any chance of this being updated for newer love? #2

Open parkerlreed opened 5 years ago

parkerlreed commented 5 years ago

I love (heh) this game but love 0.7 has compilation issues with newer gcc/opengl versions. Would be great to be able to play this on current love.

Stabyourself commented 5 years ago

The problem is that the box2d lib was updated and changes things drastically, so this would require some additional work. Maybe in the future once a web-version of LÖVE exists.

parkerlreed commented 5 years ago

@Stabyourself Thanks for the reply!

erpel commented 4 years ago

Now that there actually is a license in there, I'll definitively push my started port to current löve. The biggest problem is, that the old binary is not signed or 32 bit (don't remember which it was) but it does not run on current macOS anymore. I'm actually hesitant to upgrade the last system because I'll loose nottetris2...

parkerlreed commented 4 years ago

Linux always welcomes you :)

yajo commented 4 years ago

Yes, although we already lost not tetris 2 in Linux years ago due to old love too... :laughing:

parkerlreed commented 4 years ago

It's alive and well over on Arch AUR! (I maintain the packages hehe)

But yeah, would be good to have it all up to date.

yajo commented 4 years ago

Woah really? But did you patch the sources or do you still maintain love 0.7.2?

erpel commented 4 years ago

On AUR it looks like the package uses love 0.7: https://aur.archlinux.org/packages/nottetris2/

If someone had ported this to current love, I’d hope they provided patches upstream.

parkerlreed commented 4 years ago

The only patch needed for 0.7 is this.

diff --unified --recursive --text love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp love-HEAD.new/src/modules/graphics/opengl/Framebuffer.cpp
--- love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp  2019-03-14 12:46:55.032982224 -0400
+++ love-HEAD.new/src/modules/graphics/opengl/Framebuffer.cpp   2019-03-14 12:47:22.356175299 -0400
@@ -1,3 +1,5 @@
+#define GL_GLEXT_PROTOTYPES
+
 #include "Framebuffer.h"
 #include <common/Matrix.h>

diff --unified --recursive --text love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp love-HEAD.new/src/modules/graphics/opengl/SpriteBatch.cpp
--- love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp  2019-03-14 12:46:55.032982224 -0400
+++ love-HEAD.new/src/modules/graphics/opengl/SpriteBatch.cpp   2019-03-14 12:47:33.346119890 -0400
@@ -18,6 +18,8 @@
 * 3. This notice may not be removed or altered from any source distribution.
 **/

+#define GL_GLEXT_PROTOTYPES
+
 #include "SpriteBatch.h"

 // STD

That lets love07 compile and then you can just run nottetris2 from there.

parkerlreed commented 4 years ago

image

yajo commented 4 years ago

However in https://github.com/flathub/flathub/pull/377 @barthalion did a lot more patches and still didn't get to make it work. Are you sure that just that patch would be enough? :thinking:

parkerlreed commented 4 years ago

@Yajo That's just a patch for love 0.7 to get LOVE 0.7 itself working on new systems :)

yajo commented 3 years ago

I've added your patch in https://github.com/Yajo/flathub/commit/bb6696d5568e0284e4c411c5fa281581ca4d4328 and managed to build the app following these instructions.

However, it still fails:

➤ flatpak run net.stabyourself.nottetris2 
Could not set video mode: X11 driver not configured with OpenGL
Error: [string "boot.lua"]:1: Could not set screen mode
stack traceback:
        [C]: in function 'assert'
        [string "boot.lua"]:1: in function <[string "boot.lua"]:1>
        [C]: in function 'xpcall'

Does that tell you anything? (I've never programmed lua or C before)

parkerlreed commented 3 years ago

Could not set video mode: X11 driver not configured with OpenGL Could not set screen mode

Maybe the OpenGL passthrough isn't working?

parkerlreed commented 3 years ago

If you have Intel/AMD GPU you need the Mesa flatpak to use OpenGL iirc.

If Nvidia then it's a bit more complicated https://www.linuxuprising.com/2018/06/how-to-get-flatpak-apps-and-games-built.html

yajo commented 3 years ago

Maybe the OpenGL passthrough isn't working?

Mm no idea of what that means... sorry for being so newbie. How can y check that?

If Nvidia then it's a bit more complicated https://www.linuxuprising.com/2018/06/how-to-get-flatpak-apps-and-games-built.html

Done, but it doesn't work either:

➤ rpm -q kmod-nvidia
kmod-nvidia-455.28-1.fc32.x86_64

➤ flatpak install flathub org.freedesktop.Platform.GL32.nvidia-455-28 org.freedesktop.Platform.GL.nvidia-455-28
Looking for matches…
Skipping: org.freedesktop.Platform.GL.nvidia-455-28/x86_64/1.4 is already installed

        ID                                                      Branch             Op            Remote             Descarga
 1. [✓] org.freedesktop.Platform.GL32.nvidia-455-28             1.4                i             flathub            352,5 kB / 169,4 MB

Installation complete.

➤ flatpak-builder build-dir --force-clean net.stabyourself.nottetris2.yml
Emptying app dir 'build-dir'
Downloading sources
Starting build of net.stabyourself.nottetris2
Cache hit for SDL1, skipping build
Cache hit for glu, skipping build
Cache hit for lua, skipping build
Cache hit for libpng, skipping build
Cache hit for libmng, skipping build
Cache hit for physfs, skipping build
Cache hit for libdevil, skipping build
Cache hit for libmodplug, skipping build
Cache hit for love, skipping build
Cache hit for nottetris2, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Pruning cache

➤ flatpak-builder --user --install --force-clean build-dir net.stabyourself.nottetris2.yml
Emptying app dir 'build-dir'
Downloading sources
Starting build of net.stabyourself.nottetris2
Cache hit for SDL1, skipping build
Cache hit for glu, skipping build
Cache hit for lua, skipping build
Cache hit for libpng, skipping build
Cache hit for libmng, skipping build
Cache hit for physfs, skipping build
Cache hit for libdevil, skipping build
Cache hit for libmodplug, skipping build
Cache hit for love, skipping build
Cache hit for nottetris2, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Exporting net.stabyourself.nottetris2 to repo
Commit: f8cc85d11f29f63175846a6f0b0a3155fbdaeb7fa06568a3fe152e0bfb287c43
Metadata Total: 89
Metadata Written: 1
Content Total: 103
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Exporting net.stabyourself.nottetris2.Debug to repo
Commit: 032fd3dd1ed48be2e28a873ac3d73916d2bf815f5636429bc7a6f8a155492193
Metadata Total: 241
Metadata Written: 1
Content Total: 935
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Installing app/net.stabyourself.nottetris2/x86_64/master
Pruning cache

➤ flatpak run net.stabyourself.nottetris2
Could not set video mode: X11 driver not configured with OpenGL
Error: [string "boot.lua"]:1: Could not set screen mode
stack traceback:
        [C]: in function 'assert'
        [string "boot.lua"]:1: in function <[string "boot.lua"]:1>
        [C]: in function 'xpcall'
yajo commented 3 years ago

I just rebuilt without cache, to see if that was the problem, but it fails equally. Here are the build logs, in case they tell you something: https://gist.github.com/Yajo/4d7d682cbcdf11e7367a8e8ed480a156

hollunder commented 3 years ago

Smart as I am I just forked it and started a port to Löve 11.3, figured it wouldn't take long. I have it starting and the menu is working but I can only agree with the initial assessment that the physics part is the problem. The API changed so much that someone would need to partially rewrite that. I say "someone" because I don't particularly enjoy programming physics.

yajo commented 3 years ago

Did you check https://github.com/Stabyourself/nottetris2/pull/1?

SJang1 commented 3 years ago

Just a note that this issue can handle the problem for Macs. As commented before ( https://github.com/Stabyourself/nottetris2/issues/2#issuecomment-680187925 ), from the macOS Catalina, x86 apps could not be started, and from late 2020, apple is now changing its architecture to Apple Silicon (ARM) and this would make x64 programs also not able to run anymore in the future. for this reason, it also needs to be available with Apple Silicon Macs... not only x64

hollunder commented 3 years ago

I've created a PR from what I have, simply to make it easier to find in case someone wants to continue work on it. https://github.com/Stabyourself/nottetris2/pull/3

SJang1 commented 3 years ago

For just an update: from now if you build Love from the source Love could run Love natively on apple silicon Mac devices. (Binary will be universal from Love 11.4) (https://github.com/love2d/love/issues/1690)

Cuteistfox commented 4 months ago

Any updates?

parkerlreed commented 4 months ago

Any updates?

Just randomly searched this again and apparently he has an updated repo.

https://github.com/Stabyourself/not-tetris-3

Haven't tested it yet.

erpel commented 4 months ago

It's working with love 11.5 but it's not "nottetris2" - It's something with balls instead of bricks. Very much not tetris, and also kind of fun, but very easy at the current state.

parkerlreed commented 4 months ago

Ahh thanks for checking! Thought it may have been an actual update, shame.

ryandesign commented 4 months ago

[Not Tetris 3 is] something with balls instead of bricks

@parkerlreed In its current rather unfinished form, Not Tetris 3 seems more like a "not" version of Puyo Puyo than Tetris.

The biggest problem is, that the old binary is not signed or 32 bit (don't remember which it was) but it does not run on current macOS anymore.

@erpel Signing is not necessary to run an app. The first problem is LÖVE 0.7.x was only released as a 32-bit binary. There are many additional problems after that with getting LÖVE 0.7.x working on modern systems, many of which were fixed in newer branches of LÖVE which of course doesn't help when we want to run a game that requires LÖVE 0.7.x.

I've backported the necessary fixes to get LÖVE 0.7.x (and newer versions) working on modern macOS and have added them to MacPorts, along with Not Tetris 2 and other Stabyourself.net games. Here's the list of LÖVE games now available in MacPorts. If you have any problem with those please let me know by filing a MacPorts bug report.