Page 1 of 2

Balloon Adventure

Posted: Sat Jul 02, 2022 1:00 am
by BoonyBuny
image_2022-07-02_025850640.png
image_2022-07-02_025850640.png (369.36 KiB) Viewed 3902 times
I'm glad to announce my first semi-serious game, still very silly.

It's a silly quick project I made in about a week, the goal was to learn different ways to make gameplay, backgrounds and of course the dreaded filesystem (I used the old love.filesystem.exists() tho)

here's all the links:
Source Code Balloon Adventure.zip
Source code
(3.68 MiB) Downloaded 153 times
Balloon Adventure.zip
compiled .exe file
(7.8 MiB) Downloaded 142 times

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 8:20 am
by Andlac028
BoonyBuny wrote: Sat Jul 02, 2022 1:00 am I used the old love.filesystem.exists() tho
It seems like it will be re-added in Love 12.0, as it is faster then getInfo if you only want to know, if it exists. See this commit

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 12:23 pm
by ReFreezed
Cute. I like the speedy bird. :P

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 1:34 pm
by BoonyBuny
Andlac028 wrote: Sat Jul 02, 2022 8:20 am
BoonyBuny wrote: Sat Jul 02, 2022 1:00 am I used the old love.filesystem.exists() tho
It seems like it will be re-added in Love 12.0, as it is faster then getInfo if you only want to know, if it exists. See this commit
neat! I just used it in my love.load() that just checks if data.txt exists, if not, write 0 to all scores

just to prevent crashes at launch

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 1:35 pm
by BoonyBuny
ReFreezed wrote: Sat Jul 02, 2022 12:23 pm Cute. I like the speedy bird. :P
Ey thanks! don't hesitate to send feedbacks :p

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 2:17 pm
by pgimeno
I have a few problems. I couldn't even start. My screen is 1280x1024; it starts in fullscreen with a wider resolution, and part of the text goes off the screen. There's also no obvious key to exit: ESC, Ctrl+Q and Ctrl+C didn't do anything.

Fortunately I've configured my window manager to add a key to close the window, but many Linux users won't have that, and might be forced to restart the machine.

So I'd suggest to:
  • make fullscreen an option, disabled by default;
  • manage resolutions;
  • allow ESC to close the intro screen
The deprecation warning can be disabled with love.setDeprecationOutput, by the way.

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 3:57 pm
by BoonyBuny
pgimeno wrote: Sat Jul 02, 2022 2:17 pm I have a few problems. I couldn't even start. My screen is 1280x1024; it starts in fullscreen with a wider resolution, and part of the text goes off the screen. There's also no obvious key to exit: ESC, Ctrl+Q and Ctrl+C didn't do anything.

Fortunately I've configured my window manager to add a key to close the window, but many Linux users won't have that, and might be forced to restart the machine.

So I'd suggest to:
  • make fullscreen an option, disabled by default;
  • manage resolutions;
  • allow ESC to close the intro screen
The deprecation warning can be disabled with love.setDeprecationOutput, by the way.
fullscreen is on by default but F11 disables it ! sry, i dont know how to make auto-managing screen resolutions yet, it's still a test game to learn

default resolution is 1920x1080

and thanks for that love.setDeprecationOutput code!

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 4:51 pm
by GVovkiv
make auto-managing screen resolutions
Someone say SCREEN RESOLUTION? :awesome:
check my signature, might help with that, hah.

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 5:32 pm
by BoonyBuny
GVovkiv wrote: Sat Jul 02, 2022 4:51 pm
make auto-managing screen resolutions
Someone say SCREEN RESOLUTION? :awesome:
check my signature, might help with that, hah.
I will check them out, noted

Re: Balloon Adventure

Posted: Sat Jul 02, 2022 6:00 pm
by pgimeno
Well, a quick and dirty solution that worked for me was to add this at the beginning of love.draw():

Code: Select all

  local scale = math.min(love.graphics.getWidth()/1920, love.graphics.getHeight()/1080)
  love.graphics.scale(scale)
Also, making the window resizeable should be no problem.

I've taken a quick look into the code because the first time I press F11 it does nothing. That's because of a problem with the scope of a variable. You declare fullscreen as local inside love.load(), and then use it in love.keypressed, but since it's local to love.load, what love.keypressed actually accesses is the global variable fullscreen, which defaults to nil which is equivalent to false when negated. The fix is to move it from love.load to the top of the file:

Code: Select all

local fullscreen, fstype = true, "desktop"

function love.load()
    love.window.setFullscreen(fullscreen, fstype)
    ...
At least I could play. It's quite difficult, I could only collect 1 coin :)