space_cadet

Members
  • Content count

    27
  • Joined

  • Last visited

Community Reputation

143 Neutral

About space_cadet

  • Rank
    Member
  1. Hi,   the last couple of months I've been spending my weekends developing a retro-style starfield-themed wallpaper. I've been pestering people here with questions (like this one and this one), but I finally published the application to the market. It is entirely free, does not contain ads of any kind and it does not require any permissions. I'd be happy to hear your opinion!    https://play.google.com/store/apps/details?id=de.parango.starfield   [url=http://imgur.com/0Kwx6Lv][/URL]   [url=http://imgur.com/AEpzGS6][/URL]   Download it @ Google Play:  
  2. I know this thread is a month old, but I have invested serious thought and work into the project, and I'd like to post an update to show that I aprecciate your answers, and to help other people with similar issues.     PROFILING           I believe that you have a very good point here; I have mostly been "optimizing blindly", which is considered bad practice. I have tried / considered the following options:     1. Android SDK Tools: the profiler shipped with the SDK shows CPU time, but not GPU time. Also, it profiles my own application, but I would like to see what's going on in the whole system. Google has recognized this and published a tool for system-wide profiling called systrace, but it's only available for Jelly Bean. The same goes for dumpsys gfxinfo which in combination with the Jelly Bean developer option "Profile GPU Rendering" outputs a stat about how much time is spent processing, drawing and swapping UI. See Chet Haase and Guy Romain's excellent presentation about Android UI performance for more information about those tools. For me, they are not an option, I am stuck with Honeycomb for various reasons.       2. Log output: yes I know it is stone age, but I thought it would be interesting to see how much time my application spends in my move() (CPU) and draw() (GPU) methods. The results are not very conclusive; I guess this has to to with multithreading and the way Android handles vsync.     3. NVIDIA Tools: there is a tool for Tegra 2 platforms called PerfHUD ES that looks very promising: detailed information about draw calls and lots of other GPU-related information. I am currently trying to get this running on honeycomb. Any help aprecciated.     OPTIMIZING             Both of your options seem very reasonable approaches to take. I decided to implement option 2 first. The OpenGL ES specification calls this method "Dynamic Indexing".  It took me an hour to rearrange my application accordingly, and a whole day to find out how to get hold of the vertex index inside the shader and use it to address my transformation matrices. It's not straightforward on OpenGL ES 2.0 because for some fucking reason they decided to leave out the crucial gl_VertexID variable there. Sorry, but this tiny little detail really drove me mad. Anyways, the solution is quite simple, once you know how to do it. Anton Holmquist has a short, to-the-point blog post about it, which I wish I'd found earlier.   The one big drawback about this method is, like you pointed out, the limited uniform space. For those who don't have a clue what that is (like I did): it is the space available for declaring uniform variables in the shader. I read somewhere that this space relates to the amount / size of registers the GPU has - correct me if I'm wrong here. For anyone interested, calling glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS) will return a number that says how much uniform space you have on your system. The specification for OpenGL ES 2.0 says it has to be at least 128. The number is expressed in vectors, and since each matrix has 4 vectors, that means you could declare a maximum of 32 matrix variables or, in my case, two arrays of 16 matrices. In other words, I can batch a maximum of 16 cubes now.      NEXT   Dynamic indexing has certainly improved performance, but I am not entirely happy yet. I will implement the abovementioned option 1, hoping to improve performance by shifting work from the GPU to the CPU and, as a next step, parallize the move() and draw() operations.
  3. Hi,   has anyone managed to run Nvidia's PerfHUD ES on Galaxy Tab 10.1?   I have come to the conclusion that the instrumented drivers need to be copied to /system/lib/egl on the device, then egl.cfg (in the same directory) must be modified accordingly. There is a site that offers these library files for Froyo and Gingerbread, but not for Honeycomb. I tried downloading the Tegra Android Honeycomb (3.2) OS Image from Nvidia's Website and take the driver files from there but I failed extracting the system.img file. Anyway, I'm not sure these 3.2 files would be compatible with my 3.1 system.   Any ideas?  
  4. [quote name='Hodgman' timestamp='1353758793' post='5003722']That said, a solution will probably involve call glDraw less often than once-per-cube.[/quote] True, but [i]how[/i] ? Since every cube needs its own scaling, rotation and translation, how can I combine glDrawArrays() calls?
  5. Hi, I am trying to simulate a starfield of rotating cubes moving towards the user: [img]http://i.imgur.com/7d9zu.png[/img] I am struggling to maintain a smooth animation on Android. I can't see why a Dual-core 1 GHz Cortex-A9 with a ULP GeForce GPU should not be able to do that. Here's what I do: INITIALIZATION: - Create a VBO containing 36 cube position vertices and 36 cube normal vertices, interleaved - Set up a simple shader that takes positions, normals, color, MV matrix, MVP matrix, light position - Connect the VBO to the shader's position and normal attribute respectively EACH FRAME: a] Movement (for each cube) - calculate scaling matrix, rotation matrix A, translation matrix, rotation matrix B - multiply all of the above matrices to obtain model matrix - multiply model matrix and view matrix to obtain MV matrix - multiply MV matrix and projection matrix to obtain MVP matrix b] Draw (for each cube) - hook up cube's MV matrix with shader (glUniformMatrix4fv) - hook up cube's MVP matrix with shader (glUniformMatrix4fv) - hook up cube's color constant with shader (glVertexAttrib4f) - draw cube (glDrawArrays) I have done a lot of profiling and timing analyzation, so I don't think I have any unintended performance leaks in my code. Rather, I believe there is a more general design flaw, and I hope someone can help me improve it.
  6. [quote name='Lightness1024' timestamp='1347020293' post='4977586'] just keep your point method, and multiply the result by 0.9 or something so that you effectiveley increase the virtual size of your screen and the cubes will pop away after they pass the border region. [/quote] No, I believe that would not work properly for all cases. [quote name='Seabolt' timestamp='1347029439' post='4977655'] Well if you're using only cubes, you can just check based on the center plus half the width of a face, making it a pseudo bounding sphere check. [/quote] I think it would have to be [i]diagonal / 2[/i], but in principle, that is what I had in mind. But how much is [i]diagonal / 2[/i] in normalized device coordinates? [quote name='Lauris Kaplinski' timestamp='1347025073' post='4977619'] What's wrong with the following method? [/quote] Actually, I think you may be right. I thought the distance calculation was a bit expensive, but I had a closer look and it's just a few multiplications and additions.
  7. I am implementing a screensaver - a starfield made out of cubes that move towards the viewer in 3D space: [attachment=11138:screenshot.png] I place the camera away from the origin along the z-axis, generate the cube objects at the origin with random x and y values, and move the cubes towards the viewer along the z-axis. Naturally, the more cubes I have, the more calculations I have to perform. Therefore I would like to reset any cube as soon as it is outside the screen boundaries, so I can reuse it and restart it at the origin. I have read [url="http://www.lighthouse3d.com/tutorials/view-frustum-culling/"]lighthouse3d's excellent tutorial about view frustrum culling[/url], but I believe there must be a more efficient way for my special case. The best I came up with was taking the center point of each cube [0,0,0], multiply it with the model-view-projection matrix (which is cheap, because I have that matrix already), transform its x and y values into device coordinates (dividing them by w) and see if either one is smaller than -1.0 or greater than 1.0. This is quite effective, but of course the cubes disappear as soon as their [i]center[/i] is outside the screen boundaries, while I would like them to be completely outside before disappearing.
  8. Thanks. I just found a really simple solution though: m_pdDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR); // set "light" color // m_pdDevice->SetRenderState(D3DRS_TEXTUREFACTOR, nColor);
  9. Hi, I would like to fade my whole screeen to black at the end of a game level. Is there a way to do color fade-ins/fade-outs in a D3D application without enabling lighting, e.g. by changing the way textures are rendered? Regards, Sebastian
  10. First of all, thank you for your interest. To show the problem more clearly, I've compiled a demo that sets D3DPRESENT_INTERVAL_ONE, and thus limits the framerate the to system's VSYNC rate (e.g. 60Hz on my system). At least on my laptop, the sprites even seem to jump back and forth. I'd be interested to hear how it runs on other systems. You can download it here... Try moving around the character with the arrow keys, you'll see what I mean. I'm using DirectX 9.0c SDK, C++, and I'm using textured quads to render the 2D content. I am using one dynamic vertex buffer, and I lock the buffer each frame. The code snippet below shows the relevant bits. // init phase: // setup fullscreen parameters // m_pd3dppf = new D3DPRESENT_PARAMETERS; ZeroMemory(m_pd3dppf, sizeof(D3DPRESENT_PARAMETERS)); m_pd3dppf->Windowed = false; m_pd3dppf->SwapEffect = D3DSWAPEFFECT_DISCARD; m_pd3dppf->PresentationInterval = D3DPRESENT_INTERVAL_ONE; m_pd3dppf->BackBufferWidth = nWidth; m_pd3dppf->BackBufferHeight = nHeight; m_pd3dppf->BackBufferCount = 1; m_pd3dppf->BackBufferFormat = d3ddm.Format; // create Direct3D device // hr = m_pd3d->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, m_pd3dppf, &m_pd3dd ); // create the vertex buffer // hr = m_pd3dd->CreateVertexBuffer( nPanelCnt * CPanel::VERTEX_COUNT * CPanel::VERTEX_SIZE, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_XYZ | D3DFVF_TEX1, D3DPOOL_DEFAULT, &m_pVB, NULL ); // each frame: // check if dynamic VB is full // int nFlags; if (m_nVBOffset + nPanelCnt > m_nVBSize) { // lock new VB, discard old // nFlags = D3DLOCK_DISCARD; m_nVBOffset = 0; } else { // lock unused part of VB // nFlags = D3DLOCK_NOOVERWRITE; } // lock VB // hr = m_pVB->Lock( m_nVBOffset * CPanel::VERTEX_COUNT * CPanel::VERTEX_SIZE, nPanelCnt * CPanel::VERTEX_COUNT * CPanel::VERTEX_SIZE, (VOID **)ppVer, nFlags ); // draw VB // hr = m_pd3dd->DrawPrimitive( D3DPT_TRIANGLELIST, m_nVBOffset * CPanel::VERTEX_COUNT, nPanelCnt * CPanel::PRIMITIVE_COUNT ); // unlock VB // hr = m_pVB->Unlock(); // advance VB offset // m_nVBOffset += nPanelCnt; [Edited by - space_cadet on May 15, 2005 6:44:52 AM]
  11. I've done some more testing and I thing DirectX' Present() method has something to do with it. I've posted the details here...
  12. Hi, I'm having timing issues with my frame-based application. I've done some testing and found that the Present() method is behaving strange. For testing purposes, I specified D3DPRESENT_INTERVAL_ONE and the framerate is fixed at 60hz. I measure the time immediately before and after Present(), using QueryPerformanceCounter(). What happens is this: - the Present() call normally takes 1/60 of a second, as it should - BUT roughly every 15th call, i.e. four times a second, Present() takes much longer, about 1/20 of a second, - AND the two or three calls following this one return almost immediately I'm on WinXp and a laptop with LCD screen. I'd apprecciate any input... Regards, Sebastian
  13. Hmm, double-checked everything and it seems fine. I have a timer object which is called once at the very end of every frame, after rendering. The object does a QueryPerformanceCounter() and stores the time that has passed since the last call (in seconds): float nFactor = (float)(m_nTimeNow - m_nTimeLast) / (float)m_nCountsPerSec; That's it. All movements are multiplied by nFactor. My logfile shows a printout of nFactor: seconds: 0.127996 seconds: 0.005832 seconds: 0.000941 seconds: 0.000788 seconds: 0.000735 seconds: 0.000719 seconds: 0.000927 seconds: 0.001523 seconds: 0.000755 seconds: 0.001061 seconds: 0.001577 seconds: 0.000802 seconds: 0.000951 seconds: 0.001003 seconds: 0.001109 seconds: 0.001117 seconds: 0.001107 seconds: 0.001112 seconds: 0.001108 seconds: 0.001103 seconds: 0.001358 seconds: 0.000881 seconds: 0.001138 seconds: 0.001063 seconds: 0.001109 seconds: 0.001105 seconds: 0.001107 seconds: 0.001110 seconds: 0.001003 seconds: 0.001336 seconds: 0.000902 seconds: 0.001092 seconds: 0.001114 seconds: 0.001113 seconds: 0.001107 seconds: 0.001113 seconds: 0.001112 seconds: 0.001109 seconds: 0.001119 seconds: 0.001111 seconds: 0.001100 seconds: 0.001116 seconds: 0.001109 seconds: 0.001012 seconds: 0.001102 seconds: 0.001110 seconds: 0.001112 seconds: 0.001275 seconds: 0.000957 seconds: 0.001103 seconds: 0.001111 seconds: 0.001110 seconds: 0.001112 seconds: 0.001109 seconds: 0.001112 seconds: 0.001114 seconds: 0.001114 seconds: 0.001107 seconds: 0.001043 seconds: 0.001112 seconds: 0.001119 seconds: 0.001106 seconds: 0.001110 seconds: 0.001112 seconds: 0.001107 seconds: 0.001258 seconds: 0.000972 seconds: 0.001107 seconds: 0.001112 seconds: 0.001107 seconds: 0.001113 seconds: 0.001115 seconds: 0.001108 seconds: 0.001069 seconds: 0.001114 seconds: 0.001109 seconds: 0.001105 seconds: 0.001110 seconds: 0.001111 seconds: 0.001112 seconds: 0.001110 seconds: 0.001111 seconds: 0.001112 seconds: 0.001273 seconds: 0.000972 seconds: 0.001104 seconds: 0.001111 seconds: 0.001120 seconds: 0.001074 seconds: 0.001108 seconds: 0.001113 seconds: 0.001113 seconds: 0.001251 seconds: 0.000990 seconds: 0.001108 seconds: 0.001110 seconds: 0.001109 seconds: 0.001118 seconds: 0.001108 seconds: 0.001112 seconds: 0.001107 seconds: 0.001307 seconds: 0.000940 seconds: 0.001081 seconds: 0.001111 seconds: 0.001105 seconds: 0.001109 seconds: 0.001114 seconds: 0.001113 seconds: 0.001114 seconds: 0.001191 seconds: 0.001043 seconds: 0.001106 seconds: 0.001115 seconds: 0.001117 seconds: 0.001112 seconds: 0.001115 seconds: 0.001115 seconds: 0.001088 seconds: 0.001276 seconds: 0.000969 seconds: 0.001110 seconds: 0.001114 seconds: 0.001115 seconds: 0.001115 seconds: 0.001120 seconds: 0.001109 seconds: 0.001114 seconds: 0.001492 seconds: 0.000970 seconds: 0.000900 seconds: 0.001112 seconds: 0.001107 seconds: 0.001082 seconds: 0.001116 seconds: 0.001110 seconds: 0.001113 seconds: 0.001305 seconds: 0.000931 seconds: 0.001109 seconds: 0.001114 seconds: 0.001117 seconds: 0.001116 seconds: 0.001113 seconds: 0.001113 seconds: 0.001115 seconds: 0.001122 seconds: 0.001296 seconds: 0.000896 seconds: 0.001112 seconds: 0.001117 seconds: 0.001118 seconds: 0.001114 seconds: 0.001115 seconds: 0.001116 seconds: 0.001271 seconds: 0.000975 seconds: 0.001111 seconds: 0.001113 seconds: 0.001106 seconds: 0.001114 seconds: 0.001112 seconds: 0.001115 seconds: 0.001082 seconds: 0.001135 seconds: 0.001108 seconds: 0.001114 seconds: 0.001114 seconds: 0.001112 seconds: 0.001110 seconds: 0.001111 seconds: 0.001117 seconds: 0.001113 seconds: 0.001282 seconds: 0.000964 seconds: 0.001115 seconds: 0.001120 seconds: 0.001111 seconds: 0.001071 seconds: 0.001121 seconds: 0.001116 seconds: 0.001124 seconds: 0.001183 seconds: 0.001057 seconds: 0.001119 seconds: 0.001112 seconds: 0.001114 seconds: 0.001114 seconds: 0.001110 seconds: 0.001107 seconds: 0.001116 seconds: 0.001295 seconds: 0.000955 seconds: 0.001061 seconds: 0.001112 seconds: 0.001115 seconds: 0.001109 seconds: 0.001110 seconds: 0.001114 seconds: 0.001115 seconds: 0.001133 seconds: 0.001111 seconds: 0.001113 seconds: 0.001115 seconds: 0.001111 seconds: 0.001105 seconds: 0.001110 seconds: 0.001116 seconds: 0.001072 seconds: 0.001346 seconds: 0.000929 seconds: 0.001074 seconds: 0.001116 seconds: 0.001111 seconds: 0.001109 seconds: 0.001113 seconds: 0.001112 seconds: 0.001112 seconds: 0.001126 seconds: 0.001108 seconds: 0.001108 seconds: 0.001116 seconds: 0.001110 seconds: 0.001074 seconds: 0.001112 seconds: 0.001116 seconds: 0.001109 seconds: 0.001276 seconds: 0.000953 seconds: 0.001107 seconds: 0.001104 seconds: 0.001116 seconds: 0.001111 seconds: 0.001113 seconds: 0.001104 seconds: 0.001109 seconds: 0.001118 seconds: 0.001113 seconds: 0.001087 seconds: 0.001103 seconds: 0.001110 seconds: 0.001109 seconds: 0.001112 seconds: 0.001111 seconds: 0.001107 seconds: 0.001300 seconds: 0.000929 seconds: 0.001106 seconds: 0.001113 seconds: 0.001115 seconds: 0.001103 seconds: 0.001115 seconds: 0.001112 seconds: 0.001103 seconds: 0.001110 seconds: 0.001105 seconds: 0.001107 seconds: 0.001114 seconds: 0.001112 seconds: 0.001113 seconds: 0.001109 seconds: 0.001111 seconds: 0.001107 seconds: 0.001247 seconds: 0.000964 seconds: 0.001108 seconds: 0.001110 seconds: 0.001098 seconds: 0.001100 seconds: 0.001103 seconds: 0.001101 seconds: 0.001107 seconds: 0.001224 seconds: 0.000999 seconds: 0.001099 seconds: 0.001105 seconds: 0.001100 seconds: 0.001109 seconds: 0.001107 seconds: 0.001099 seconds: 0.001107 seconds: 0.001388 seconds: 0.000924 seconds: 0.000986 seconds: 0.001103 seconds: 0.001097 seconds: 0.001105 seconds: 0.001099 seconds: 0.001098 seconds: 0.001109 seconds: 0.001332 seconds: 0.000932 seconds: 0.001066 seconds: 0.001093 seconds: 0.001100 seconds: 0.001103 seconds: 0.001105 seconds: 0.001091 seconds: 0.001082 seconds: 0.001036 seconds: 0.005179 seconds: 0.000750 seconds: 0.000725 seconds: 0.000730 seconds: 0.000934 seconds: 0.001098 seconds: 0.001103 seconds: 0.001093 seconds: 0.001092 seconds: 0.001095 seconds: 0.001094 seconds: 0.001091 seconds: 0.001094 seconds: 0.001099 seconds: 0.001091 seconds: 0.001316 seconds: 0.000924 seconds: 0.001049 seconds: 0.001095 seconds: 0.001093 seconds: 0.001100 seconds: 0.001093 seconds: 0.001092 seconds: 0.001094 seconds: 0.001294 seconds: 0.000928 seconds: 0.001061 seconds: 0.001055 seconds: 0.001138 seconds: 0.001041 seconds: 0.001091 seconds: 0.001092 seconds: 0.001094 seconds: 0.001086 seconds: 0.001414 seconds: 0.000812 seconds: 0.001057 seconds: 0.001098 seconds: 0.001090 seconds: 0.001089 seconds: 0.001088 seconds: 0.001089 seconds: 0.000982 seconds: 0.001100 seconds: 0.001089 seconds: 0.001097 seconds: 0.001098 seconds: 0.001093 seconds: 0.001099 seconds: 0.001090 seconds: 0.001101 seconds: 0.001095 seconds: 0.001276 seconds: 0.000939 seconds: 0.001089 seconds: 0.001091 seconds: 0.001097 seconds: 0.001047 seconds: 0.001097 seconds: 0.001097 seconds: 0.001092 seconds: 0.009436 seconds: 0.000825 seconds: 0.001543 seconds: 0.000816 seconds: 0.000798 seconds: 0.000826 seconds: 0.000733 seconds: 0.000870 seconds: 0.001106 seconds: 0.001095 seconds: 0.001101 seconds: 0.001466 seconds: 0.001247 seconds: 0.000784 seconds: 0.001423 seconds: 0.000743 seconds: 0.000987 seconds: 0.001096 seconds: 0.001106 seconds: 0.001099 seconds: 0.001128 seconds: 0.001555 seconds: 0.000832 seconds: 0.001389 seconds: 0.000747 seconds: 0.000921 seconds: 0.001112 seconds: 0.001110 seconds: 0.001100 seconds: 0.001107 seconds: 0.002110 seconds: 0.000896 seconds: 0.000826 seconds: 0.000732 seconds: 0.000992 seconds: 0.001078 seconds: 0.001105 seconds: 0.001102 seconds: 0.001112 seconds: 0.001263 seconds: 0.000963 seconds: 0.001106 seconds: 0.001114 seconds: 0.001115 seconds: 0.001108 seconds: 0.001108 seconds: 0.001115 seconds: 0.001111 seconds: 0.001123 seconds: 0.001100 seconds: 0.001095 seconds: 0.001108 seconds: 0.001116 seconds: 0.001108 seconds: 0.001114 seconds: 0.001108 seconds: 0.001114 seconds: 0.001302 seconds: 0.000927 seconds: 0.001106 seconds: 0.001112 seconds: 0.001109 seconds: 0.001114 seconds: 0.001111 seconds: 0.001109 seconds: 0.001103 seconds: 0.001206 seconds: 0.001024 seconds: 0.001112 seconds: 0.001112 seconds: 0.001109 seconds: 0.001110 seconds: 0.001114 seconds: 0.001110 seconds: 0.001111 seconds: 0.001328 seconds: 0.000933 seconds: 0.001095 seconds: 0.001126 seconds: 0.001112 seconds: 0.001109 seconds: 0.001117 seconds: 0.001118 seconds: 0.001198 seconds: 0.001209 seconds: 0.000962 seconds: 0.001116 seconds: 0.001121 seconds: 0.001114 seconds: 0.001125 seconds: 0.001128 seconds: 0.001124 seconds: 0.001119 seconds: 0.001223 seconds: 0.001055 seconds: 0.001068 seconds: 0.001135 seconds: 0.001131 seconds: 0.001132 seconds: 0.001135 seconds: 0.001127 seconds: 0.001135 seconds: 0.001146 seconds: 0.001134 seconds: 0.001140 seconds: 0.001131 seconds: 0.001140 seconds: 0.001132 seconds: 0.001137 seconds: 0.001139 seconds: 0.001027 seconds: 0.001368 seconds: 0.000911 seconds: 0.001141 seconds: 0.001133 seconds: 0.001139 seconds: 0.001144 seconds: 0.001140 seconds: 0.001137 seconds: 0.001136 seconds: 0.001213 seconds: 0.001068 seconds: 0.001144 seconds: 0.001143 seconds: 0.001129 seconds: 0.001073 seconds: 0.001131 seconds: 0.001143 seconds: 0.001141 seconds: 0.001426 seconds: 0.000861 seconds: 0.001137 seconds: 0.001145 seconds: 0.001143 seconds: 0.001143 seconds: 0.001143 seconds: 0.001143 seconds: 0.001251 seconds: 0.001050 seconds: 0.001130 seconds: 0.001139 seconds: 0.001140 seconds: 0.001143 seconds: 0.001141 seconds: 0.001144 seconds: 0.001142 seconds: 0.001390 seconds: 0.000895 seconds: 0.001141 seconds: 0.001144 seconds: 0.001144 seconds: 0.001144 seconds: 0.001140 seconds: 0.001145 seconds: 0.001166 seconds: 0.001233 seconds: 0.000933 seconds: 0.001143 seconds: 0.001143 seconds: 0.001143 seconds: 0.001141 seconds: 0.001146 seconds: 0.001140 seconds: 0.001140 seconds: 0.001428 seconds: 0.000875 seconds: 0.001140 seconds: 0.001140 seconds: 0.001127 seconds: 0.001100 seconds: 0.001140 seconds: 0.001145 seconds: 0.001556 seconds: 0.000909 seconds: 0.000962 seconds: 0.001145 seconds: 0.001143 seconds: 0.001140 seconds: 0.001145 seconds: 0.001139 seconds: 0.001143 seconds: 0.001409 seconds: 0.001096 seconds: 0.000907 seconds: 0.001142 seconds: 0.001142 seconds: 0.001142 seconds: 0.001143 seconds: 0.001140 seconds: 0.001145 seconds: 0.001260 seconds: 0.001027 seconds: 0.001144 seconds: 0.001141 seconds: 0.001139 seconds: 0.001147 seconds: 0.001139 seconds: 0.001143 seconds: 0.001041 seconds: 0.001386 seconds: 0.000910 seconds: 0.001140 seconds: 0.001139 seconds: 0.001143 seconds: 0.001144 seconds: 0.001141 seconds: 0.001142 seconds: 0.001145 seconds: 0.001328 seconds: 0.000971 seconds: 0.001142 seconds: 0.001146 seconds: 0.001119 seconds: 0.001129 seconds: 0.001149 seconds: 0.001146 seconds: 0.001707 seconds: 0.000814 seconds: 0.000933 seconds: 0.001140 seconds: 0.001144 seconds: 0.001140 seconds: 0.001146 seconds: 0.001144 seconds: 0.001147 seconds: 0.001160 seconds: 0.001134 seconds: 0.001071 seconds: 0.001146 seconds: 0.001144 seconds: 0.001141 seconds: 0.001140 seconds: 0.001148 seconds: 0.001141 seconds: 0.001394 seconds: 0.000892 seconds: 0.001145 seconds: 0.001143 seconds: 0.001143 seconds: 0.001146 seconds: 0.001149 seconds: 0.001143 seconds: 0.001036 seconds: 0.001187 seconds: 0.001110 seconds: 0.001145 seconds: 0.001141 seconds: 0.001143 seconds: 0.001145 seconds: 0.001152 seconds: 0.001143 seconds: 0.001143 seconds: 0.001454 seconds: 0.000848 seconds: 0.001148 seconds: 0.001155 seconds: 0.001129 seconds: 0.001152 seconds: 0.001141 seconds: 0.001147 seconds: 0.001449 seconds: 0.000867 seconds: 0.001146 seconds: 0.001154 seconds: 0.001144 seconds: 0.001143 seconds: 0.001142 seconds: 0.001142 seconds: 0.001145 seconds: 0.001498 seconds: 0.000815 seconds: 0.001018 seconds: 0.001141 seconds: 0.001143 seconds: 0.001145 seconds: 0.001137 seconds: 0.001142 seconds: 0.001142 seconds: 0.001246 seconds: 0.001043 seconds: 0.001143 seconds: 0.001146 seconds: 0.001139 seconds: 0.001142 seconds: 0.001141 seconds: 0.001132 seconds: 0.001064 seconds: 0.001311 seconds: 0.000988 seconds: 0.001143 seconds: 0.001141 seconds: 0.001143 seconds: 0.001136 seconds: 0.001141 seconds: 0.001141 seconds: 0.001545 seconds: 0.000750 seconds: 0.001143 seconds: 0.001134 seconds: 0.001141 seconds: 0.001138 seconds: 0.001148 seconds: 0.001144 seconds: 0.001144 seconds: 0.001496 seconds: 0.000805 seconds: 0.001142 seconds: 0.001198 seconds: 0.001090 seconds: 0.001142 seconds: 0.001140 seconds: 0.001141 seconds: 0.001145 seconds: 0.001154 seconds: 0.001137 seconds: 0.001044 seconds: 0.001144 seconds: 0.001143 seconds: 0.001143 seconds: 0.001147 seconds: 0.001148 seconds: 0.001143 seconds: 0.001269 seconds: 0.001030 seconds: 0.001144 seconds: 0.001144 seconds: 0.001141 seconds: 0.001142 seconds: 0.001144 seconds: 0.001118 seconds: 0.001112 seconds: 0.001159 seconds: 0.001148 seconds: 0.001145 seconds: 0.001149 seconds: 0.001151 seconds: 0.001146 seconds: 0.001154 seconds: 0.001141 seconds: 0.001623 seconds: 0.000698 seconds: 0.001126 seconds: 0.001154 seconds: 0.001141 seconds: 0.001083 seconds: 0.001144 seconds: 0.001143 seconds: 0.001146 seconds: 0.001171 seconds: 0.001126 seconds: 0.001149 seconds: 0.001148 seconds: 0.001145 seconds: 0.001141 seconds: 0.001144 seconds: 0.001143 seconds: 0.001146 seconds: 0.001286 seconds: 0.001024 seconds: 0.001036 seconds: 0.001144 seconds: 0.001140 seconds: 0.001144 seconds: 0.001149 seconds: 0.001146 seconds: 0.001147 seconds: 0.001151 seconds: 0.001146 seconds: 0.001145 seconds: 0.001143 seconds: 0.001142 seconds: 0.001146 seconds: 0.001155 seconds: 0.001134 seconds: 0.001769 seconds: 0.000694 seconds: 0.001002 seconds: 0.001146 seconds: 0.001144 seconds: 0.001155 seconds: 0.001146 seconds: 0.001152 seconds: 0.001148 seconds: 0.006138 seconds: 0.000707 seconds: 0.000592 seconds: 0.000747 seconds: 0.001158 seconds: 0.001159 seconds: 0.001345 seconds: 0.000970 seconds: 0.001159 seconds: 0.001157 seconds: 0.001147 seconds: 0.001153 seconds: 0.001146 seconds: 0.001150 seconds: 0.001471 seconds: 0.000833 seconds: 0.001131 seconds: 0.001150 seconds: 0.001141 seconds: 0.001147 seconds: 0.001147 seconds: 0.001148 seconds: 0.001147 seconds: 0.001400 seconds: 0.000904 seconds: 0.001153 seconds: 0.002619 seconds: 0.000749 seconds: 0.000719 seconds: 0.000723 seconds: 0.001109 seconds: 0.001086 seconds: 0.001197 seconds: 0.001121 seconds: 0.001156 seconds: 0.001160 seconds: 0.001155 seconds: 0.001162 seconds: 0.001155 seconds: 0.001159 seconds: 0.002180 seconds: 0.000962 seconds: 0.000751 seconds: 0.000769 seconds: 0.001119 seconds: 0.001078 seconds: 0.001148 seconds: 0.001143 seconds: 0.001141 seconds: 0.001925 seconds: 0.000822 seconds: 0.000741 seconds: 0.001127 seconds: 0.001149 seconds: 0.001159 seconds: 0.001155 seconds: 0.001146 seconds: 0.001149 seconds: 0.001453 seconds: 0.000850 seconds: 0.001059 seconds: 0.001151 seconds: 0.001145 seconds: 0.001153 seconds: 0.001148 seconds: 0.001155 seconds: 0.001152 seconds: 0.001235 seconds: 0.001067 seconds: 0.001145 seconds: 0.001682 seconds: 0.000824 seconds: 0.000938 seconds: 0.001141 seconds: 0.001134 seconds: 0.001892 seconds: 0.000816 seconds: 0.000748 seconds: 0.001151 seconds: 0.001145 seconds: 0.001146 seconds: 0.001156 seconds: 0.001154 seconds: 0.001150 seconds: 0.001195 seconds: 0.001105 seconds: 0.001152 seconds: 0.001146 seconds: 0.001158 seconds: 0.001041 seconds: 0.001148 seconds: 0.001149 seconds: 0.001153 seconds: 0.001447 seconds: 0.000855 seconds: 0.001146 seconds: 0.001147 seconds: 0.001140 seconds: 0.001141 seconds: 0.001141 seconds: 0.001146 seconds: 0.001255 seconds: 0.001109 seconds: 0.001058 seconds: 0.001206 seconds: 0.001086 seconds: 0.001139 seconds: 0.001153 seconds: 0.001152 seconds: 0.001148 seconds: 0.001571 seconds: 0.000816 seconds: 0.001099 seconds: 0.001147 seconds: 0.001152 seconds: 0.001147 seconds: 0.001153 seconds: 0.001149 seconds: 0.001049 seconds: 0.001346 seconds: 0.000968 seconds: 0.001141 seconds: 0.001145 seconds: 0.001152 seconds: 0.001143 seconds: 0.001144 seconds: 0.001145 seconds: 0.001152 seconds: 0.001432 seconds: 0.000874 seconds: 0.001144 seconds: 0.001158 seconds: 0.001119 seconds: 0.001114 seconds: 0.001147 seconds: 0.001150 seconds: 0.001176 seconds: 0.001142 seconds: 0.001148 seconds: 0.001159 seconds: 0.001160 seconds: 0.001154 seconds: 0.001150 seconds: 0.001155 seconds: 0.001153 seconds: 0.001459 seconds: 0.000867 seconds: 0.001065 seconds: 0.001146 seconds: 0.001148 seconds: 0.001151 seconds: 0.001151 seconds: 0.001147 seconds: 0.001142 seconds: 0.001201 seconds: 0.001098 seconds: 0.001143 seconds: 0.001143 seconds: 0.001147 seconds: 0.001146 seconds: 0.001154 seconds: 0.001141 seconds: 0.001074 seconds: 0.001521 seconds: 0.000792 seconds: 0.001159 seconds: 0.001157 seconds: 0.001158 seconds: 0.001157 seconds: 0.001158 seconds: 0.001159 seconds: 0.001452 seconds: 0.000868 seconds: 0.001155 seconds: 0.001158 seconds: 0.001155 seconds: 0.001097 seconds: 0.001158 seconds: 0.001157 seconds: 0.001157 seconds: 0.001447 seconds: 0.000858 seconds: 0.001154 seconds: 0.001149 seconds: 0.001148 seconds: 0.001144 seconds: 0.001147 seconds: 0.001158 seconds: 0.001152 seconds: 0.001227 seconds: 0.001083 seconds: 0.001076 seconds: 0.001159 seconds: 0.001159 seconds: 0.001157 seconds: 0.001160 seconds: 0.001157 seconds: 0.001162 seconds: 0.001385 seconds: 0.000927 seconds: 0.001157 seconds: 0.001159 seconds: 0.001156 seconds: 0.001154 seconds: 0.001149 seconds: 0.001094 seconds: 0.001296 seconds: 0.001015 seconds: 0.001145 seconds: 0.001152 seconds: 0.001144 seconds: 0.001152 seconds: 0.001150 seconds: 0.001151 seconds: 0.001150 seconds: 0.001517 seconds: 0.000812 seconds: 0.001155 seconds: 0.001153 seconds: 0.001159 seconds: 0.001085 seconds: 0.001154 seconds: 0.001155 seconds: 0.001176 seconds: 0.001154 seconds: 0.001154 seconds: 0.001155 seconds: 0.001154 seconds: 0.001161 seconds: 0.001154 seconds: 0.001157 seconds: 0.001158 seconds: 0.001621 seconds: 0.000885 seconds: 0.000903 seconds: 0.001149 seconds: 0.001154 seconds: 0.001156 seconds: 0.001157 seconds: 0.001148 seconds: 0.001153 seconds: 0.001264 seconds: 0.001051 seconds: 0.001163 seconds: 0.001160 seconds: 0.001154 seconds: 0.001162 seconds: 0.001159 seconds: 0.001146 seconds: 0.001164 seconds: 0.001508 seconds: 0.000862 seconds: 0.001035 seconds: 0.001155 seconds: 0.001159 seconds: 0.001156 seconds: 0.001161 seconds: 0.001152 seconds: 0.001468
  14. Hi, for my little jump'n'run I measure the time between the last frame and the current one, then I scale each movement accordingly. Now in practice, this doesn't look very good: the movement is uneven and there is tearing. Have a look at the current game (needs DirectX9). Use the arrow keys to move. 1. Why is the movement uneven? Is this normal for frame-based games, or did I overlook something? 2. Somewhere I read it's generally more feasible for jump'n'run-type games to choose a fixed framerate (e.g. 60hz). Is this true, and why? Regards, Sebastian
  15. I tried to make the post as short as possible, so I didn't go into my class structure. Your suggestions are already implemented :) I have a CSprite class, as well as a CMappedSprite class derived from CSprite. The tiles are represented by a CPanel class. The main character object is an extension of CSprite, and the platform object is an extension of CMappedSprite. As to jnrdev: I had looked into this, but I didn't see the slope tutorial! This looks promising indeed. Thanks!