• Advertisement

dgi

Member
  • Content count

    28
  • Joined

  • Last visited

Community Reputation

253 Neutral

About dgi

  • Rank
    Member

Personal Information

  • Interests
    DevOps
    Programming
  1. Hey all , For a few days I'm trying to solve some problems with my engine's memory management.Basically what is have is a custom heap with pre allocated memory.Every block has a header and so on.I decided to leave it like that(not cache friendly) because my model is that every block will be large and I will have a pool allocators and stack allocators dealing with those blocks internally. So far so good I figure out how to place my per scene resources . There is one thing that I really don't know how to do and thats dealing with containers.What kind of allocation strategy to use here. If I use vector for my scene objects(entities , cameras , particle emitters .. ) I will fragment my custom heap if I do it in a standard way , adding and removing objects will cause a lot of reallocations . If I use a linked list this will not fragment the memory but it's not cache friendly.I guess if a reserve large amount of memory for those vectors it will work but then I will waste a lot memory.I was thinking for some sort of mix between a vector and a linked list , where you have block of memory that can contain lets say 40 items and if you go over that number a new one will be created and re location of the data would not be needed.There would be some cache misses but it will reduce the fragmentation. How you guys deal with that ? Do you just reserve a lot data ? dgi
  2. Hi , When you draw animation , you do it by drawing each frame.So you know how many frames you have in animation and the current one.From this you know when the animation is over and like Kreative Pulp said you can call a callback or just have some if statement.But I suggest you read about states and how to use this concept.You can have a concept of your character being responsive or not.
  3. Hi , Q1: You can create an object vertext shader with DX11 API and bind to the vertex shader stage when you need it.I suggest you read about shaders and how to pass data to them and do the shading and skinning . It's not easy its a hard transition but this is the new way .. and if you want to be good at graphics you have to know this . Q2: Assimp is a library that can read a lot of data formats and give you the information like vertecies , indecies , bones , bind poses , animation data . From this you can covert them to your own format and use it efficiently.The only connection it has to api - s like DX and GL is left - handed export or right - handed export that's it. The bottom line is read more about it it's not going to happen by just asking here. Good luck .:) DGI
  4. SDL2 for Visual Studio 2015

    It's not buggy at all I do it all the time. The problem comes if you are not using binaries built with VS2015. In the attachment are the binaries that I use with VS2015. + sdl2_image + sdl2_ttf DGI x86.rar PS : If you can't do it write me a PM I will tell you how to set them up
  5. Yep that was it.... I didn't call glBindAttribLocation .. I thought it was going to bind them by order but i guess not.   Thanks vstrakh :)
  6. Hi all , I have this strange problem : When I run the app on a device all of the objects look like spheres.What I do is develop and test it on windows and than porting it to android with ndk is simple.The first test I did on the device was with a quad and I thought .. ok it works.Then after some time when I was done with loading of the models , textures and so on I went to see how it looks on the phone and the models are rendered in the shape of a sphere.The texturing works..   It's like open gl somehow normalizes the position of my vertices.Just for testing I print the max length of the position vectors and It was 3.0f (on windows and adroid).   So I don't know what to do If any you have similar experience please tell.   The app renders with GL ES 2   dgi.  
  7. Hi , I don't know if I'm late but : I don't know any resources about that , but I'm a huge MK fan I watch a lot of tournaments .. It's all about frame data and hit boxes and motion capture .You have a concept for move ( action ) that have damage, animation , hit box at given time , opponent animation on hit , how many frames you can't press a button if you are blocked , how many frames the opponent cant press a button if he is hit , you also have a state of the animation where you are in hit state only at a given time (lets say when the foot of the character is extended to kick) , every move can also have a hit area like low , middle , high ...  . And that's it .. every time you have a collision you compute this  . The problem of these games is the large amount of animation and balancing you have to do , to make it good ..
  8. I  say go with the requirements .. if you need AAA game use AAA engine .You are not going to make it better then the comercial engine simply because they have larger user base and are already tested.If not just pick a engine with features that you need , a decent resource and memory management or do it by yourself.Generally if you are not making FPS a simple pipeline with just texturing , basic shading and skeletal animation will do the work.
  9. Memory Corruption

    Hahah Alberth before I open the topic I was thinking to write word by word the exact same thing ... wow
  10. ASCII C++ Graphics Library

    I've never heard of lib that imitates the console.The easiest way would be using SDL glyph library.Pick a size , prerender all the glyphs you need and then implementing the rendering engine should be easy.
  11. Make sure the second program is compiled and linked correctly.There is tutorials on how to get compile errors.
  12. Happy to help :) if you have two influences on some vertex you can just set the other twi to 0.So you can just unroll the loop and be something like this :   v += matrix[v.ind[x]] * v,infl[x] v + matrix[v.ind[y]] * v.infl[y] ..   its just tha fastest way and you can shave off some frames if you have a lot of animations going on .   dgi
  13. Hi , So a few things :   1.Why is your math class singleton ? Do you hold any data to need an instnace.   2. Limit the weight influences to 4 . Every 3d package can export it like that and its more than enough.The point is the remove the ifs and loops.   Maybe at some point of time the calculation of the matrixes goes wrong and you don't see the model.I don't think it's from the constant buffer because I do it the same way. Just make sure the buffer's usage is Dynamic.
  14. I understand that you want to make everything flexible , but you have to create some context / world to work with in. From what I understand you want to create some sort of Minecraft type of game . You can use the component - object model where you have a class GameObject and a bunch of components with their properties.   like this   class Object { WoodComponent * wCompoent;  ...   WoodComponent * woodCompoent(); };   And you create just the component that you need , and the other ones are null . I know this could be heavy on the stack but .. still it's a nice model. You can add components very easy without changing the current code.
  15. The way I would do it is to give the objects logical and geometric properties and then the tools can itarate through them amd see if they can interact with them. The abstraction can come from other parts of the logic , like what happens when the object is removed from the stage / scene or added there and so on .
  • Advertisement