I had this idea floating around in my head where Marathon's water 'flows' from high to low dynamically. Brushing up on Lua, I quickly realized two crucial problems:
1. Media is limited to polygons the player puts it in and shares properties amongst all of the same number.
Unavoidable, unless the mapper wishes to put down many variations of media like I've done in the example map. I'm considering summing the area of all polygons that use the same media number if I can figure out how to do that for the volume calculation. That should atleast prove slightly more realistic.
2. Media exists under polygons.
I am having trouble making media appear on the top of a moving platform while keeping the volume of media in the level consistent. I thought I could subtract media height from the floor height for some volume calculations, but for moving platforms, media may not always be above the floor like it realistically would. This is the biggest problem with my implementation so far. It looks pretty good if I ignore this problem.
I'm not that experienced at Lua so I was wondering if anybody had some solutions or might be interested in trying their own hand.
Dynamic Water Test (Lua)
- Attachments
-
- Dynamic Water.zip
- Dynamic Water Lua Test
- (3.14 KiB) Downloaded 300 times
Is the script actually merged into the example map? Because nothing appears to be happening.
The script is not merged because I wanted people to easily view the contents without having to unmerge the map. You have to select it as a solo-script.
- EatThePath
- Born on Board
- Posts: 25
- Joined: Mar 2nd '08, 17:09
- Contact:
This won't be much use to you probably as i'm horrible with this scripting sort of thing, but this idea is fantastic and for such an early execution is looking very promising. Please, for the love of god keep going.