Jump to content
  • Advertisement

Shannon Barber

  • Content Count

  • Joined

  • Last visited

Community Reputation

1683 Excellent

About Shannon Barber

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Shannon Barber

    MS C++ annoying data alignment.

    I suppose I did get it backwards - if you have base-class pointers, A's then, you'll want those pointers aligned. When you vector to B virtual functions you will want that look-up aligned. If you follow the POD rules (plain ol' data-type) you should see it compact.
  2. Shannon Barber

    MS C++ annoying data alignment.

    8 byte alignment is what you're going to want for most cases on x64. You can get a B without an A just by casting it and you don't want all of your B pointers misaligned. The standard is mute on this subject as it is implementation defined behavior. vtables are not mandated, a given implementation could do something different.
  3. Shannon Barber

    List all servers over LAN (TCP/IP)

    If you use it will broadcast on all interfaces so you don't have to figure out which one is the right one. (Pair this with listening on so you receive from all interfaces.)
  4. The canonical name for your 'component' is entity or boid (entities with behaviour) if you want to search for further reading. The major component implementations that realize the data in the boids are called engines. e.g. graphics engine, audio engine. physics engine
  5. Joel on Software is a good starting point for nascent project management. https://www.joelonsoftware.com/2007/10/26/evidence-based-scheduling/
  6. If everything derives from a common base-class then you can override new,delete,new[],delete[] and do book-keeping there.
  7. ... or a valid pointer to a string that is not properly null-terminated.
  8. Shannon Barber

    Interface response times

    As mentioned above this is part of the contract of the interface but which way it should be designed depends on the usage of the data. If it's real-time then you might want to poll the REST data you need, cache it, and add a time-stamp to the data so you know how old it is (so you could interpolate.) If it's not real-time then just make the REST call.
  9. Shannon Barber

    UDP networking

    UDP packets are supposed have priority over TCP packets. Not sure if they actually implement it that way though.
  10. Shannon Barber

    std::vector and iterator question

    That's what .push_back() does.   Just use .reserve(n) to preallocate memory for your objects. If they are small and simple let them be copied. If they are complex then store pointers.
  11. Shannon Barber

    Pd.D. C.S. Research Topics?

    'Efficient large-scale voxel management' is the best I got.   To really do research you'd have to move beyond the triangle-based graphics system we use today.   I forget what it was called but there was some work done to develop a system that sort of simulated little lumps of clay; instead of creating the world with flat triangles the artist put it together with 'stuff' that had volume.
  12. Shannon Barber

    Basic multithread question

      Thus class you have adviced, will perform a check on a condition sparsely, to save CPU, but I gess it will be some 1ms   If we were running on i386's at 33MHz it might take 1 ms. A realistic expectation today would be 750 to 1500 ns. Condition variables are the *nix analog to Window's Event notifications. They are slightly different but can serve many of the same purposes. They are a kernel synchronization primitive not a user-code technique. Spin-locking is also available when you have an SMP kernel.
  13. Shannon Barber

    Why C# all of a sudden?

    For independent development C# had a lot to offer in terms of increased productivity while minimizing the performance sacrificed for it (this is what Java got wrong; it did things in essentially the most wasteful way possible instead of the least.)   For a little while it looked like C# was going open and would be ported across platforms in a meaningful way. We had cross platform OpenGL engines written in C# pretty early on around 2004. This dream is now over. Core .NET is a dilapidated product with no market. Cross-platform WinForms was deprecated many years ago. Unity and their method of Mono integration is migraine-inducing.   In the meantime C++ has added features and libraries to make up for the gap and community now appears to take maintenance more seriously with more frequent updates.   A C++/CLI bridge from your core code to a C# GUI may make sense if you want a custom editor but I think I would look into other options before committing to that (Qt, wxWidgets, GTK, et. al.).   So while there was a push to C# I would say that has run its course now (it's peaked). The C++/Lua route is proving to be the solid platform.
  14. Shannon Barber

    Passing data between states in an FSM

        I would fix this problem rendering the other mute.
  15. To write code that compiles and works properly and well across the widest range of platforms you should favor int and you only ever specify a fixed size when you are working with serialized data.   You generally should not be indexing data-structures and if you must then it should be contained within the class if possible. Iteration is generally best performed by the higher-level C++ constructs or pointers.   If you have large buffers that you are sharing and must expose indices then either use size_t/ssize_t or expose your own public typedef (favored name is size_type).   If 'int' does not match the register size of the machine then that is a defect in the compiler and is your warning sign to stop using it because there will be worse problems coming.
  • 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!