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
- Levels From Host To Clients1 day ago
- Networking Multiplayer Support4 days ago
- Level User Script9 days ago
- Boats9 days ago
- Many Eggberts24 days ago
- Sine Wave Water24 days ago
- Animation System24 days ago
- Angles Derived From Pixels24 days ago
Leave a comment
Log in with itch.io to leave a comment.