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

Upgrade engine to OpenGL ES 2.0 #331

Draft
wants to merge 86 commits into
base: master
Choose a base branch
from
Draft

Upgrade engine to OpenGL ES 2.0 #331

wants to merge 86 commits into from

Conversation

Reco1I
Copy link
Contributor

@Reco1I Reco1I commented Feb 15, 2024

In this PR I replacing the old AndEngine module which was based on OpenGL ES 1.0 branch to the OpenGL ES 2.0 implementation of the same engine.
There's some modifications that were re-applied to the engine as well recovery of removed features.

Benefits of the upgrade:

  • Shader-based effects, closes Slider gradient integration. #330
  • Sligth improvement of performance in some modern devices. OpenGL ES 2.0 has an improved graphics pipeline and a better memory management when it comes to buffering.
  • Modern and chances to upgrade to OpenGL ES 3.0 in the future (I don't think it would be necessary).

The PR is currently on WIP, I'm working on port things to it. Consider this as a second attempt as the original upgrade was intended and tested with the old rimu! code base which had positive results.

Some notes about modifications made in the module besides the upgrade:

UPDATED 21/3
Things pending to be fixed in order to set this PR as ready:

  • Sliders body quad overlapping wedges are visible in sliders with complex paths.
  • Storyboard is partially broken.
  • Particles doesn't show with certain blending functions, this includes Kiai particles in MainScene and CursorTrail particles.
    Fixed with f8aeca5
  • Some score text sprites have wrong sizes between textures
    Fixed with 3ce12d7
  • When focusing the game from being in background sliders and video stops working, this may be due to the custom shaders those elements use.
    Fixed with 62e4f30
  • Support blending in the new particles system.
    Fixed with 1eb4d63
  • Slider body rendering is completly removed due to uncompatibility, we should consider introduce newer slider rendering.
    Fixed starting from cb177b8
  • Sometimes (happens weirdly) the VBO for texts produces an IOOBE, this require further investigation because it can be an engine bug.
    Fixed with 1918204
  • Sometimes approach circles appears with full opacity by small time before the circle shows.
    Fixed with 7effdd9 (needs further testing).
  • Classic spinner doesn't clip the metre sprite properly.
    Fixed with 28bf98e
  • Blinking loading icon at game start.
    Fixed with 93dca14
  • Video is not working.
    Fixed with ee9a6a8

For reviewers:

  • Commit 2e10760 corresponds to the module change and re-addition of some missing features from the old module. No relevant changes were made here and of course, the project is not compilable here.
  • Commits 3e0f9e9 to f0ebbe5 corresponds to some additional changes and recovery of missing features.
  • Commit eeb901f and newer corresponds to actual game changes adopting the new engine module, most of them are just imports refactors. At this point the project is now compilable and playable.

@Acivev
Copy link
Member

Acivev commented Feb 15, 2024

its still missing some files, like here utils/adt/io

@Reco1I
Copy link
Contributor Author

Reco1I commented Feb 15, 2024

its still missing some files, like here utils/adt/io

Thanks to point that, I don't know why that is missing since I downloaded the repository from there.

@ammarasyad
Copy link
Contributor

Well this is a surprise.

@Acivev
Copy link
Member

Acivev commented Feb 18, 2024

since i researched, it's advisable to utilize the AndEngineAnchorCenter instead of the Gles2 branch, as it represents the latest and greatest. May you can look if its right but my guess it is^^

@Reco1I
Copy link
Contributor Author

Reco1I commented Feb 18, 2024

since i researched, it's advisable to utilize the AndEngineAnchorCenter instead of the Gles2 branch, as it represents the latest and greatest. May you can look if its right but my guess it is^^

Upgrade to GLES2-AnchorCenter branch requires a major effort because the entity origin (anchor) being the center isn't the only change there. It also changes the whole coordinate system origin from lower-bottom-left to upper-top-left, that is, we have to flip coordinates when placing object as well when calculating vertices for sliders.

And personally I don't think it is the "greatest" since it just only introduces an offset/origin system as difference from the previous. Both are using OpenGL ES 2.0.

@Reco1I Reco1I marked this pull request as ready for review March 3, 2024 16:45
@Reco1I Reco1I mentioned this pull request Mar 7, 2024
1 task
@Reco1I Reco1I marked this pull request as draft March 19, 2024 12:44
# Conflicts:
#	src/com/edlplan/osu/support/slider/SliderBody2D.java
#	src/com/edlplan/ui/fragment/FilterMenuFragment.kt
#	src/com/reco1l/legacy/ui/entity/BeatmapButton.kt
#	src/com/reco1l/legacy/ui/multiplayer/RoomScene.kt
#	src/ru/nsu/ccfit/zuev/osu/LibraryManager.java
#	src/ru/nsu/ccfit/zuev/osu/MainActivity.java
#	src/ru/nsu/ccfit/zuev/osu/MainScene.java
#	src/ru/nsu/ccfit/zuev/osu/async/SyncTaskManager.java
#	src/ru/nsu/ccfit/zuev/osu/game/FollowTrack.java
#	src/ru/nsu/ccfit/zuev/osu/game/GameEffect.java
#	src/ru/nsu/ccfit/zuev/osu/game/GameScene.java
#	src/ru/nsu/ccfit/zuev/osu/game/ModernSpinner.java
#	src/ru/nsu/ccfit/zuev/osu/game/Slider.java
#	src/ru/nsu/ccfit/zuev/osu/game/Spinner.java
#	src/ru/nsu/ccfit/zuev/osu/menu/MenuItemTrack.java
#	src/ru/nsu/ccfit/zuev/osu/menu/ModMenu.java
#	src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java
#	src/ru/nsu/ccfit/zuev/osu/menu/SplashScene.java
#	src/ru/nsu/ccfit/zuev/osu/scoring/ScoringScene.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slider gradient integration.
3 participants