Author Topic: All we need is Löve  (Read 20068 times)

pcercuei (OP)

  • Posts: 1675
    • My devblog
Re: All we need is Löve
« Reply #20 on: May 14, 2014, 09:17:12 am »
Unfortunately it will not be playable on the Zero until I fix SDL2, there is a bug there that prevents the applications from receiving key presses...

andmatand

  • Posts: 11
Re: All we need is Löve
« Reply #21 on: May 14, 2014, 08:48:38 pm »
there is a bug there that prevents the applications from receiving key presses...

Due to some uncontrollable circumstances, you have lost motor control throughout your entire body. Luckily, your suit has backup AI!

;D

vonzippenstein

  • Posts: 49
    • vonzippenstein.com
Re: All we need is Löve
« Reply #22 on: May 28, 2014, 07:28:42 am »
How's that fix coming? Been a couple weeks and I'd love to use L?ve for the contest.

pcercuei (OP)

  • Posts: 1675
    • My devblog
Re: All we need is Löve
« Reply #23 on: May 28, 2014, 08:54:18 am »
It's been fixed, so we'll probably release a "developer" version of the firmware before the contest starts.

endercraft4

  • Posts: 35
Re: All we need is Löve
« Reply #24 on: August 07, 2014, 02:15:51 am »
Unfortunately it will not be playable on the Zero until I fix SDL2, there is a bug there that prevents the applications from receiving key presses...

I wondered why I am unable to use the keys in my love game!

Hacktivista

  • Posts: 2
Re: All we need is Löve
« Reply #25 on: August 28, 2014, 02:03:02 pm »
I registered just to tell you that I've updated mari0 to the last l?ve version. So I guess you can play it on the console.

Here is the source code: https://github.com/Hacktivista/mari0/
Here is the .love: https://github.com/Hacktivista/mari0/blob/master/mari0.love?raw=true

Hope you love it, heh.

zear

  • * Moderator
  • Posts: 2381
Re: All we need is Löve
« Reply #26 on: August 28, 2014, 04:01:40 pm »
I'm getting:
Code: [Select]
Error: main.lua:47: Could not decode image!
stack traceback:
        [C]: in function 'newImage'
        main.lua:47: in function 'load'
        [string "boot.lua"]:407: in function <[string "boot.lua"]:400>
        [C]: in function 'xpcall'
when I attempt to run the game via:
Code: [Select]
# love mari0.love
Is that how you are supposed to launch love games? This is my first time checking it out.

Edit:
Ok, it looks like it fails at loading icon.gif. If I change it to a png file, love2d proceeds further. I guess our SDL_image2 doesn't support gif (On a side note - using gifs for a game is a bad idea!).

Right now I am stuck at this error:
Code: [Select]
shader (4xBR) is fucked up, yo:
        Cannot compile pixel shader code:
0:1(10): error: GLSL 1.20 is not supported. Supported versions are: 1.00 ES

(...)

thread loaded music     castle
thread loaded music     castle-fast
thread loaded music     underwater
thread loaded music     underwater-fast
thread loaded music     starmusic
thread loaded music     starmusic-fast
Segmentation fault

Plus there are resolution issues - our SDL2 supports only 320x240 mode, while the game attempts to run at a higher resolution:

« Last Edit: August 28, 2014, 04:13:15 pm by zear »

mth

  • Posts: 317
Re: All we need is Löve
« Reply #27 on: August 28, 2014, 11:12:21 pm »
Ok, it looks like it fails at loading icon.gif. If I change it to a png file, love2d proceeds further. I guess our SDL_image2 doesn't support gif (On a side note - using gifs for a game is a bad idea!).

I checked the rootfs config and build logs and GIF support in SDL2_image is enabled. It also works with the "showimage" example program.

Edit: The "love" executable isn't linked to SDL2_image at all. Instead, it directly links to libjpeg and libpng, but not to any GIF decoding library. And there doesn't seem to be any GIF support in the source tree either, neither built in nor using an external library. So it looks like this version of L?ve doesn't have GIF support at all, no matter how you build it.

Plus there are resolution issues - our SDL2 supports only 320x240 mode, while the game attempts to run at a higher resolution:

This doesn't have to be a problem: if the application creates a fullscreen window while passing 0 as the width and height, it gets the native resolution of the screen (320x240 in our case). Then the following call can be used to draw to it like it's 640x480 or any other resolution you desire:
Code: [Select]
SDL_RenderSetLogicalSize(sdlRenderer, 640, 480);

I don't know how this is mapped through L?ve though: whether it is something that should be changed in the L?ve runtime or in the game.
« Last Edit: August 28, 2014, 11:35:17 pm by mth »

Hacktivista

  • Posts: 2
Re: All we need is Löve
« Reply #28 on: August 29, 2014, 03:46:37 am »
Well, I don't have the console, I'm running it on linux with no errors. If you can make it work, just attach the files and I will add it to the git :)

hakmanplayer

  • Posts: 38
Re: All we need is Löve
« Reply #29 on: August 29, 2014, 01:06:56 pm »
Hi guys,

For those who don't know it, L?ve is "an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X and Linux": https://love2d.org/

It now runs on the GCW Zero. To use it, just launch the .zip of your L?ve game (it has to be a .zip) with the OPK that can be dowloaded in the repo.

Find it on http://www.gcw-zero.com/downloads

I do not see the .opk file in the GCW ZERO downloads section  :o

mth

  • Posts: 317
Re: All we need is Löve
« Reply #30 on: August 29, 2014, 01:50:46 pm »
I do not see the .opk file in the GCW ZERO downloads section  :o

It was removed as a separate download because the 2014-08-20 firmware comes with L?ve included.

hakmanplayer

  • Posts: 38
Re: All we need is Löve
« Reply #31 on: August 29, 2014, 01:59:26 pm »
Sorry to be daft  ???...but... so now where may I get the .opk file?

Will love-0.9.1-linux-src.tar.gz suffice?? I am perplexed.




Cheers.

pcercuei (OP)

  • Posts: 1675
    • My devblog
Re: All we need is Löve
« Reply #32 on: August 29, 2014, 02:47:53 pm »
Sorry to be daft  ???...but... so now where may I get the .opk file?

Will love-0.9.1-linux-src.tar.gz suffice?? I am perplexed.
The people working on L?ve games can now create OPKs containing their game; there is no need for a separate OPK anymore.

hakmanplayer

  • Posts: 38
Re: All we need is Löve
« Reply #33 on: August 29, 2014, 02:54:16 pm »
Thank you for the reply pcercuel.

So I am lost on how or where to acquire the proper emulator?? I do want to play these gems so badly.

The original post cited the gcw repo, however, it was of no avail.


Noobie over n out.  ;D


Cheers!!

Aeter

  • Posts: 328
Re: All we need is Löve
« Reply #34 on: August 29, 2014, 02:58:10 pm »
As mentioned above the latest GCW0 firmware already has L?ve, so just update to the latest firmware and it will appear.
~cucullus non facit monachum~

mth

  • Posts: 317
Re: All we need is Löve
« Reply #35 on: August 29, 2014, 02:59:45 pm »
Sorry to be daft  ???...but... so now where may I get the .opk file?

There is no OPK file for L?ve anymore; if you have the 2014-08-20 firmware installed, you have L?ve installed.

To test L?ve games, you can create a small shell script that executes "love game.love" or "love game_dir/" and add that shell script as a link in gmenu2x.

For distribution, the game should be packaged inside an OPK together with the metadata and icon.

pcercuei (OP)

  • Posts: 1675
    • My devblog
Re: All we need is Löve
« Reply #36 on: August 29, 2014, 03:36:00 pm »
Well, I don't have the console, I'm running it on linux with no errors. If you can make it work, just attach the files and I will add it to the git :)

So I tested on the Zero. The shaders don't compile (as we're using the GLES branch), but that's not the problem. I get a segfault in libluajit after the "stabyourself" logo appears  :(
Also, only a small bit of the logo is visible in the lower right corner of the screen, the main.lua should be adapted to run in 320x240, I think.

vonzippenstein

  • Posts: 49
    • vonzippenstein.com
Re: All we need is Löve
« Reply #37 on: August 29, 2014, 08:50:18 pm »
Made a Tetris clone. It's something I originally put together a long while back. Over the last week made some improvements for the GCW-Zero like better randomization, an added score board, and the ability to speed up with button hold. If you make a highscore remember to enter in your initials before hitting start to save. Let me know if you find any bugs or have suggestions on how it could be improved or just want to look at the source and tell me that I can't script for spit. Hope you like it and thanks for playing.
http://vonzippenstein.com/gcwzero/love2d/vztetris.zip

Controls: d-pad to move blocks, B A L to rotate, X Y R to speed up, Start to pause and reset at game end. Select to quit.
« Last Edit: August 29, 2014, 08:54:11 pm by vonzippenstein »

ker

  • Posts: 620
Re: All we need is Löve
« Reply #38 on: August 30, 2014, 02:28:17 am »
Made a Tetris clone. It's something I originally put together a long while back. Over the last week made some improvements for the GCW-Zero like better randomization, an added score board, and the ability to speed up with button hold. If you make a highscore remember to enter in your initials before hitting start to save. Let me know if you find any bugs or have suggestions on how it could be improved or just want to look at the source and tell me that I can't script for spit. Hope you like it and thanks for playing.
http://vonzippenstein.com/gcwzero/love2d/vztetris.zip

Controls: d-pad to move blocks, B A L to rotate, X Y R to speed up, Start to pause and reset at game end. Select to quit.

It works pretty well. I don't appreciate anything when pressing X,Y or R.

I've uploaded an OPK version of the game to http://www.mediafire.com/download/aoe3rf782evau9w/vztetris.opk

Thank you for your contribution ;-)

vonzippenstein

  • Posts: 49
    • vonzippenstein.com
Re: All we need is Löve
« Reply #39 on: August 30, 2014, 05:15:31 am »
Thanks! I was wondering about how to construct a Love based game OPK. Haven't tried it and this is a perfect reference.

About the speed buttons. When you press and hold left, right, or down there's a wait timer between repeating that key. When you press and hold one of the speed buttons it significantly reduces that timer making piece control faster. If you can get up to level 20 the speed buttons become necessary since the pieces can make it to the bottom of the board before you could even get them to the left or right wall. Also reduces the wait time while holding down to quickly breeze through the first few levels.

Used to have the L button as speed but changed it to rotate so the game can be played one handed.
« Last Edit: August 30, 2014, 05:23:05 am by vonzippenstein »

 

Post a new topic
Post a new topic