Jump to content
  • Advertisement

Acar

GDNet+ Pro
  • Content count

    75
  • Joined

  • Last visited

Community Reputation

1156 Excellent

1 Follower

About Acar

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

6081 profile views
  1. I'm new to FBX SDK and I'm trying to write an exporter which will take a 3D model stored in memory and export it to an .fbx file. I have managed to export basic model information such as vertices/faces/normals however I'm stuck with exporting skeletal information. Skeletal data is as simple as a basic bone hierarchy, per vertex bone indices/weights and bone inverse matrices. I've read through some of the sample programs from FBX SDK but couldn't make sense of it. Any help would be appreciated.
  2. Previously I had the whole 'dt_sys' loop out of the loop. What was happening is that it was spending a huge amount of time trying to lock mutexes. I do have mutexes(CRITICAL_SECTION) in places such us PopCompletedParallelTask, FlushClientSendBuffer(I use IOCP for external networking) and similar. I do decrement them inside the loop after every step. /* Calculate delta time */ ct = GetTickCount(); dt = ct - g->last_update_ticks; dt_sys = ct - g->last_sys_update_ticks; while (dt_sys >= SYSTEM_STEP_SIZE) { if (dt_sys >= 500) { logMsg("System update loop has fallen behind: dt=%u", dt_sys); step_size = dt_sys; } else { step_size = SYSTEM_STEP_SIZE; } /* Update things */ dt_sys -= step_size; } /* Do similar for simulation update loop */ g->last_update_ticks = ct - dt; g->last_sys_update_ticks = ct - dt_sys; I'm using GetTickCount() indeed. I will look into QueryPerformanceCounter().
  3. Hello. I have a bizarre inconsistency in my server update loop. Below is approximately what I do: /* Calculate delta time, do other minor things */ while (dt_sys >= SYSTEM_STEP_SIZE) { /* SYSTEM_STEP_SIZE = 20ms */ /* Update sockets which are connected to other servers, swap queues for received packets, parse queue for received packets(doesn't actually parse packets but instead copies received data onto client ring buffers), update send network ring buffers for all clients, parse parallel task results */ } while (dt >= STEP_SIZE) { /* STEP_SIZE = 50ms */ /* Run game simulation */ } /* Travers client list and parse packets (with a maximum value as to how many can be parsed) */ I get very inconsistent update times for my game simulation(sometimes it's 0ms, sometimes it's 16, 60, 100 and goes all the way up to >1sec!). As you might have noticed I don't have any sleep in anywhere in my code so it ends up taking up an entire CPU core(is it a bad thing to do?). Now here's the bizarre part, when I attach a profiler (Very Sleepy CS) the inconsistency sort of disappears. I start getting update times between 0-16ms with very rare spikes. I'm honestly very confused at this point and not sure how to debug this further. Another thing worth mentioning is that I use GetTickCount to calculate delta time used in loops above.
  4. There's one last thing I'd like to ask before I delve into attempting to move onto database storage. Should I keep storing data as binary blobs or structured tables (a different table for account information, player information, item information, etc.)? Binary blobs seem simpler but I would need to serialize whole account data every time I want to make a relatively small commit like an item deletion.
  5. I've been considering using databases but am afraid of the initial workload it could bring. Using file-based storage is really nice for me when developing but using a database might be inevitable due to limitations pointed by hplus0603.   As you mentioned I don't commit anything to disk other than when I'm taking backups so I don't actually write to a guild entity file when someone joins a guild until next scheduled backup.   I will see if I can move onto using a database. My last attempt wasn't very successful but that was mainly due to me using them improperly.   This is actually something I'm not sure about. With file-based storage I feel the need to either save ALL game data at one successful attempt or none at all. Reason being, for example when 2 players trade an item, I would need to re-write 2 files. If something goes wrong after re-writing the first file I'd end up with a duplicate of same item. Which is probably another thing which could be solved automatically by moving onto a database storage.   That I believe I didn't mess up. I do take a backup to a separate folder first and then copy that backup to a dummy folder to finally swap with live server folder.
  6. Hello people. I'll start of by explaining my current persistent data model and then ask for some advice regarding it.   Currently I'm using a "single file per entity" kind of model to store persistent data. A single file for each account which includes account information, player information, item information belonging to each player, etc. Similar goes for guilds and other separate entities. I do load accounts when someone attempts to login and unload when a backup is being taken. For guilds and other similar entities, I load them and never unload.   This works fine for the most part but, when the server crashes for whatever reason I lose all data which changed since last backup. So my question is, can I adjust my system in a way that even if the server crashes I will be able to recover unsaved data?
  7. Sorry for the late reply Feint. While your project seems interesting it doesn't seem like what I'm looking for.   @Eddow, I did add you earlier today. Hopefully we can talk further tonight.
  8. Hey,  I was thinking of starting from the very start. As in creating a window using OS api(CreateWindow(Ex) for windows for ex.), creating a render context for OpenGL, etc. The word 'engine' is pretty scary so I guess I'd call it working on a set of tools to help us build a game.  Nice name by the way :)
  9. Acar

    MMORPG

    Just because something is done by a lot of people doesn't make it legitimate.    However, seeing as the game is dead and likely to be never used by its copyright owner, it might not be such a bad thing for someone to try to revive it considering they're willing to write their own server which is a heck load of work.
  10. I'm a self taught c/c++ programmer with a few years of non commercial experience and written a range of non commercial applications. I do have a bit of experience with OpenGL(like I have written a parser/renderer for a certain model file format and written few mini games) but lack in more advanced 3D programming topics.    I'm already working on another project which takes a good chunk of my time so I would like to take it easy with this one. Main objective in this project would be to explore 3D programming techniques and apply them to whatever game we would be working on. Needless to say that the person I am to partner up with would be free of any task and choose to contribute whenever, to whatever.    I was thinking of an abstract online rpg as the genre for the game. 'Abstract' as in world, characters, etc. to reduce the need for models. I'd be in charge of networking as it is the subject I'm most comfortable with. That said, I'm opened for better suggestions.   If you're interested, feel free to message me here.
  11.   Thanks, I'll read up on these.       You're right! After reading your answer I went back an reread the paper and it indeed mentions about a freelist for nodes. I will go ahead and read about lockfree linked lists. Thanks for the answer.
  12. I'm trying to understand and implement a lock free queue in C. However there're some parts of the whitepaper I'm reading which I'm confused about.   First, if you look at line D5, locally stored head and Q->Head are being compared. When remove, it's causing issues regarding dead memory but I cannot understand how this provides any protection as Q->Head can be modified after the comparison was made. Second, if you look at lines D4 and D19, head.ptr can(and sometimes is) be a freed pointer causing an access violation exception to be thrown.   Current implementation I have suffers from the second issue I mentioned: int dequeue(struct Queue *queue, void **data) {      struct Pointer QUEUE_ALIGN     head;      struct Pointer QUEUE_ALIGN     tail;      struct Pointer QUEUE_ALIGN     next;      struct Pointer QUEUE_ALIGN     new_ptr;        while (1)      {           head   = queue->head;           tail   = queue->tail;           next   = head.ptr->next;             if (head.ptr == queue->head.ptr && head.counter == queue->head.counter)           {                if (head.ptr == tail.ptr)                {                     if (next.ptr == 0)                     {                          return 0;                     }                     new_ptr.ptr      = next.ptr;                     new_ptr.counter  = tail.counter + 1;                     DWCAS((void*)&queue->tail, (void*)&tail, (void*)&new_ptr);                }                else                {                     *data           = next.ptr->data;                     new_ptr.ptr     = next.ptr;                     new_ptr.counter = head.counter + 1;                       if (DWCAS((void*)&queue->head, (void*)&head, (void*)&new_ptr))                     {                          break;                     }                }           }      }      free(head.ptr);      return 1; }
  13. Much appreciated for the detailed answer. Looking at your examples, I realised I've been going at it the wrong way. Now that I've removed pitch and yaw variables and apply rotation/transformation whenever a new input is given, I no longer have the issue and all works well. Thanks!
  • 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!