After trying out perspective and various stuff with a raycasting engine, i've decided to learn pure 3d with the help of groverburger's awesome g3d library.
My first goal consists in rendering a simple environment based on a tilemap (a WxH grid with indexes representing walls or floor with different textures) and i've noticed that if the map is too big the FPS will drop (in a 2d map i'd simply draw the visible tiles).
Since i'm new to 3d stuff in general i'm asking you a couple of silly questions:
- How can i render only visible models/tiles?
- What is the best way to draw tile-based maps? At the moment i'm using the same cube model for walls (translated for each tile) and the same square model for the floor, but i've noticed that for walls sometimes i can see strange artifacts. Is there any better option?
Thank you in advance
PS: cubes aren't really cubes because i was too lazy to write the bottom and top face
EDIT: for the first question i've seriously considered raycasting, but there must be a better option, right? And by the way raycasting on large maps will still slow down the whole thing