General > User modifications
UFO:AI Android port
bayo:
rasterising a map, and allow to play it is imo a very big computation problem. No idea if it is possible.
BTW have you test to reduce texture sieze ? 1x1 32x32 pixels? can it help old card to work? A little script can do the job if it is need.
IMO your alien base looks quite simple and nice.
pelya:
So, did anyone succeed running this? I still cannot push to the Ufoai Git :( also I've found more bugs in my code, need time to fix them though.
--- Quote from: bayo on January 14, 2011, 03:41:26 pm ---rasterising a map, and allow to play it is imo a very big computation problem. No idea if it is possible.
--- End quote ---
That seem not that complicated if we'll just use OpenGL - from the map editor render each map tile to an off-screen surface or even to the screen (I mean big tile, like dropship or UFO), then get the resulting image and Z-buffer values using glReadPixels(). Then for each individual small tile, where soldiers will stand, check Z-buffer value and determine if there are any pixels that will cover the soldier, and also save that "visibility" images.
Then repeat for each floor level.
Those big tiles can be combined on-the-fly into an isometric game level just like you're doing that in 3D (but you'll have to combine "visibility" images on the tile borders, not that complicated too).
When rendering the soldiers there are two ways:
1. Draw the background to the near Z-Buffer plane. Then for each soldier, sorted from top to bottom:
Disable Z-Buffer check.
Render soldier 3-D model onto the background, so it will make a depth "hole" in Z-Buffer.
Enable Z-buffer check
Draw the "visibility" image with some alpha-blend value to the near Z-Buffer plane, that will make soldier model half-transparent but other background pixels will not change, because it will be applied only to a "hole" in Z-Buffer.
This will also fill the "hole" in the Z-buffer, so when you'll render next soldier which will be close to the previous one the "visibility" image will not be applied twice on the first soldier.
2. Draw the background to the far Z-Buffer plane. Then for each soldier, sorted from top to bottom:
Render soldier 3-D model normally.
Call glAlphaFunc() so only non-transparent pixels will modify Z-Buffer.
Draw the "visibility" image right before soldier with some alpha-blend value, that will make soldier model half-transparent, but will not change background pixels 'cause they have the same value.
If two soldiers will stand near each other the "visibility" image from the second one may be applied to the first one, and this will create drawing artifacts.
That sounds easy, but require lot of developer time and small details sorted out.
Edit: I've made another build, with slightly less memory usage - it uses just 170 Mb with loaded main menu.
bayo:
There is some more thing to do for translucent and destructible surfaces (and maybe more?). But using zbuffer looks very interesting. But according to the fact that our top-down radar "feature" is waiting for a real autogen tool, i dont think wev got skill to do it, or no body take care about it.
pelya:
So, we DO have destructible surfaces? :o
Kildor:
a bit of.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version