Drastically Optimized Water Calculations
This took me 5 grueling hours to get the water optimized so that no matter how much water is in the game a terrible lag will not occur.
I don't know how many different tricks I attempted to use to optimize this. The culprit was setting a pixel for every change that happened in the water. Eventually I found the solution to be a simple one. The solution was to handle the colors of a vertical line and then manipulate that line through sf::sprite as needed. This was actually essential to fix because the water ruined the entire game with terrible lagging in a multiplayer connection.
Changes are updated in waterphysics.h right here: https://github.com/Happy-Flappy/Blupi-Empire/blob/main/waterphysics.h
By the way, for any coders out there wondering why there are so many spaces in my code: I have no idea :)
Get Blupi Empire
Blupi Empire
Planet Blupi And Speedy Eggbert merge together for a multiplayer battle!
Status | In development |
Author | Fishleteer |
Genre | Strategy |
Tags | blupi, blupi-empire, eggbert, Fangame, planet-blupi, speedy-eggbert |
Languages | English |
More posts
- Presentation 115 days ago
- Added Bombs!83 days ago
- GUI Where Players Join TogetherFeb 28, 2025
- Levels From Host To ClientsFeb 20, 2025
- Networking Multiplayer SupportFeb 18, 2025
- Level User ScriptFeb 12, 2025
- BoatsFeb 12, 2025
- Many EggbertsJan 28, 2025
- Sine Wave WaterJan 28, 2025
Leave a comment
Log in with itch.io to leave a comment.