issues
search
AdRoll
/
rustenstein
Wolfenstein 3D port written in Rust
https://tech.nextroll.com/blog/dev/2022/02/02/rustenstein.html
MIT License
230
stars
9
forks
source link
Display scaled sprites of static objects
#17
Open
facundoolano
opened
2 years ago
facundoolano
commented
2 years ago
load a list of static objects from the map into the game (this is necessary because it can change: items dropped or picked up) (spotvis in wolf4sdl)
object should have both view xy and tile xy
update raycaster to mark all visible tiles in a boolean matrix
for each static object:
check if is visible from raycaster output matrix
if it is, calculate height based on distance to player (TransformTile in wolf4sdl)
port ScaleShape (similar to already ported simple_scale_shape)
pass ray hits to get wall heights (aka occlusion array)
only draw a given pixel column when sprite height > wall height at that x coordinate