Jump to content
  • Advertisement
    1. Past hour
    2. Hermetix

      Doomish - About 70% Done

      Looks totally amazing. Very good work!
    3. GoliathForge

      Game Physics by Dr Eberly

      okay...I guess. Yes, it's true about VS version compatibility but isn't the problem in my opinion. This code set was released with VisualC++6 solutions and projects. I had to dig this book out because of its age, but the WildMagic2 engine library builds without error in VS2017 after standard solution upgrade process. Choosing at random the Application2 project, I can say there are issues. First I noticed that the solution upgraded general properties had set the configuration to build as a library. That seems wrong because there is a WinMain (at least in the DX build profile) and instead I would have thought the setting should be to build executable. Second, the project include and link directory search paths are not set. There are a few required additions for the include path here. One to the root folders include directory and one to the older version of DirectX and a path to the renderer implementation. (I'm ignoring GLUT and WGL profiles for the moment) I have the old DX9SDK so that gets me past the old d3dx9math usage. The other missing area will be dxerr9. I have the header that I can insert but seem to be missing the implementation, so I stopped there as a fail because I have no desire to go this far backwards. If I were to continue to try, I'd have to move away from this profile and attempt with GLUT or WGL profiles or hunt the void for the missing component. I respect the Eberly stuff a great deal and there are a considerable amount of gems littered almost anywhere you look at this. I would encourage you to continue, but there will be some pain involved in getting the DX profile to build. Now, the GLUT profile has the regular depreciated standard library string or stream io warnings that you'd expect to see from older software. But in code there is an inconsistent folder naming. In code, it searches for a folder named GL but is named differently on disk as Glut3.7.6 for the glut.h reference and the GLExt folder for glprocs.h so I stopped there. There will be some work to get this up and running but I disagree with kicking VisualStudio to the curb, but do agree an inexperienced developer will suffer to get this up and running. The journey begins on the path @Kylotan is pointing to, continue to ask questions and be prepared to expect other pain with the modern tools choking on long since depreciated patterns. If I could invest the time, I would love to rehash the wildMagic set, even as just a code browse to apply to new work. That's the best I can do. Hopefully that helps the conversation.
    4. Hermetix

      Total Doom

      Thanks, I have decided to use the Unreal Engine from now on. Playing this in a browser wouldn't be optimal anyway. I'm gonna try hard to finish this on time but will continue even if I don't--I'm a bit rusty with UE4 since I haven't used it in months.
    5. Does the engine support iOS? (Not saying it should or shouldn't - just curious.) Also, from what you've posted so far it looks like the engine uses OpenGL exclusively. Have you given any consideration to OpenGL's being deprecated on Apple platforms? (Again, just curious - I imagine OpenGL will continue to be supported on those platforms at least for a while.)
    6. thomedy

      R&D npc ai

      Okay i am building a super market game... and im developing the ai for my npc... i am thinking about the way that customers walk around a super market and it kinda has a fluid motion feel to it.... like they way they way in between aisles.. im very seriously considering writing a vector field for my my path where the customer (npc) can sense pivot points (end of aisle) and transition another thought i had was just an intuitive.. if you went right last time... go left this time walking the entirety of the supermarket and starting over i amg oing back and forth on this idea... what is the most realistic path and most efficient use of my memory
    7. Today
    8. kica007

      The Magic World

      The game is in Open Alpha anybody is welcome to join,more maps and new mobs and items added each day.There is enough maps for starting to play now. The Magic World simple game full of fun. Just download client and jump right in. Game site - The Magic World
    9. Zervoxe

      Are all Remakes the same?

      This is usually were I would make a distinction between a remaster and a remake. remaster is usually a few updates like support new resolutions, controller support and upgrading assets but no changes to gameplay outside of bug fixes(example: inventory bug which would make you lose an item if you did 'x', 'y' action before). a remake can be more or less anything, unless they actually say a "full remake" in which you could also consider it a "reimagined" game meaning the way the story unfolds, characters, basic lore changes etc. But this is by no means any 'standard' and both these words means different things for different people. best examples to differentiate, Resident Evil 2 HD is a remake, Final Fantasy 7 is a remake, crash bandicoot to my knowledge would be a remaster.
    10. Klimtachakka

      Just another space shooter

      Am I in the wrong forum for this kind of subject or is it just a crappy game? Any feedback, good or bad, would be apreciated.
    11. Here are my assumptions about your project: Unit of measurement is in pixels A tile is unit squared; 64x64px Top left screen coord is 0,0 and bottom right is 1919,1079; 1080p monitor Your 50x50 tilemap chunk is rendered from left to right, top to bottom Lets say your tiles are 64x64px and your chunk is 50x50 tiles, so a chunk would be 3200x3200px. Also for the time being, lets say chunk instances are stored in a 2D array. If the chunk is not loaded then the instance is invalid. Pseudo Code: TILE_SIZE = 64 CHUNK_SIZE = TILE_SIZE * 50 chunk_x, chunk_y GetChunkCoord( pixel_x, pixel_y) { chunk_x = pixel_x / CHUNK_SIZE chunk_y = pixel_y / CHUNK_SIZE } chunk GetChunk( chunk_x, chunk_y ) { chunk = chunks[chunk_x][chunk_y] } tile GetTile( pixel_x, pixel_y ) { chunk = GetChunk( GetChunkCoord( pixel_x, pixel_y ) ) if chunk is valid { tile_x = (pixel_x % CHUNK_SIZE) / TILE_SIZE tile_y = (pixel_y % CHUNK_SIZE) / TILE_SIZE tile = tilemap[tile_x][tile_y] } } Now for figuring out what chunks the camera sees. Since a chunk is 3200px squared, you can fit a 1920x1080 screen within a chunk. The most chunks you can physically see is 4 when the screen is at one corner of a chunk. SCREEN_X = 1920 SCREEN_Y = 1080 SCREEN_HX = SCREEN_X / 2 SCREEN_HY = SCREEN_Y / 2 chunk[4] GetCameraChunks( camera_x, camera_y ) { min_x = camera_x - SCREEN_HX max_x = camera_x + SCREEN_HX min_y = camera_y - SCREEN_HY max_y = camera_y + SCREEN_HY chunk[0] = GetChunk( GetChunkCoord( min_x, min_y ) ) chunk[1] = GetChunk( GetChunkCoord( max_x, min_y ) ) chunk[2] = GetChunk( GetChunkCoord( min_x, max_y ) ) chunk[3] = GetChunk( GetChunkCoord( max_x, max_y ) ) } Chunks should be referenced by chunk coord. I don't know what language you are using, however I bet there is some form of a map class for the language you are using. The chunk coord pair would be the map key and the map value would be the instance of your chunk. If there is no entry for the map key, the chunk is not loaded. If not loaded, load the chunk and create a key for the map. One trick to unload chunks is to have a timer countdown for chunks that are not within the camera view. The countdown could be set for a few minutes and when a chunk has any tiles rendered just reset the countdown. If the countdown hits 0, unload the chunk. I'm going to redefine function GetChunk and GetCameraChunks in my Pseudo Code class Chunk { id data cooldown } COOLDOWN_SECONDS = 180 map_chunks = map< ChunkID, Chunk > chunk GetChunk( chunk_x, chunk_y ) { chunk_id = pair<chunk_x,chunk_y> if map_chunk.contains(chunk_id) chunk = map_chunk.get(chunk_id) else chunk = invalid } chunk LoadChunk( chunk_id ) { chunk = new Chunk { id = chunk_id data = Tile[50][50] cooldown = COOLDOWN_SECONDS } .. fill chunk.data map.insert(chunk_id, chunk) } chunk_id[4] GetCameraChunks( camera_x, camera_y ) { min_x = camera_x - SCREEN_HX max_x = camera_x + SCREEN_HX min_y = camera_y - SCREEN_HY max_y = camera_y + SCREEN_HY chunk_id[0] = pair< GetChunkCoord( min_x, min_y ) > chunk_id[1] = pair< GetChunkCoord( max_x, min_y ) > chunk_id[2] = pair< GetChunkCoord( min_x, max_y ) > chunk_id[3] = pair< GetChunkCoord( max_x, max_y ) > } void Render() { .. Get camera position in pixels camera_x = .. camera_y = .. chunk_id[4] = GetCameraChunks( camera_x, camera_y ) ..Note chunk_id may have duplicate IDs previous_chunk = invalid for i in range(0, 4) { chunk = GetChunk(chunk_id[i]) if chunk not valid { chunk = LoadChunk(chunk_id[i]) } if chunk != previous_chunk { ..Note I'm just going to render everything in the chunk for tile_y in range(0, 50) { for tile_x in range(0, 50) { tile = chunk.data[tile_x][tile_y] ..Tile's pixel location in world space world_px = (TILE_SIZE * tile_x) + (chunk.id[x] * CHUNK_SIZE) world_py = (TILE_SIZE * tile_y) + (chunk.id[y] * CHUNK_SIZE) ..Camera's top left px coord in world space camera_px = camera_x - SCREEN_HX camrea_py = camera_y - SCREEN_HY ..Tile's pixel location in screen space tile_px = world_px - camera_px tile_py = world_py - camera_py .. Render the tile } } ..Reset chunk's unload timer chunk.cooldown = COOLDOWN_SECONDS } previous_chunk = chunk } } void Update( delta_time ) { for chunk in map_chunks { chunk.cooldown = chunk.cooldown - delta_time if chunk.cooldown < 0 { map_chunks.remove( chunk.id ) } } } I hope this helps. Good luck BTW: I didn't check any of my math, so there may be errors.
    12. Sorry, not sure what's gone wrong there, but we'll get those fixed up ASAP.
    13. I am on your side. And i find it important to point at the possibility that too much jargon can exclude the rest of the world from certain discussions. More so since often times it becomes more clearly what is actually meant when using some more grammar instead of a possibly personally pre-biased shortcut that has long since changed meaning. More grammar 🙂
    14. I have just published the twelfth dev update of the nCine, illustrating the latest changes dedicated to improving the quality of life of users. ☺️ You can find all previous articles here: https://encelo.github.io/tags/#nCine
    15. DerTroll

      Game Physics by Dr Eberly

      I doubt, that you will find anyone here, who has. There are so many resources on this topic out there and the chances that a person who has read this book stumbles across this thread are rather small. Even if, you get lucky there is still the question if this person faced the same problems as you do. So let's focus on your specific problems and let's try to solve them. So you have basically no experience in how c++ programs are structured and how they are composed. Nothing to be ashamed of, but using Microsoft Visual Studio is the worst thing you can do right now. Not because it is bad but because it is good. It does so much work for you that you usually don't need to know much about how your program is composed... until there is a problem. I know that from personal experience. I started learning c++ with VS and had a lot of linking problems I did not understand. I opened a lot of threads in forums where people told me which flags I had to change in some hidden options menu. It magically worked. I did not understand why but I was happy until I hit the next problem. I could have saved myself a lot of trouble, if I have learned the necessary lessons about the c++ build system. Unfortunately, the things modern IDEs offer, which make the lives of experienced programmers so much easier, are somehow bad for Newbies. So my first advice: Do some simple C++ tutorials without using an IDE. Write makefiles, multiple mini-libraries and link them all together. If you don't make any mistakes (unlikely, but might happen), try adding one on purpose and see what happens if you want to build the program. You need to learn how the compiler/linker addresses certain error types, which leads me to the next point: How cute, just 612? Try hitting 1000 or 10000. It's not that hard to achieve. 😛 Jokes aside. The number of compiler errors you get is absolutely irrelevant. The only thing that matters is the first one. If you forget to include a file where a certain function is defined, the compiler will create an error every time you use this function. I can only support the things @Kylotan mentioned. Try solving all errors step by step. Always solve the initial error and don't bother with the others which are probably just subsequent errors. If you don't know how to solve a specific error, ask and give us the error message and the code section that caused the error. We can't help you if we don't know, what is supposed to happen. If the program compiles, you have at least a more or less working program. If you run the program and you get no output there might be multiple reasons: - The program is not supposed to print any output. - The output is written to a file that you have to open with a certain software tool (ParaView is quite common in Physics simulations) - The program crashed. In this case, you should get at least an error message which you can provide to us. So please tell us, what the program is supposed to do and what it is actually doing. I stopped using VS a long time ago, but I think the VS Version which was used to create the file is somehow important and you might face a compatibility problem here. But that's some wild guessing from my side. Maybe a more experienced user can tell you something about it. However, I suggest you put the book aside for a while and start learning the basics of c/c++. This is not an easy task since c/c++ are rather difficult languages, so it will probably take some time. In my opinion, it makes no sense to learn programming game physics without some solid knowledge about the programming language you intend to use. It will just frustrate you. Greetings
    16. The thread I linked in the first post shown interest so hopefully somebody does. And I don't mind language evolution, forking, absorption - all that exists to satisfy as many people as possible giving them the possibility to choose their lingo... but all of these language processes assume we don't loose the original definition so it can be looked back at when in doubt. And for some reason we lost this one. The idea behind sharing this at all is that we're all gaming geeks here and I, for one, like to understand the roots of the subject I'm geeking about. I apologize if it's irrelevant to GameDev website, I hope it is for some, never meant to post irrelevant thoughts. Cheers!
    17. Green_Baron

      Use shader with old OpenGL context

      I can say nothing to the old glBegin etc. stuff, but according to the timeline glsl with vertex- and fragment shadersl was introduced in 2.0, maybe as an extension. As well as draw buffers and vertex arrays. But i don't think you'll be lucky with a 1.1 context ... Maybe one should be prepared that support for the old way may fade out in the future. The new nvidia driver 430 told me it doesn't support anything older than a gtx6xx any more, or i'd have to install manually ...
    18. I'm always pre-allocating the list's nodes (reuse pool based on a stack) if that may help. I don't pay specific attention to cache related issues to be honest, in my case it's to avoid the double performance hit of creating new objects and garbage-collecting them (.NET C#).
    19. Hello. Long time no see.. Anybody knows is it possible to use shaders without actually using modern GL rendering context?I mean use some shader code with for example: OpenGL 2.0 ?Confusing but i have seen some old "legit" OpenGL code with some shader stuff in it.Or its not possible because of "context" ? I mean older context can't deal with modern stuff and modern code can't affect the old 1.1 commands? Lets say my app is using 1.1 API only and i want to add shader lighting into it. Not possible? I have a 1.1 app and would like to add some shader lighting to it. if its not possible then i should rewrite my whole program using modern OPENGL? Its a 3D map editor
    20. Hi! I've heard a saying that goes something like "Never do your dream project". It means that the ideas that you've been developing for years are not the ones you should create, but go into the industry - whatever it may be - with an open mind and do the projects that come your way. That may not be true in every case, but now it feels right. I have a few ideas and stories that I would like to turn into a game, but I think it would be best to start from scratch with this one. So it would not just be my vision, but the vision of the whole team. So I'm probing to see if there are any writers interested in collaborating in creating a story that would be turned into a game. At this point it is quite open what the game would be like, but I do have some opinions on the direction: -Made with simple tools like GameMaker Studio, RPG Maker or Unity, but with original assets made by our team. -The game would focus on story, dialogue, character development and multiple ways of solving a problem. -Keep it small, keep it simple. We should focus on telling a compact and coherent story. Keep gameplay mechanics, assets, music and size of the game world etc to a minimum, but hone them to perfection. Keep the project at a manageable size but still put a lot of effort into its execution. -I would like the story to be realistic, humane and personal. Instead of some far fetched story about a bunch of edgy and epic heroes on a quest to save the world. It could still be scifi, post-apocalyptic (my favourite) or fantasy etc, but done in a way that feels real and relatable. -Make millions of dollars. Of course Right now I'm looking for writers and maybe concept artists to hang out on discord, throw around ideas and try to come up with a thread we want to start following. I like to work in a way in which there are a ton of ideas and possible directions at first, but then we start to edit them out until we have that which works and what is essential. Come up with ideas and edit them out, over and over again. Chisel out the boulder until the statue appears. If you are interested, send me an email. Tell me a little about yourself, what kind of a story/game would you like us to make and a sample of your writing. For example a description of a character, dialoque sample, quest, story arc or all of the above. Same with concept artists, tell me a little about yourself and the vision you have for the style of the game and a sample of your work. A little about me: I'm a 32 year old man from Finland. My favourite games are Fallout 1 & 2 and Mercenaries 2. I don't have professional experience of games or writing, but I have studied game development in school and the art of writing on my own. I started this project because I love to come up with stories and characters and this is a change to write and develop a game with other people. To have fun and create something. I hope to hear from you! Mikko Levula mlevula@hotmail.com
    21. Ruben Torres

      Unity Addressables: It's never too big to fit

      Indeed, thanks for reporting! I'll ask the GameDev staff to update it. In the mean-time, this is the URL: https://thegamedev.guru/unity-addressables-learn-workflows/
    22. Hi, Interesting article, thanks for that! Could you check the blog links? None of them works for me, I get 404 when trying to check them. Thanks
    23. You need a consistent world information, no need to delete the information outside of the drawing chunk. You just have to chunk the loading time. If you delete any of the world information, it is lost forever. Let world information stay in the database, and use a flexible loading time. I'd give you example code in C++, but I really don't know which language/library you are using.
    24. Knowing the typical arrival pattern is indeed crucial. If you generally create events in increasing time order, even a simple bubble sort works. 90+% then simply gets appended, with a few doing a relatively small number of iterations to find their right spot. Note that bubble sort is very memory-friendly in its access, so it's less slow nowadays than it used to be. A mix is also possible. If the event is newer append, else find the right spot using bisection.
    25. Rutin

      GameDev - Doom Challenge - Part 1

      Thanks! I'm very strapped for time so I'm rushing through the assets as fast as time allows me to. I'm almost done the level environment textures and hopefully will have another blog post soon. Once that is done I just need to add in the game play element.
    26. asunbb

      DOOM: Skeletal Animations & Dynamic BVHs

      Great, I look forward to it.
    27. Hello - I am currently working on adding a chunking system/scrolling to my 2D game, but I'm having some problems structuring things in an efficient way. From my understanding, I need a world position and a camera position, and then I need to move the camera around the world and load/unload chunks as needed. I know that camera position is gained from the corners of the screen. I also know that the point of chunking is so you don't need a massive data structure to store the world in. What I don't understand is how to get world position if there isn't actually a world data structure, only chunks. So basically, these are my questions: How would I go about getting world position to implement chunking/scrolling? How would I "connect" chunks together so that they line up with one another, while also allowing them to be loaded/unloaded independently? Right now my rendering is simply taking in 2D array data (which is currently a single 50x50 chunk), iterating through it, and drawing the tiles equally spaced apart in a grid. Anything I've tried either doesn't work or is extremely inefficient. Thanks for any insight.
    28. Gurbrinder Singh

      Spear Stack 3D

      Play carefully crafted version of stack breaker and enjoy the Spear Stack 3D. - Bring the spear down to the bottom breaking stacks - Avoid black colored stacks - Get immortal by pressing and holding button for longer time - Play infinite levels of game - One touch controls - It will be harder to play at higher levels - Enjoy. The game has been released at Google Play Store as well. Please check it out at google play store Spear Stack 3D to provide your valuable opinions
    29. First of all, I'm new. Hi! Anyway, I'm mostly an artist and a fan of an NES game called Abadox, which I'd like to remake as a PS2-era survival horror game. I'm a big Silent Hill fan and I love the idea of a game where you're inside the body of a giant monster where it's pitch black aside from what your flashlight illuminates (plus maybe there's some bio-luminescence as well), and none of it is pretty. This was an idea I originally had about 14 years ago, so some of what I'll be posting is old. But recently, I've revived the idea and I've decided to be more serious about it. I used to work for a small video game developing company so I know how to model and animate. Granted, I don't know programming or game design, so I may need help with that eventually (also not sure how to deal with the copyright issue, but I'll cross that bridge when I come to it), but for now I'm just playing with the general look of the monsters and such. I would love some feedback. First I'll get some older drawings out of the way. Everything after this will be new.
    30. Derek Lawrence

      What can I expect as a Junior Programmer?

      Biggest thing, ASK FOR HELP. I see this a lot with juniors they come in and agree to everything and when they get stuck they panic and don't tell anyone. You are a junior you are not supposed to know much and the codebase will be brand new, especially since it's your first job. Nobody cares if you ask for help and it actually looks better than at the end of the day finding out you have been working on a problem already solved someone could of told you quickly. Everyone expects you to be there to learn just as much as you are to work.
    31. Matias Goldberg

      Speeding up voxelization from a high poly model

      I'd like to say a few things, since I've recently written a voxelizer in compute and done a fair amount of research: 1. GPU Rasterization to voxelize high poly meshes is a bad idea. GPUs are already bad at rasterizing tiny triangles, but this gets further aggravated by the fact that this approach requires interlocked operations and the high density of vertices means there is a lot of contention due to multiple threads trying to write into the same voxel block. Some papers mention their implementations have a drastic time increase with poly count due to contention. Triangle density per voxel also plays a big role, because it's not the same to have a mesh that has each voxel touch one or two triangles, than a mesh that has a single voxel with 600 triangles going through it. Another problem which most papers except a few often fail to mention (probably out of ignorance) is that unless the voxelization process is very simple, you need to blend your results; and there is no "interlocked average" instruction. Therefore implementations perform a mutex-like locking of a voxel. This is a problem because such approaches can result in an infinite loop because half a warp acquires the lock while another warp(s) acquires the other half, thus they will fight forever for acquiring the lock. Implementations that fail to account for this will result in a TDR, which is not immediately obvious unless you're working with high poly meshes, which is where contention happens and the infinite loop cases appear. Implementations that successfully account for this add a 'bail out' counter: If the mutex acquisition takes more than N spins, give up. This means the voxelization process may not be accurate, and worse it may not even be deterministic. But at least TDR won't happen. You could append those failure cases into a list and process them at the end serially though. The only way to properly implement this is using Independent Thread Scheduling introduced by Volta, and is only supported by NVIDIA GPUs (at the time of writing). This problem may not apply to you though, if you don't need any complex per voxel average/mutex. If a simple interlocked operation (like atomic addition) is enough, then ignore this drawback. You can avoid the "atomic blend" problem if your 3D texture is in float format, and track the accumulated weights in another 3D texture. This consumes a ton of memory. The "atomic blend" problem appears because of memory restrictions, thus we want to blend an RGBA8 texture or similar precision. 2. That leaves the opposite approach: Have each thread perform a box vs triangle test against all primitives. A brute force approach like that is super slow even for a GPU, much worse than doing GPU rasterization. However it can be greatly improved using hierarchy culling: partition the mesh into smaller submeshes, calculating its AABB, and then skipping all of those triangles by performing an AABB vs AABB test. The compute approach can be further improved by having each thread in a warp load a different triangle, and use anyInvocationARB to test if any of the 64 triangles intersects the AABB that enclosees all voxels processed by the warp. If you're lost about this, I explain this optimization in a Stack Overflow reply. While the theoretical performance improvement is up to 64x, in practice this optimization has yield us gains anywhere between 3x-32x depending on the scene involved (often between 3x-4x). This is what I ended implementing for Ogre 2.2; you're welcome to try our Test_Voxelizer.exe sample (build Ogre 2.2 using the Quick Start script). Find a way to load your mesh data as an Ogre mesh, modify the same to load this mesh of yours; and time how long it takes. That way you can easily test if this approach is worth pursuing or not. If it's not, then go back to the thinktank for something else. Note that you should test different values of indexCountSplit in 'mVoxelizer->addItem( *itor++, false, indexCountSplit );' as that value controls how big each partition is, and this can have a huge impact in voxelization performance. There is no 'right' global value, as the best value depends on how your mesh' vertex data is layed out in memory and how much space each partition ends up covering. Good luck Cheers
    32. Yesterday
    33. Hi All. Thanks for the feedback. Events ten to come in a flurry of activity and I believe they can get quite large in a small amount of time. I have not yet measured how large the event queue can get for processing. The idea of bucketing events so sorts will stay on a small element size is very appealing. The only problem here is there can be large variation between event times so I could end up wasting alot of space. A problem is the events don't necessarily come at regular intervals which makes it hard to decide a deltaTime that each bucket would cover. Linked list seems nice, but then the computer won't really be able to prefetch because the memory will not be contiguous. A great point you bring up is that I need a better understanding of the event distribution in order to select the best data structure. Right now anything can create an event at anytime and the often come in a big flurry. Which is then followed by periods of relatively less activity.
    34. Ferik

      Game Physics by Dr Eberly

      Thanks for taking your times and replying to my question, I tried to make my question a bit general and it was obviously vague. I am partly familiar with linking and compiling and I also have done ppm stuffs. The reason I did not specifically brought errors up is because first and foremost there are lots of error (in one case 612 errors) and besides sometime I get no error and I am still not getting any answers. As you can see my knowledge is way below average and I can not specify my problem clearly. Dr Eberly told me to open the proper sln file and build it which I did. I also did a lot of variations and I see no result. Is there anyone here who has experience with this specific book?
    35. Since the classic GPU voxelization approach has been mentioned already I will throw in some other ideas which are also suitable for CPU. As you mentioned "high poly model" - One idea would be to treat your model like a point-cloud and just flag voxels at those points. That only really works if your voxel density is low compared to your poly density i.e. you want dense, tiny little polygons compared to the size of your voxels so you can be sure that you won't have any 'holes' in the centre of polygons from the lack any true rasterization. One trick is to tessellate up your polys to get denser points if necessary, or simply generate extra points over the face of each poly (e.g. emit a point at each vertex plus one at the center of each triangle). Properly rasterizing your polys into your voxel grid is the other way to go. At the moment it sounds like you are doing cube-vs-triangle intersection tests between *every* voxel and *every* polygon which is probably why it's so slow. Whereas if you iterate your polys and rasterize them directly to the voxels that they occupy it is algorithmically a lot cheaper (roughly linear if all polys are about the same size as each other) and scales better for large numbers of polys and/or dense voxel grids. Thirdly, even with your current approach of box-vs-triangle tests you can likely speed that up a lot from where you are now. Hopefully you have some early-out tests like if all the vertices of the triangle are beyond one side of the box then it's a cheap fail. After that you could think about doing a coarse-grained spatial partitioning of polys first - The simple example is to split your model in half down the middle and voxelize each half model into the corresponding half of the voxel grid, now you only have to test 50% of the polys per voxel so you have doubled your performance and you don't have to stop there - split it into four and you quadruple your speed (minus some upfront cost to partition your model). If you're coding this as a CPU algorithm then for another speed boost you could throw the voxelization of each partition onto a different thread and process them concurrently - let's say you're on a quad-core machine with 2 hardware threads per core and at least 8 partitions then you might expect to achieve somewhere between 4x to 8x speed increase (just from concurrency).
    36. Timeline Games

      Devlog #4

      HI everyone, This is going to be a quick little update on development, I play tested the first 5 levels of region 4, and I am going to finish up region 4 later on. Have a good day, Buttercreeper6
    37. Timeline Games

      Slime Wars

      Slime Wars is a retro 2D platformer that is currently in development. You fight through 6 regions. Each region will have small changes on the enemies you fight, like higher damage or you can't see the enemy until you get within a reasonable distance. Each region a have 5 levels and 1 "Boss Level", which is a small level before a boss. The game will release on October 21,2019. If your really excited to try the game out I have a, if buggy, fun and expansive beta that can be played. Also: the game is free, so why not try it? Story: On the far off planet of Mundan their lives a once peaceful race of slime at came in a variety of colors. The one to rule this world was the Rainbow Tribe. They built their civilization on the principle of unity and peace, and so it was. Until a fateful day where the different tribes began to release that the planet was running out of resources, a council of the tribes was called to see what to do next. Most of the tribes, headed by the Rainbow Tribe, wanted to take their warships and take over new planets for their resources. Others, like the Green Tribe, wanted to try and salvage Mundan and grow from there. This dispute cause what was forever known as the Slime Wars. To keep the loyalty of the tribes aligned to them, the Rainbow Tribe appointed generals the where loyal to them only. They conquered all the tribes that dared think differently, all but the Green Tribe. The fighting though, made the planet unsalvageable, making finding another planet the only option. You, a member of the green tribe, must take over the "Royal" and free the other tribes and convince them to follow your plans of finding a fresh planet, one with no sentient life. Will you save the galaxy? Or will countless planets be forever covered in slime?
    38. Hello my name is Brandon and I'm currently an Animator and Rigger working with a small group of people to create market place content for Unreal Engine 4 and were seeking someone that knows how to add online features to any packs we create that being multiplayer support or working with our BP developer to get features online ready. If this might interest you we do provide royalties and projects are not game sized. You can contact me here discord or email. Brandon_Cadenaro#5123 brandoncadenaro@outlook.com
    39. Ok, I removed a few glm::transpose since I only transpose rotations part but translations part stay unchanged. I changed GL_FALSE to GL_TRUE in glUniformMatrix4fv... It displayed very distorted. All lines exploded all direction from center (origin). Then I changed back. Oops! I corrected a few codes. I changed glUniformMatrix4fx to glUniform1fv for gCamera. It still resulted the same... I will study my book more and figure them out....
    40. Launcher111

      Team Members for game design

      I've been working on the galaxy, while not giving to much away some key points. No humans (they become the invincible home team that name the franchise they become all powerful) No time Travel. No going back in time to fix issues. I have 25 species now, they are not unified on a species or galactic level. One species in particular they are a peaceful people, they are absolute experts on ship based habitats, and find themselves traded away, but masters of what they do. Some treat them with respect, others have them as a lower option on a menu. It would have many layers of complexity, for instance a species may have dark eras and be absolute monsters, followed by a taming down era. Where a species will not be finish to start vilians, may take a few hundred years... Alliance will come and go, but some will prevail. An aspect i find interesting is that species will seperate among many lines, home systems are not all loved by the species. Some have actually destroyed the planet from wars to where they limp into the space age, nuclear war, and orbital bombardment. The species are very diverse, all competent and useful, they all are bipedal humanoids, they are derived from animals (extinct and alive) not carbon copies by no means, an example fur loss, perhaps modified, but may keep attributes and traits from that species. An example lose the tails bigger heads, it wouldn't be a toddler galaxy. Will have a little bit of reptile against mammal. Obviously the best reptiles went extinct a few hundred million years ago. But reptile to mammal is around 40-60, smart animals where singled out, including purely aquatic. Much of the galaxy follows Heros of a species, one fun aspect is a main theater of war it has 2 stories following 2 different leaders, both of them accomplished, and the 2 different accounts explain the entire story. You watch one side and leaves you wondering how did they let that happen, and you find out as an example they stuffed ships with anyone with a pulse. Another aspect is some species have been in space for over a melenium, while others are in the dark ages. Some species will be close to 3 meters/yards tall, and others closer to 1 meter/yards tall. Still looking for partners especially animators, when the idea can be illustrated, wont have any issue getting coders.
    41. Ovva Games

      Scene created with Unreal Engine

      Cyrex is very important part of Between Realms plot. It’s a very powerful source of energy which, since been discovered, had changed the life of humanity. The ORUM complex, where the game action takes place, is the only place where Cyrex is mined, so the importance of this facility for the Earth inhabitants cannot be overrated. Cyrex itself plays no less important role in the game's storyline, sometimes being a helper and sometimes an enemy. What you see on the attached picture are the Cyrex cores - portable power units which will be used during the most important missions in the game. Please rate the quality of graphics on the picture and the power units design. Did we do it all right?
    42. Burgos Games

      Neko Ghost Jump!

      Official Website: https://nekoghostjump.com/ Twitter: https://twitter.com/NekoGhostJump Developed By: Burgos Games https://burgosgames.com IndieDB: https://indiedb.com/games/neko-ghost-jump Neko Ghost Jump! is a Puzzle-Platforming Time Attack game where the player's objective is rather easy, they just need to make it to the end of the level as fast as possible. The puzzle part comes from the level design and the player's ability to shift between 2D and 3D perspectives (and as such, the need to know when/where to switch) It started out as a gamejam submission for Epic Games' 2019 Spring #ue4jam and we decided to continue working on it ever since then. We are currently in our 17th week of production and there have been many changes and additions and most definitely polish added. You can see some of the changes made in this comparison video: https://youtu.be/gthftG8rcFw
    43. Something is borked. You should not have to transpose. Also, if it was reallyreallyreally necessary (which i doubt), i wouldn't bother the CPU with it but have OpenGL do it when reading the uniform data (see glUnformMatrix* ).
    44. Blindminds

      Modeling the FAF-X01

      Been working on some modeling and concept for the Fusion Atmospheric Fighter. It has been kind of slow going as I decided to use Blendre 2.8, and as great as Blender is and could be, it is EXTREMELY unintuitive....to the point I would almost wonder if the developers have ever used a computer before as the program veers far away from traditional UI shortcuts etc. and behaviors for 3D modeling that I am accustomd too. That a side, after a long hard struggle, I am getting to like it. Esspecially since it's free. I have a few time lapse videos posted of the modeling and creation process. For some reason, even though I do have drawing talent, I don't seem to do concept drawings first. I work straight in 3D and conceptualize there and this is the process you are watching.I am posting 3 videos below in order of creation (from what I can remember). By modeling the missiles and launcher system I was able to use the sizing needed to help me understand the needs of the airframe, and when I got to a point, I then needed to model the landing gear so I could decide how it would all fit in. I still have some details to work out, as for now I have more missiles than what would be storable with the landing gear and in final may try to design a method of keeping the missile quantity with landing gear, although I would prefer to keep the jet the size as it is instead of making it longer or bigger (I plan on having a second versn which will be a fighter/attacker version with dual engines). Some might be thinking I am putting way too much thought into soething that may not seem necessary for a shmup, but to me it's my art style. It HAS to be beleivable and "functional". Esspecially since I would like a super detailed real-tim rendering for when you are choosing weapons and loadout etc. for your ship, and to possibly have a walkthroughable hangar where you can walk around the ships and see them up close and personal. I also hope to build this into a franchise or even larger game where these elements of detail would become important. Anyways, many people don't realize the actual creation process and only see the end results so though some might be interested in seeing my work flow. It is a lo of time (like around 20+ hours for the posted video below) so to make it watchable it is sped up considerably. I tried to slow down parts of interest. The last video will be thebest to look at if you only watch one video... Modeling the missiles and missile launcher. The missile launcher is based on the system used on the F-22 Raptor which "ejects" the missiles from the internal bay. As you you will see in the vid, I found it to be quite larger actual scale, so based on the idea more advanced materials would be available in the future, I slimmed it down to accomodate the size of the Fusion Fighter (FAF-X01 for Fusion Atmospheric Fighter - Experimental version 01). I needed a way to remove and or shrink the fins of the missiles to be able to tightly fit into the internal bay. So based on the concept of materials which take different forms when an electric current is applied, the fins on the missile will expand when launched allowing them to be smaller for internal storage, and to remove the need more mechanical parts, maneuvering is done with thrustvectoring on the missiles. The size of the missile is based on the actual size of an AIM-120 missile, which in game would be a powerful missile for larger targets and I think I will design smaller (half-size) missile for smaller weaker targets and to accomodate twice as many missiles and same number of launchers (2 missiles per launcher). The first round of concept design. I originally started modeling this the one method I knew how and after working out an initial idea, I got to the point I discovered sub-d modeling and decided to start over using sub-d with what I had discovered design-wise so far on the concept to start the second round of the concept design. The design problem was based on creating a Fighter Jet that could handle supersonic and subsonic speeds which means it would need different engine systems (Turbofan, RAMjet and SCRAMjet) and based on how they function it seemed one engine could do all three if it could change "modes". So I designed to air intakes, one for the turbofan and subsonic speeds and the other to feed air directly to the combustion chamber of the engine by passing the compression chamber to feed air to the engine for RAM/SCRAM function for supersonic speeds. The fuselage will be composed of futuristic composite materials which will allow airframe "morphing" such as warping the wing shape etc. This would allow the jet to close the Turbofan intake or internally redirectthat airflow to the combustion chamber for RAM/SCRAM and cover up the turbofan for protection from highspeed airflow. I would like to show animations of this happening in-game so some details still need to be worrked out. Again, this is concept stage and the first round. I orginally though I would need 3 intakes (which is what you will see me designing at first, but then from some researc it seemed I could go straight frm turbofan to SCRAMjet functionality and would only need 2 intakes (Concept 2). Modeling the Landing Gear The 2nd Concept design. Based on using to air intakes the concepts discussed from the first round. I got to a point where I could use it in-game for testing so stopped working on it. I am currently not stisfied with the landing gear placment and the bulkiness of the lower body. I may ty to make it slimmer and the landing gear more in-ine wth fuselage, or may utilize the forced bulkiness to add smaller forward bays for smaller missiles (who dosent want more missiles??)
    45. Blindminds

      FUSION: Project Razor

      Started developing a new modern schmup as I have found it difficult to find an existing one I thoroughly enjoy. I started out with the concept of movement, as schmups often have pretty basic movement that looks and feels unnatural and choppy. I was always a huge fan of U.N. Squadron (Area 88) and loved the simple way they did a variety of weapons. My art style has always been based on thinking out an idea and how something works to determine how it will look. This project is no different and that's how I came up with the design of the ship. The player will be able to equip 4 different weapon systems at a time, each with it's own unique energy and mass requirements and 3 unique modes of fire dynamically switchable in game. You will be able to upgrade and advance the Fusion reactor with lighter weight, more powerful and more efficient reactors to pump out more MegaWatts for your weapons. I would also like to plan upgradable engines/thrusters which will be more efficient and more powerful to produce more thrust and use less mass for thrust. Movement, based on real physics in zero gravity of space, the player will have what I call a G-Burst for pulling high G maneuvers in space. The limitations of which I have based on real world humantolerances of G forces according to research I have found (Loosely based that is). With multiple modes of G-burst which can also be dynamically switched between, (Plan on having multiple pilots to choose from each with different abilities). Burst: the player can accelerate at a flat acceleration at a given G-Force depending on the pilots G-Tolerance | G-Burst: Acceleration at an accelerating G-Force until reaching a maximum | Max G-Burst: Max G Acceleration which decreases over time accelerating player as fast as humanly possible. This also consumes a whopping amount of mass for thrust! | Max G Stop-Burst: Same ass Max G-Burst except when released, ship calculates opposing thrust to immediately (as fast as possible) bring the ship to a stop. Technically using twice as much mass as the Max G-Burst. In order to maintain the players Mass Storage, they will be able to utilize a "Mass Condenser" which will be used to collect Mass Particles left by destroyed enemies. Unfortunately however, while using the Mass Condenser, no other systems may be used including thrust and all weapons. In equipping weapon systems on the ship, the player must take into account the output of their reactor. Equipping weapons which require more energy than a reactor can output will slow down the charge rate of all weapons accordingly. Equip weaker weapons with a more powerful reactor and you will be able to use all your weapons relentlessly at the same time. To replenish ammop types of missiles/bombs/mines etc, weapons systems are equiped with Rapid Rate Mass Fabricators to build on-the-fly and replenish your ammo storres given mass is available. Run out of mass and you will inevitably be flung into open space for the rest of your starving life... Please let me know your thoughs as I would like to know if there is enough interest for me to continue development
    46. Without transpose, I tried to move but it move oppositely and more confusing. With transpose, I move around correctly.
    47. Perhaps I will try Eigen instead but I plan to develop my own math library. Look at my code above. I cleared forth row of matrix for translation since matrix was already transposed. I noticed that camera position is part of translation area of MV matrix according to debugging printout of matrix.
    48. I must admit that rendering rte was the reason why i dropped glm and brewed my own math lib, because it does conversions and coercions silently through all sorts of converting constructors and cast operators that in the end i didn't know what type my data, if at all, had. Question: where do you strip the model view matrix from the translation part ?
    49. Ok, I studied my 3D Engine Design for Virtual Globes book. I tried to implemented RTE method with DSFUN90 but it did not work. Also I implemented vertices with error difference. I saw nothing when I cleared translation parts of matrix. When I leave matrix unchanged, planet re-appeared but still jitters when very close. I searched for some solution but can't find any solution so far. My codes (CPU side and GPU side) is: prm.dmProj = glm::perspective(glm::radians(DOFS_DEFAULT_FOV), double(gl.getWidth()) / double(gl.getHeight()), DDIST_NEAR, DDIST_FAR); prm.dmView = glm::transpose(glm::toMat4(prm.crot)); vec3f_t gCamerah, gCameral; convertDoubleToTwoFloats(prm.obj.cpos, gCamerah, gCameral); prm.dmWorld = prm.dmView * glm::translate(glm::transpose(prm.obj.orot), prm.obj.cpos); prm.dmWorld[3].x = 0; prm.dmWorld[3].y = 0; prm.dmWorld[3].z = 0; prm.mvp = mat4f_t(prm.dmProj * prm.dmWorld); uint32_t mvpLoc = glGetUniformLocation(pgm->getID(), "mvp"); glUniformMatrix4fv(mvpLoc, 1, GL_FALSE, glm::value_ptr(prm.mvp)); uint32_t chLoc = glGetUniformLocation(pgm->getID(), "gCamerah"); glUniformMatrix4fv(chLoc, 1, GL_FALSE, glm::value_ptr(gCamerah)); uint32_t clLoc = glGetUniformLocation(pgm->getID(), "gCameral"); glUniformMatrix4fv(clLoc, 1, GL_FALSE, glm::value_ptr(gCameral)); #version 420 // vertex buffer objects //layout (location=0) in vec3 vPosition; layout (location=0) in vec3 vPositionh; layout (location=1) in vec3 vPositionl; layout (location=2) in vec3 vNormal; //layout (location=2) in vec3 vColor; layout (location=3) in vec2 vTexCoord; //uniform mat4 gView; // Projection * View //uniform mat4 gWorld; // World space uniform mat4 mvp; uniform vec3 gCamerah; uniform vec3 gCameral; out vec4 myColor; out vec2 texCoord; void main() { vec3 t1 = vPositionl - gCameral; vec3 e = t1 - vPositionl; vec3 t2 = ((-gCameral - e) + (vPositionl - (t1 - e))) + vPositionh - gCamerah; vec3 hdiff = t1 + t2; vec3 ldiff = t2 - (hdiff - t1); // gl_Position = gView * gWorld * vec4(hdiff + ldiff, 1.0); gl_Position = mvp * vec4(hdiff + ldiff, 1.0); myColor = vec4(0.7, 0.7, 0.7, 1.0); // vec4(vColor, 1.0); texCoord = vTexCoord; }
    50. Yeah, that is a problem especially if the player moves along the boundary of some chunks that differ much in the used resources. That's an option one should consider. It's a little bit like a garbage collection system. Well, I think in my special case, I would not flag the resources themselves but the objects that are composed of them. Another option would be to have a larger offset between the player positions were a chunk is loaded and where it is unloaded. That would avoid loading-unloading ping pong if the player moves exactly along the border. No, I haven't yet looked at how other systems implement such a system. I just hope somebody who has already done something comes around and enlightens me. The problem is, that it is always hard to find information about such low-level systems since they are often hidden or not well documented. Until I find the relevant code pieces and actually understand them, I probably got 10k answers in this thread. Greetings and thanks for the input so far
    51. Perhaps you are right. Let me rephrase: Avoid not being transparent about it. Trust your audience enough that you keep them in the loop if you have to make the switch. Also don't do what Ooblets did and be condescending about taking the deal. Handle it incorrectly, and you risk losing your audience, and then it won't matter if you have Epic's money. With the state of Epic right now, I personally would do everything I could to avoid making the switch especially if I've already promised it to Steam.
    52. vinnyvicious

      Books on renderer architecture?

      Thank you! Those videos are really really good.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!