Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to LÖVE 11 & revive DLC downloads #392

Merged
merged 88 commits into from
Nov 4, 2023
Merged

Conversation

qixils
Copy link
Collaborator

@qixils qixils commented May 6, 2022

along with updating the game to LÖVE 11.4:

  • added an .editorconfig to enforce consistent spacing (tabs with a width of 4)
    • the width was based off of what seems to be the most common spacing in the project
    • a couple files still accidentally use spaces in a couple places although i did not fix those as i didn't want to make the diff excessively large
  • the names given to dev builds have been changed to be less obnoxious (since i somehow never noticed in my original PR that all the auto-generated names were kinda silly)
  • added the lua-https module and wired up the DLC system to it using data from https://github.com/qixils/mari0pository

known regressions:

  • configs are saved/loaded in 0..1 format instead of 0..255
  • custom character colors cannot be modified in the settings (they get saved to & loaded from disk but for some reason don't actually apply to the characters?? no idea why ngl). in fact their rendering is very broken in general
  • when exiting the pause menu, the music plays from the beginning instead of resuming from where it left off fixed
  • mario's legs are broken by default (he can't jump); seems to be an issue with the default config as rebinding the jump key fixes the issue. was an issue from the 1.6(.2) -> a99e config import process; see here for a detailed explanation
  • makelove (the software which generates the dev builds) has not yet been updated for 11.4 (Support for love 11.4? pfirsich/makelove#24) which means the dev builds are broken lib has been updated
    • updating it to 11.4 myself doesn't seem too hard; i'd mostly just need to hack the appimage build script into working
    • if attempts to update makelove fail then i could try some other options like love-packager
  • a few shaders are broken updated
  • background level colors are loaded incorrectly
  • android builds added and tested

note that there are some issues with broken PNGs (as LÖVE 11 now checks for PNG errors) which are fixed by #486 (thus this PR should be merged only after that PR)

qixils added 15 commits May 3, 2022 18:51
probably should've realized earlier that these are dumb lol
From the LÖVE 11.0 changelog:

> Deprecated love.filesystem.exists / isFile / isDirectory / isSymlink / getLastModified / getSize (use love.filesystem.getInfo instead).

This commit replaces usage of the deprecated methods with getInfo, bumps the version of LÖVE used by the game to 11.4 (the current latest version), and cleans up some miscellaneous code.
was deprecated in LÖVE 0.10.2 and removed in 11.0

> Removed love.window.isCreated (use love.window.isOpen instead).
apparently enums are just represented by strings? /shrug
Explicitly set the audio source type to "stream", the previous default, where otherwise unspecified.

> Removed the default source type for love.audio.newSource.
per the LÖVE 11.0 changelog:

> Removed Source:isStopped and Source:isPaused. Use Source:isPlaying instead.
per the LÖVE 11.0 changelog:

> Removed Source:rewind. Use Source:stop or Source:seek(0) instead.
per the LÖVE 11.0 changelog:

> Removed Source:resume and love.audio.resume. Use Source:play and love.audio.play instead.
further reading of the LÖVE 11.0 changelog shows this is no longer necessary

> Changed Sources to either be playing or not playing, rather than playing, paused, or stopped. Source:stop now pauses and rewinds the Source.
Per the LÖVE 11.0 changelog:

> Removed SpriteBatch:setBufferSize, spritebatches now automatically grow when they run out of space.
Per the LÖVE 11.0 changelog:

> Removed Image:getData and Image:refresh, use Image:replacePixels instead.

Their recommended suggestion is rather unhelpful here, though further reading of the documentation shows that you're now supposed to save the reference to ImageData if you need it, so I created a duplicate of the `imagestable` table but for the original ImageData objects
Per the LÖVE 11.0 changelog:

> Removed [love.graphics.newScreenshot](https://love2d.org/wiki/love.graphics.newScreenshot), use [love.graphics.captureScreenshot](https://love2d.org/wiki/love.graphics.captureScreenshot) instead.
spacing was inconsistent throughout files and tripping up my IDE. looks from a glance like tabs are the most used
Fixes some issues introduced in a previous commit, namely the usage of the wrong path for newImageData and wrong object for some debris calculations
@alesan99 alesan99 added the change An existing feature should be tweaked label May 9, 2022
Per the LÖVE 11.0 changelog:

> Changed all color values to be in the range 0-1, rather than 0-255.

All internal color values have been updated, which largely means that they are now divided by 255.

 In a future commit, it may be worth using decimal approximations to tidy up the code, as the `/255`s are rather unsightly. However, this would technically lead to the colors of some objects being ever so slightly changed. To avoid potentially undesirable behavior, the only legacy numbers to be replaced with decimals are 127 (0.5), 128 (0.5), and 255 (1.0). Instances of 127 which may have caused issues with community content were left intact as `127/255`.

 This commit also fixes some miscellaneous issues, namely sounds using `.isPlaying()` instead of `:isPlaying`.

 Known regressions:
 - Configs from older versions of the game which used 0..255 colors are not yet automatically updated.
 - When exiting the pause menu, the music plays from the beginning instead of resuming.
 - Custom character colors cannot be modified in the settings.
Ideally this would be done when loading the custom enemy JSON but I honestly could not be arsed to find that
probably my best commit message ever

1.6(.2?) uses "space" for the spacebar while a99e uses " " which resulted in mario being unable to jump if the player played 1.6(.2?) before playing a99e
now saves the sounds that were paused so they can be unpaused when resuming play
@qixils qixils marked this pull request as ready for review July 7, 2023 01:34
@qixils
Copy link
Collaborator Author

qixils commented Jul 7, 2023

Added the lua-https module. Tested successfully on Windows, macOSX, Linux, and Android.

I really tried building this for ARM64 but I couldn't manage it
Probably not much harm in just waiting for LÖVE 12 to support it...
@qixils
Copy link
Collaborator Author

qixils commented Oct 31, 2023

This PR will resolve the issue of AE being uninstallable on Android 14+.

@qixils qixils changed the title update to LÖVE 11 Update to LÖVE 11 & revive DLC downloads Nov 3, 2023
@qixils
Copy link
Collaborator Author

qixils commented Nov 3, 2023

I have revived the DLC download system! Its data is now backed by an open source project, https://github.com/qixils/mari0pository. Over the coming days I'll be migrating all the old DLC data over to this project, uploading mappacks to my personal Cloudflare R2 for distribution as necessary. In the future I'll enable downloading and mounting custom characters as well. The feature works across all platforms, including Android.

@alesan99 alesan99 merged commit ee214db into alesan99:master Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change An existing feature should be tweaked new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants