# danqua

Member

6

111 Neutral

• Rank
Newbie

• Interests
Education
Programming
1. ## 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]
2. ## 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
3. ## 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
4. ## Unlimited Rendering vs 25 Updates a second

I got it working!   Thanks a lot to all of you.   My objects render method looks something like this: void Player::draw(float interpolation) { m_renderPosition.x = (m_currPosition.x - m_oldPosition.x) * interpolation + m_oldPosition.x; m_renderPosition.y = (m_currPosition.y - m_oldPosition.y) * interpolation + m_oldPosition.y; p_texture->draw(m_renderPosition.x, m_renderPosition.y, m_width, m_height); } The game loop and interpolation calculation I used is from deWiTTERS.
5. ## Unlimited Rendering vs 25 Updates a second

Okay thank you guys! I will try your approaches und post my progress.   @CC Ricers: SDL2 is hardware accelerated ;-) You can choose between software and hardware acceleration in your renderer.
6. ## Unity Unlimited Rendering vs 25 Updates a second

Hi Gamdev-Community,   this is my first post on this board, so i'm gonna introduce myself shortly: My name is Daniel and I'm a Computerscience-Student from Germany.   I stumbled upon a problem I couldn't find a solution for. I'm using the SDL2-Library and I try to accomplish a game loop that updates 25 times a second and renders as fast as the machine allows it to. I want the movements for my game objects as smooth as possible but I don't know how.   I made a graphic to show my problem.   [attachment=26011:smooth_render.jpg]   The upper graph shows the type of rendering I'm trying to achieve. The lower graph shows the actual result I get.       The idea is, when I set for example the speed of a game object to 5, it shouldn't jump from 0 to 5, but from {(0,1), (1, 2), ..., (4, 5)}. 25 times a second the object gets updated so every 25th of a second the object moves from its current position to (current position) + 5. But between every update it gets rendered as ofthen as the computer allows it to. And in this (rendering)time, it should move smoothly to the new position.   There must be an interpolation or something to achieve this. The problem  is that SDL only allows natural numbers (integer) for its x and y values on the screen. (No OpenGL suggestions please!)   I hope I made my point clear.   Greetings, Daniel