Dynamic Water Test (Lua)

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
User avatar
Zott
Vidmaster
Posts: 1659
Joined: Jul 1st '06, 21:14
Location: Earth
Contact:

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.
Attachments
Dynamic Water.zip
Dynamic Water Lua Test
(3.14 KiB) Downloaded 249 times
User avatar
interion
Cyborg
Posts: 331
Joined: Oct 20th '07, 18:34
Contact:

Is the script actually merged into the example map? Because nothing appears to be happening.
User avatar
Zott
Vidmaster
Posts: 1659
Joined: Jul 1st '06, 21:14
Location: Earth
Contact:

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.
User avatar
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.
Post Reply