svetpet

Members
  • Content count

    105
  • Joined

  • Last visited

Community Reputation

171 Neutral

About svetpet

  • Rank
    Member

Personal Information

  • Interests
    Business
    Programming
  1. Hello, i have some questions regarding the multithreaded development 1. Lets have 2 threads that are accessing a queue, which is protected by mutex. Is it necessary to use the same mutex or we can use one mutex for one thread and another mutex for the other thread? If both threads are trying to access the queue, which is protected by one mutex, what happens? Does one of the threads blocks until the mutex is unlocked or the resource is directly accessed by both threads (which I think leads to data race)? If one of the threads is block, while waiting for the mutex can't we use 2 different mutexes, which would lead to the same result (not very practical, though). 2. We have one thread that is protecting a queue by mutex What happens if we use second mutex to protect the queue, while the first mutex is already locked? Is this meaningful at all? Generally my questions is do we always have to use only one mutex to protect single resource or we can use other mutexes?
  2. Well the reason I want to implement it on separate thread is the performance. The UI is complex - it has windows, sliders, pop-ups, etc.
  3. Hello, I want to move the whole UI logic + rendering, which is based on flash, on a separate thread, while the game logic will be on the main thread. Have any of you met this problem and how did you solve it? Do think it is practical to make any part of the UI multithreaded, or it should be left in the main thread, since there might be a lot of synchronization in some screens between the UI thread and main thread?
  4. Hello, I am working on game, where we use circles as collision bodies. They are fine, but for some objects they are not very useful (for instance 2x6 meters object). Circles are nice, because as the objects are moving towards waypoint and colliding between each other, they slide by the colliding object and continue to the waypoint.   So I started using oriented rectangles as collision bodies, which is a lot more realistic than the circles, but now the objects can stuck behind each other and stay there forever, which is not desirable.   As far as I know I can solve this problem by: - implement dynamic pathfinding - this will be the best solution, but more challenging - if unit is stuck behind another, it can slide to left or right (which is kind of a hack in my opinion) - use capsules, instead of rectangles, but I am not sure if I will have the desired effect   Do you have any suggestions?
  5. Hello, I am reading recently about Perforce and I am wondering if it is worth the price. It is about big team - more than 20 people, which uses SVN. Using SVN is fine, but sometimes can be annoying(missing status icons in explorer) and hard to work with (merging branches). Can you tell me if it is worth migrating to Perforce? What would be the annual price for around 150 people? Would Git be a good alternative?  
  6. Thank you very much, your answer was very helpful.
  7. Hello, i am currently working on custom format for resource packs for game. The packs contains assests, which are compressed. Currently i am facing the problem that if the assets outside the pack and inside it are the same, then the pack should not be rebuit. The easiest solution that i could think of is to save the timestamps of the files (last write) inside the pack. When starting to build the pack, the last write time of each file will be compared with the timestamp in the pack and it will be determined if there is change in atleast one file. Then if there is, the pack is rebuilt.  Is there a better solution of the problem?
  8. Hello, can you point me to good graphics programming books/tutorials for games? I have been game developer for like 2 years, doing all the tasks that needs to be done at work, but i feel that it is time to specialize. I have some experience with HLSL, but it is not much.
  9. Were do I start with game programming? c++

    I would recommend Frank D. Luna's books http://d3dcoder.net/ (skip DirectX 10 of course).
  10. Quick Opaque Pointer Example

    nice article
  11. AABB Tests in D3D

    I am not sure why you are talking about planes in the AABB, since the bounding box is described by max and min point and if you have some rotations involved, between the objects you want to test for collisions, you will also need additional things. I will suggest you to check out [url="http://www.toymaker.info/Games/html/collisions.html"]http://www.toymaker.info/Games/html/collisions.html[/url] . Also, please don't created two threads about the same thing. Thanks.