Jump to content
  • Advertisement

Sollum

Member
  • Content count

    122
  • Joined

  • Last visited

Community Reputation

1145 Excellent

2 Followers

About Sollum

  • Rank
    Member

Personal Information

  • Interests
    Art
    Audio
    Business
    Design
    Production
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for all the replies! I was guessing that might be the case, but was unwilling to admit Garbage collection makes a lot of spikes for frame based games. Thinking of switching to PC based game for next project. Android is a great platform plagued with a lot of money milking crap LibGDX offers a nice solution to make projects for both Android and PC, tho i don't think its possible to create a descent action game due to nature of JVMs across the board.
  2. Sorry for not making much sense. I think i figured out the issue i was facing before. Here is the code example. public boolean timeToUpdate() { if (TimeUtils.millis() > runActionAt) { runActionAt = TimeUtils.millis() + l_msForFrame; frameCounter++; return true; } return false; } It would check for "true" condition. If it returns true, game logic would update. The idea was to check if current time is more than "next run time". Where next run time is calculated by taking current time and adding time for one frame. The result was that it would almost always check to soon and next check would happen a lot later, and that's why i was losing frames. Calculating when the next update should happen was a bad idea. I think i would find an answer to fix this problem in that article, i will check it a bit latter, lots of work at the moment. But i hate the idea of those "interpolation" states, it can lead to very ugly rounding errors. I plan to do some research tomorrow on this topic and i will get back to you.
  3. I think i'd prefer to fill "do nothing" instead of interpolation if game is frame and sprite based. I remembered the issue i was facing, i was trying to lock framerate to 60 fps and skipped game logic for frames, but in the end i was lossing framerate, since instead of waiting at the end, i tried to wait as soon as possible. From 60 fps it dropped to ~25. Somehow i dislike the "half state", it makes no difference from time based logic in my eyes.
  4. Thanks! I had read that article before, and its exactly what pushed me to ditch frames and go for time. I will re read it again more carefully. That article confused me once before. It mentions "partial states", as in 1/10 of physic done in frame/tick. Does that mean you simulate 1/10 of a frame? I think its not a good idea. Also i had this interesting bug, where due to "frame checking" on low end hardware i had 24 frames out of 60, as soon as i switched to delta time physics and stopped limiting it to frames it ran at 60 fps.
  5. Hello! Recently i've been watching a lot of material on fighting and other competitive games. Most of serious fighting games have precise frame "timers". Example: 5 frames for hit start animation 3 frames for still animation 5 frames for recovery animation Games like Diablo 3 also have "Frame" counter. But how do they go about precision? How do they ensure that frame A is equal to frame B and C? I code games for Android and I switched to "time" based calculations instead of frame based long ago. But it turns out that frame precision is important in some cases. How do big developers ensure that no frame skips happen and 1 frame is always the same length? At the moment, I imagine, they simply test if there is no lag in animations, and if there is, they work around it to make it smooth. Not to mention, making it for a specific hardware. How to go about in mobile and PC markets? "Delta" time calculations are quite cool, but it gets awkward if you lag for 2 seconds and bullets go through wall, if no proper checking is done.
  6. Thanks lads! Crap, what a lame mistake that was. Fixing it was fast and easy. int i_indiceMod = 10 * i; Vector3 p1 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 0], finalMeshVertexFloatArray[i_indiceMod + 1], finalMeshVertexFloatArray[i_indiceMod + 2]); Vector3 p2 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 10], finalMeshVertexFloatArray[i_indiceMod + 11], finalMeshVertexFloatArray[i_indiceMod + 12]); Vector3 p3 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 20], finalMeshVertexFloatArray[i_indiceMod + 21], finalMeshVertexFloatArray[i_indiceMod + 22]); Everything now seems normal, and both spheres seem to have only marginal difference in surface area. Tho the first one seems to have bigger surface area, but somehow it makes sens to me. Flipped models are also fixed, but there is small 0.000001 error For now I am using "new" operator, since calculations are done only once, whilst loading the models. Latter on ill simply use raw vertice data for calclulations.
  7. Sorry for the late reply. Yes, i though the same, but difference is way way way way way way to big in my opinion. ~5 times bigger surface area from subdividing 2 or 3 times. And the volume itself becomes ~3 times bigger. Different example: Same model, only flipped in 3d modeling tool and loaded as a separate model. Its area and volume differs.
  8. Hello! I have this strange issue with mesh surface area calculation. Surface area increases, if i "subdivide" mesh to be more detailed and add more polygons, even tho the relative size remains the same. Code is rather simple and the formula itself doesn't matter as much as differentiating results based on polygon count. float total_area = 0; int indice_count = finalMeshIndices.length; for (int i = 0; i < indice_count; i += 3) { float area = 0; Vector3 p1 = new Vector3(finalMeshVertexFloatArray[i + 0], finalMeshVertexFloatArray[i + 1], finalMeshVertexFloatArray[i + 2]); Vector3 p2 = new Vector3(finalMeshVertexFloatArray[i + 10], finalMeshVertexFloatArray[i + 11], finalMeshVertexFloatArray[i + 12]); Vector3 p3 = new Vector3(finalMeshVertexFloatArray[i + 20], finalMeshVertexFloatArray[i + 21], finalMeshVertexFloatArray[i + 22]); Vector3 e1 = p2.sub(p1); Vector3 e2 = p3.sub(p1); Vector3 e3 = e1.crs(e2); area = (float) (0.5 * Math.sqrt(e3.x * e3.x + e3.y * e3.y + e3.z * e3.z)); if (Float.isNaN(area)) System.out.println("NaN... The fuck?"); total_area += area; } I think the issue is with float precision, because i have the same issue if i take a model and flip it. Here is visual representation If i take a cube 1,1,1 its area is ~5 If i upscale it 3 times, its area becomes ~19 So it seems that float precision is a culprit here. At least i guess so.
  9. Thanks for all the tips! I found a way how to do stuff with the help of framework i am using, turns out, i had to implement everything into a batch, calling glDrawArrays outside of batch bounds did not produce results i wanted. Anyways, i managed to achieve the result i wanted. Its quite fun tho, to observe android logs and profiler tool. In this test i allocate 7000 float array each frame and rebuild it. GC dump numbers are nice! Edit: It was "strange" experience and kind of counter intuitive for me. I have made 4 2D games and always tried to cache, reuse or preload data as much as I could get away with. And now, I had to dynamically recreate arrays of data, each frame. Are all graphic effects based on that? What if i'd want to make dust particles going from bellow car tires? A blind guess would be to make at least ~10000 3 cordinate vectors, recalculate them each frame, based on movement vector and delta draw time, and then recreate all the buffer data all over? Can mobile phones even handle that? Anyways, here is the result!
  10. Thanks a lot! I will look into "orphaning", but i am afraid that mobile platforms are not that "powerful" for that
  11. I was experimenting with trails and tried to use GL Immediate Mode. I haven't figured out fully framework i am using. I was thinking of storing quads in one model, but whenever it is created, everything is stored in meshes, that are stored in VBO's. Each mesh is a different draw call. If model has 5 meshes, it will be 5 calls and so on. I could try updating existing VBO with new vertices (based on documentation, it has that option https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/VertexBufferObject.html#updateVertices-int-float:A-int-int-), but wouldn't it be expensive and taxing to interact with VRAM after data loading is finished? Sorry, my thinking and questions might sound dumb, but i am used to storing everything in VRAM at the load time and using GPU later on for drawing. It seems like a taxing action to recreate/adjust VBO's on the go. Thanks for all the tips!
  12. Hello! I am experimenting with 3d and using LibGDX platform. I want to do "engine trail" effect in 3d space. Well, a more simple version would be simple lines. Tried with GL Immediate Mode and it looked nice, but the problem is the amount of draw calls! It was around 150 calls to draw pretty curved line. One line. And the solutions of itself isn't valid, because i have to create different model instances, and transform them separately to make a curved line in order to draw in a proper model batch. Is there any spreadsheet or information on what is considered "normal" amount of draw calls for a mobile/desktop game? It seems that most 3d effects take up a lot of resources, but i have no idea to benchmark what is normal and what is a no no. Example of what i am trying to achieve.
  13. Sollum

    Looking for tips in 3D

    Hello! Thanks for the tips! Meditating on some tasks is actually useful and knowing hardware and "software" limitations is good, experimenting allows you to avoid future pitfalls. Also I want it to be fun learning process.
  14. Sollum

    Looking for free Professional Sound Effects ?

    Hello, http://www.ogsoundfx.com link is broken, redirects to http://www.ogsoundfx/
  15. Sollum

    Looking for tips in 3D

    Thanks for responses! Happily learning 3D stuff! Currently learning stuff about FBO, trying it out on my 2D game, for some fancy projectile effects. Took me quite a while to get into Models and Animations on framework of my choice (LibGDX), as Wings 3D has no rigging, so i had to figure out how to manually create animations in code (later on can be scripted). Not planning on creating GTA 7 or something Decided to try out "space" theme, as there wont be as much issue with "walking on ground uphill". Turns out, there are lots of guides how to achieve "frustum culling" on models with ease, so i wont have to care for BSP trees for now. But one thing buggers me - How to cull invisible faces? Thing that comes to my mind is using geometry shader to check each face if its "front" center is hit by ray? I use low poly models, up too 1500 max.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!