10 years ago
by Jesse
Has anybody tried adding taller wall or multiple floor support to the TwoPointFive plugin? I have not tried yet but I'm wondering if somebody did it already. I'd like to see some blocks be taller (for buildings and fences) and still support smaller cubes (for bushes and crates)
I think I'm going to try to modify the level loading for TPF to use a for loop to load walls1,walls2, etc but I'm worried it will kill performance because I'm not fully familiar with how TPF and OpenGL 3D works and what it can handle.
pseudo code:
for (var i = 1; i <= 4; i++) {
layerName = "walls"+i
if ( layers[layerName] ) {
load this wall layer into 3d space
lastWall = i
}
layerName = "floor"+i
if ( layers[layerName] ) {
load this floor layer into 3d space
}
}
// then put ceiling above last loaded wall (using lastWall value)
10 years ago
by Render
Curious about this one too!
10 years ago
by davidg0
The best way is to add a model( like .obj )
Here is an open-source webgl game( include stair models, door models, monster models and weapon models ):
http://timeinvariant.github.io/gorescript/play
10 years ago
by fox1t
Quote from davidg0
The best way is to add a model( like .obj )
Here is an open-source webgl game( include stair models, door models, monster models and weapon models ): http://timeinvariant.github.io/gorescript/play
davidg0 can you be more precise about what do you mean with add a model. I am looking into this too.
10 years ago
by davidg0
Quote from fox1t
davidg0 can you be more precise about what do you mean with add a model. I am looking into this too.
OK. Like .obj and .blend. Just like a software blender(
http://www.blender.org/ )can build models.
Well, you can take a look at the game Gorescript, you'll know what a model is.
10 years ago
by Ripe
I was able to get variable heights into twopointfive by creating multiple walls layers (walls_0, walls_1) then I took the number value and times it by tilesize to get the z offset. I also repeated it for ceiling (so you can have variable height ceilings)
Here's a screenshot of the result:
http://imgur.com/64AJHD2
The solution is a bit flimsy because of the naming convention, I might use the ordering of layers instead. After I refine the code, I might fork the repo. I also want to create a skybox class.
10 years ago
by fox1t
Quote from Ripe
I was able to get variable heights into twopointfive by creating multiple walls layers (walls_0, walls_1) then I took the number value and times it by tilesize to get the z offset. I also repeated it for ceiling (so you can have variable height ceilings)
Here's a screenshot of the result: http://imgur.com/64AJHD2
The solution is a bit flimsy because of the naming convention, I might use the ordering of layers instead. After I refine the code, I might fork the repo. I also want to create a skybox class.
This is really a nice work and it is the same i am working on. I paused some weeks ago because of lack of the time. If you want you can create the repo and i'll surly contribute to it. I want to add also ladder support using the same technique.
Hi!
I am new here, experimenting a little bit with TwoPointFive and also very interested in seeing if it is possible to add more walls in the Y dimension, building taller rooms...
I am curious is anybody has figured out how to do this and if there are any directions on where to modify the code.
From a quick review of the stuff on github it looks like the code assembles the floor, wall and ceiling tiles into 'backgroundMaps' which then gets added to the tpf.CulledSectors object when a level is loaded so perhaps that's one place to modify it at least in terms of providing additional map files.
I am a little bit confused on the draw code. It looks like tpf.culledSectors handles this in the drawWorld() function:
##ig.system.renderer.pushMesh(visibleSectors[s].world)##
pushMesh seems to then grab the webGL rendering context and then calls 'drawArrays' on that...
is that too low level?
Wondering if anybody has some ideas
Thanks!
- J
Quote from Ripe
I was able to get variable heights into twopointfive by creating multiple walls layers (walls_0, walls_1) then I took the number value and times it by tilesize to get the z offset. I also repeated it for ceiling (so you can have variable height ceilings)
Here's a screenshot of the result: http://imgur.com/64AJHD2
The solution is a bit flimsy because of the naming convention, I might use the ordering of layers instead. After I refine the code, I might fork the repo. I also want to create a skybox class.
Hey, can you post the code changes? Can you do it as a fork to the official github (
https://github.com/phoboslab/twopointfive) ?
Page 1 of 1
« first
« previous
next ›
last »