# danqua

Member

7

111 Neutral

• Rank
Newbie

• Interests
Education
Programming
1. ## How to update and render an 2D endless runner that goes bothways

Another approach could be that you generate the N+1 screen in advance when you reach the N screen with your camera ( + threshhold) and put it right next to the currently drawn screen. Just as @Prototype mentioned, you could store the world information of a screen inside a hash table, this way you could determine an absolute camera offset (index) corresponding to an entry inside the table. In your update loop you could check if the N+1 screen is already stored, otherwise generate a new one. If the player moves back just use the previous screen (n-1). | 0 | 1 | .. | camera position (N) | N+1
2. ## Quake MAP files to (indexed) vertices

Oh, sorry. I didn't want to be rude. No, just like I said there are still 20% which tackle the problem. @Zakwayda you've made some good points mentioning the error. I didn't had that in mind. I stumbled upon this reddit post as well, but it was very early in my developing stages. @fastcall22 thanks for the explanation. I will get more into the math regarding the links you've posted. Actually linear algebra isn't the problem but 3Blue1Brown is still a pretty good youtube channel. Watched all of his DL videos [/offtopic]
3. ## Quake MAP files to (indexed) vertices

Of course hash map is the answer to almost every problem : ) I will keep that in mind when I got the plane to vertex thing right. @KKTHXBYE 80% of your code doesn't really relate to my problem. I don't have any problems parsing the map file. My Problem is to get my mind wrapped around the plane to vertex vertices conversion. Just like I mentioned in my post (have a look at the animation). But I will get a closer look at your code when you actually //Test each face against another face then find intersection To be clear, I would like to have a more mathematically/algorithmically explanation to fully understand the problem instead of just let you guys write the code for me
4. ## 3D Quake MAP files to (indexed) vertices

Hi everyone, currently I'm pretty desperate in figuring out how to translate planes from map files (quake/half-life) into (indexed) triangles. Most of the information about map files I got from Valve Developer Community [1]. I'm also aware of Stefan Hajnoczi's documentation [2], but it is not well written enough for me to understand. I have freshen up my linear algebra knowledge about planes from Points, lines, and planes [3] and Wikipedia [4] and I got a pretty good understanding about how to transform three points into a plane, to get Ax + By + Cz + D = 0 where (A B C) is the vector normal of the plane and D is the distance from the origin. I also know how to calculate the intersection of two / three planes. I used a similar code like Stefan to achieve this. The thing with Stefan's code is, that I am trying to achieve a different approach not by using linked lists (that's what he's using). I want to solve this problem in my coding convention and fully understand the mathematical problem in order to implement it correctly (and be able to modify/optimize it). I thought of a similar procedure as it says on Valve's documentation (see figure [5]). What am I missing in order to build the cube? What are the single steps to achieve this? I think I only need a little poke to get me in the right direction. Any further sources are greatly appreciated. I looked up source code from e.g. Trenchbroom and other projects on github, but I just want a simple solution to get more into detail like texture mapping etc. Best regards, Daniel References [1] https://developer.valvesoftware.com/wiki/Valve_Map_Format [2] https://github.com/stefanha/map-files [3] http://paulbourke.net/geometry/pointlineplane/ [4] https://en.wikipedia.org/wiki/Plane_(geometry) [5] https://developer.valvesoftware.com/w/images/0/0d/Brush_planes.gif