• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About Semei

  • Rank
  1. So after all those dedicated posts about Component object model i decided to use that into my game, utilizing Artemis.Net. Now, about networking it is unclear, on how i should properly integrate that, without messing up my components/systems.   I'm planning to use Authorative server model.   So basically from what i understand, i would have an 'agreed' clean/begining state of objects in both server and client. Then, when a component from any of entity updates, it is marked 'dirty' and is added to some sort of queue 'send list'. Or when it is needed to create new entity, a 'create this entity from this template' type of message is sent.   What is unclear, is how to properly implement this right from the start, so i have a nice system to work with, that i will not have to change later. Where do i store the 'dirty' flag? In each component? How do i manage different versions/generations of entity?   How do i manage cycles or behaviours, that are consistent and depend on system? For example, if i have circle on ground, that changes its color to,say, red, if player steps on it, and continues to pulse and change its behaviour, depending on color. I would have a 'Pulsates' component in entity, that has property like 'isPulsating' and 'currentPulseColor', that would change every frame. But i dont want to send pulsating color every frame, if i know, that if i had a message update of 'isPulsating', i can calculate pulsating color just from that, i dont need updates on pulsating color every frame from server. How do i manage and distinguish between things like 'isPulsating' and 'currentPulseColor'? And then again, i would sometimes need to know everything, for example, if the circle was not in range, and then becomes visible, i dont know for how much long it had been pusating and therefore cant calculate its color, and i need that data...     hplus0603 Had a little insight into this a while a go, could you maybe help me with this?  
  2. [quote name='DevLiquidKnight' timestamp='1341381233' post='4955536'] I also would question why your trying to do this? Typically this is the type of thing game hacks do, which I am willing to guess is exactly what your trying to do. But a quick google search produced the following: [url="http://spazzarama.com/2010/03/29/screen-capture-with-direct3d-api-hooks/"]http://spazzarama.co...ct3d-api-hooks/[/url] [/quote] Copying screen buffer is not a hack, it does not change or automate any of the behaviour of the software, if doing that would be considered hack, then using things like fraps or any other screen recording software would be bannable offense. I know about that spazzarma api hook, but its overly bloated with extra threads, and probably even changes running application by running CLR runtime host on it, and i dont want that. Also requires your assembly to be installed in GAC.
  3. [quote name='DevLiquidKnight' timestamp='1341269391' post='4955091'] Why don't you simply use [url="http://research.microsoft.com/en-us/projects/detours/"]detours[/url]. [/quote] Why would i use complete library only to install a hook to 2 functions? Its also not free for commercial and limited in express edition, lets not be ridicilous here.
  4. I'm developing application in C#, and i'm currently strugling in finding the general correct steps required to sucessfully hook DX function in order to send screen buffer to my main application for some processing. Here is a list of what i think i should be doing so far: 1. Attach a custom C++ dll into target application, from my main application (written in C#) 2. DLL hooks some (Device Present and Reset) functions in d3d9.dll that is loaded in target application. 3. After even occurs, i need to send a callback event from the custom dll to my main application, containing the screen data Can someone please correct me where i could have gone wrong and help me with point 3? I'm not expirerenced in dll callbacks, let alone not a C++ interop guru and im having a trouble understanding how i could possibly have a callback to my main application from a C++ dll loaded in another application.
  5. I doubt there would be other way of doing that besides having to transfer texture memory from one gpu to cpu memory and then creating a texture on second gpu from that memory. Also, calling one of your gpus a 'slave' is not a nice thing to do, it makes gpu sad.
  6. Thanks for replies, seems that problem was only visual bug - i was changing texture faster than monitor could repaint it, creating some kind of tearing that only seemed like code problem.
  7. P.S Im not reading it back to CPU, operations are on GPU only. (where is edit button? [img]http://public.gamedev.net//public/style_emoticons/default/wacko.png[/img] )
  8. Im rendering to a render target, then copying render target texture to shader resource, that is used as input when rendering to a render target. Problem is - the stall accours in unknown (ok, i could try to find first place where the texture is used besides when inputing it for render target, but that would somehow intruduce some random junk in my code.. ) Problem is that I need to know precise timing before last texture copy. Isnt there really a way to make it stall where i want it to?
  9. [b] Hi! How i could wait on my cpu thread for graphics device to complete copying resource before i continue executing ? DeviceContext-CopyResource is Asynchronous and creates some undesired behavior when i need to use it in my application, because i need the last copy to be done before i issue another...[/b]
  10. Client: I started moving from X, to direction Y at time Z Server: OK, as your speed is S and time passed from Z is T, your position X0 is now X+Y*T*S Client: As you say. Dont accept or deny anything from client, just take the input and update client according to game server rules.
  11. Hi! I would like ask opinion on idea, because i don't want to waste my time implementing something that is stupid right from the start. Story is i don't want to do deferred because i love and need transparency, max amount of possible materials and anti-aliasing plus dont have time to implement sophisticated systems to get that kind of things to work well with deferred. Im using DX 11 only. So im thinking about this: 1. Render all scene depth only 2. Calculate view-space minZ-maxZ value for each tile (one tile could be about 16x16 pixels) in compute shader 3. In compute shader- calculate for each light what tiles it intersects and add light index to that tile 4. Render scene normally and light like this: 4.1 Determine what tile this pixel lies withing 4.2 For each light index in tile light list -> lookup it from the global light table and calculate lights I know there is this: [url="http://visual-computing.intel-research.net/art/publications/deferred_rendering/"]http://visual-comput...rred_rendering/[/url] but it still uses G-Buffers.
  12. [quote name='Butabah' timestamp='1314762016' post='4855732'] Like I said, I don't want to give up on it and move to XNA or something else, because I've worked on this since July... I just look at it and my mind goes blank [/quote] First of all the thing you are saying here is THE thing to avoid in programming. No matter how long time you spent on implementing something its always a good idea to leave it in dust if you have a better implementation at hand. So i would say that you need to leave this OGL engine where it is and start some XNA/DirectX stuff and make some actual game. Why XNA not your engine? Because you will be needing a lot of things to implement in your engine that XNA already has and will be saving TONS of time if you leave your engine status as educational only and use XNA for actual game. Just sayin'. P.S XNA could be any other complete 2D/3D library, through i would suggest it to be DirectX based as it will have more value in the long run.
  13. Yep, that was the first thing i noticed. I think i made universal approach by noticing that there is actually 3 types of points if we ignore Y coordinate: left, mid(tip), and top and made a simple snipped to calculate points like this (mid x coordinate need some work thro): [code] (Does not work yet i think..) public void CalculateTriPoints(int triX, int triY) { int quadX = triX / 2; int quadY = triY; int facing = (triX + triY) % 2; var pointMID = quadPoints[quadX + (facing - quadY % 2) * (facing - quadY % 2), quadY + (1 - facing)]; var pointLEFT = quadPoints[quadX, quadY + facing]; var pointRIGHT = quadPoints[quadX + 1, quadY + facing]; }[/code]
  14. Hi, given this type of coordinate system (image) i need a way to get 3 vertex point coordinates (integer, red dots in image: bottom left point being 0, 0 and top right 3, 3) given a triangle coordinate. [img]http://i.imgur.com/y6zrm.png[/img] Basically there are 2x number of elements in X row and they are arranged in triangle patern seen. I have a way made to do this, but its kinda ugly and im wondering if there is some other way to look at this and calculate coordinates without using conditionals?
  15. The same way you wold draw simple scrolling image. Also thinking about how to get hexes to draw together without cracks and seamless is not needed - you can just splay your terrain height displacement on ground, and using that displacement in terrain vertex shader to displace regular triangle grid. Also civilizations implementation is not-so-cool because there is still a crack visible ;p
  • Advertisement