Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
That 3d thing
#11
(04-28-2024, 12:25 AM)1micha.elok Wrote: Just put a dragon and it's already a Dungeon and a Dragon game  Big Grin
I saw that using s3d, it's possible to have different floor and ceiling texture depending on the room's theme. For example : King's bedroom has red floor and red ceiling, Ballroom has golden floor and golden ceiling, Kitchen has green floor and green ceiling etc 
..... Back to wolf3d, is it possible to have that kind of different floor and ceiling texture depending on each theme ? How to do it if it's possible ?  (sorry it's an out-of-topic question) ... Big Grin

In the engine and editor that i'm writing you can set a wall, floor and ceiling texture per sector (room). But you can also set individual textures per wall in the sector if you want.

I see that you currently use SetFloorTexture and SetCeilingTexture. They change the texture for all floor/ceiling tiles. You can use SetFloorTextureAt(tile_x, tile_z, img) and SetCeilingTextureAt(tile_x, tile_z, img) to change the floor/ceiling for individual tiles.

You can also use SetNorthWall(tile_x, tile_z, img), SetSouthWall(tile_x, tile_z, img), SetWestWall(tile_x, tile_z, img) and SetEastWall(tile_x, tile_z, img) to set textures for the individual wall sides of a tile.
Reply
#12
(04-28-2024, 12:05 PM)Marcus Wrote: ...
I see that you currently use SetFloorTexture and SetCeilingTexture. They change the texture for all floor/ceiling tiles. You can use SetFloorTextureAt(tile_x, tile_z, img) and SetCeilingTextureAt(tile_x, tile_z, img) to change the floor/ceiling for individual tiles.

You can also use SetNorthWall(tile_x, tile_z, img), SetSouthWall(tile_x, tile_z, img), SetWestWall(tile_x, tile_z, img) and SetEastWall(tile_x, tile_z, img) to set textures for the individual wall sides of a tile.
...

Different Room Theme

   
click image to zoom in

Now, it is possible to have different room theme in wolf3d too ! Thanx, Marcus !

maze.txt
Code:
[[1,1,1,1,1,1,1],
[1,0,0,0,0,0,1],
[1,0,1,1,0,1,1],
[1,0,1,2,3,2,2],
[1,0,1,2,3,3,2],
[1,9,1,2,3,3,2],
[1,1,1,2,2,2,2]]

include wolf3d.n7
Code:
' tileset
tile            = []

tile.wall       = loadimage("data/wall.png")
tile.floor1     = loadimage("data/floor.png")
tile.ceiling1   = loadimage("data/ceiling.png")

tile.wall3      = loadimage("data/wall3.png")
tile.floor3     = loadimage("data/floor3.png")
tile.ceiling3   = loadimage("data/ceiling3.png")

'maze from json file
map = JSON_FromFile("data/maze.txt")

'set tileset
w3d.SetFloorTexture(tile.floor1)
w3d.SetCeilingTexture(tile.ceiling1)
for z = 0 to 7-1
    for x = 0 to 7-1
        select map[z][x]
            case 1
                w3d.SetWall(x, z, tile.wall)
            case 2
                w3d.SetWall(x, z, tile.wall3)   
            case 3
                w3d.SetFloorTextureAt(x,z,tile.floor3)
                w3d.SetCeilingTextureAt(x,z,tile.ceiling3)
            case 9
                player.x = x + 0.5
                player.z = z + 0.5
        endsel
    next
next
Reply
#13
Of course my first game using the 3d thing will be a sequel to robowack. So I just modeled the first and simplest enemy, the Spinner.

https://naalaa.com/tmp/spinners.mp4, https://naalaa.com/tmp/more_spinners.mp4

In the original version I used pre-rendered sprites.

https://naalaa.com/forum/thread-13.html
Reply
#14
I thought those beasties looked familiar... Yikes! Cool...
Logic is the beginning of wisdom.
Reply
#15
It would be awesome 

Cool
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)