Jump to content
  • Advertisement

Scourage

Member
  • Content Count

    313
  • Joined

  • Last visited

Community Reputation

1199 Excellent

About Scourage

  • Rank
    Member

Personal Information

  • Website
  • Role
    DevOps
    Programmer
    Technical Director
  • Interests
    Audio
    Business
    Design
    DevOps
    Production
    Programming

Social

  • Twitter
    bobholcomb98
  • Github
    bholcomb

Recent Profile Visitors

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

  1. Scourage

    Opengl error drawing vertex (far)

    It's definitely a depth buffer issue. Part of the problem is that your far plane is at 600,000 and your near plane at 0.1. This is a very large range, even with a 32bit floating point depth buffer. I'd leave your near plane at 0.1 , but I'd pull your far plane back to 10,000 or closer (I'm assuming all distances are meters here). cheers, Bob
  2. Scourage

    Any Book Recomendations?

    I'd recommend these books:    -The Art of Game Design: A book of Lenses by Jesse Schell- This is a great book about how to look at game play and understand why its fun/engaging (not really programming) -Game Coding Complete by Mike McShaffrey-This is another great book about what it takes to build a game and the fundamentals that go into it (more programming related, but at a high level)   Why are you waiting to learn a language?   A language is just a tool to express your ideas into something a machine understand.  Whoever advised you not learn other languages is wrong, for any reason.  If you can learn one language, it can make leaning others easier.  If your classes have some made up language for a test, knowing a real language can't hurt, it should be helpful especially if they're trying to teach fundamentals of computers.     Go out and learn C# or Javascript and start experimenting in Unity right now.  It's free, there are great prebuilt assets to keep you moving forward, and it will let you focus on making your game fun vs getting bogged down in trying to  making a game.  It's a great way to get started and prevent stalling out.   BTW, you will never feel ready to start making a game.  There is always one more thing to learn.  Start now and build your experience base, even if it's not the perfect.   cheers,    Bob
  3. Scourage

    Sharing object between 2 threads

    It sounds like your main thread is running the simulation and your auxiliary thread is rendering the entities.  You can probably get away with reading the entity without locking if you make sure that you only read from it.  You need to look at it from a memory contention standpoint.  If you don't lock, you  run the risk of having part of the data change on you while you are reading from it.  It's up to you if that is a bad thing or not.   Double buffering the data may help prevent partial updates, but you need to prevent the buffers from being swapped while somebody is reading from it (again locking).    You might want to consider your threading approach.  Having a separate render thread may not be the best thing in this case.  You might want to have the main thread do an update pass then a render pass but use a worker thread pool to achieve parallelism.  Instead of having a single "coarse grain" thread for rendering, use a bunch of work threads to get "fine grain" threading within a single phase.     For example: In your main game loop, you update your game objects by passing them all off to worker threads to be done in parallel.  Then when they're all done, you go to the render phase.  In your render phase, you do entity visibility culling and build render commands per entity in a bunch of worker threads in parallel.  if you are able to encapsulate the render commands, you can build a list of them in the main thread and then pass the entire list off to a coarse grained rendering thread for execution while your main thread goes back to updating.     cheers,    Bob
  4. So the problem is that you are expecting the elements of the array to be there, but they're not.  You're only allocating the space for the elements in your array, you then need to put something there.   PlanetDetails[] Planet = new PlanetDetails[10]; for(int i=0; i<10;i++) Planet[i]=new PlanetDetails(); Cheers,    Bob
  5. Scourage

    Yeah Me!

    Nickle and dime'd my way over 1000 points.  Only took me 16 years.   Cheers,    Bob
  6. I use CMake for work, but I've been using premake (https://premake.github.io/) for personal projects and have been slowly introducing it at work.  Premake uses Lua as it's configuration language.  I find it much easier to work with than CMake, especially when writing functions to do something complicated.    To answer your original question: when I was looking for alternatives to CMake, I tried bjam, but didn't find it very user friendly.  I had used scons for a long time when working on Blender, so I knew that wasn't what I was looking for.  I stumbled onto premake and it just worked out really well for me.   cheers,    Bob
  7. Scourage

    Wow! Where did all the time go

    I thought I would have time to document my thesis work, but I guess I didn't. At least I called my mom (for those willing to actually read my other post) . My Thesis is complete, and I passed. My title was "A Flexible and Scalable Architecture for Simulation Engine" and it weighed in at about 130 pages. Great reading if you ever want to go into a coma. I ended up with thousands of zombies and tens of thousands of trees in my sim engine. All running pretty well (could have been faster, I'm sure). I'm looking to put together several tutorials on it and use it for the basis for more fun graphics experiments. Maybe when I get some free time. cheers, Bob
  8. Scourage

    I know where I want to go today...

    [font=arial, verdana, tahoma, sans-serif][size=2] So I've decided to use this blog to provide an running commentary of my thesis in Modeling and Simulation. I'm hoping I stay interested in it enough to update it once every couple of weeks. I know that there are quite a few of topics in this post that I would like to go in-depth on. I'm working on a simulation engine (think game engine with the focus on simulation and not rendering) for massive entity counts such as 100k or higher that scales (in terms of cores and machines) easily and allows for simulation over a planetary scale. First a little background on what I'm doing: Overall design:[/font] The game engine is an entity bases simulation that uses a component model for the entities. All communication between entities and the components of the system is done through message passing, which allows for much easier multi-threading as well as much easier communication between server back ends. Entities are comprised of behaviors. Behaviors will define an attribute if it is something that needs to be shared with other behaviors or entities. All attributes are cached every frame, so there is temporal consistency during an update phase in a given frame. Tower of Babble: I had originally thought that most of this engine would be done in C++ and had started working with what I knew, but my advisor insisted on C#. At first I was pissed-I had already done quite a bit of work in C++, which I use for my day job and was very comfortable with. Not to mention I really wanted nothing to do with C#. Give me my trusty C++ (or C for that matter) and let me work with the machine as nature intended it. However, as I started to get into things I found that my productivity was quite a bit higher. It took me significantly less effort to build a capability in C# than it did in C++, and debugging was drastically reduced. Toolbench: I'm using a number of 3rd party tools to get this running, which I'm sure I'll discuss in quite a bit more detail in the coming weeks. While I was using C++, I used a custom build of GLFW for windowing and input, but since switching to C# I've settled on OpenTK, which is nice since it also has and C# bindings to openAL & openGL. I'm also using ZeroMQ for my message passing infrastructure, which I had recently learned about. ZeroMQ is very cool and pretty fast for what it does. I'll be sure to discuss it in quite a bit more detail later. I use Lua for all in-game scripting as well as any data definition files (such as entity and GUI templates). I'm using LuaInterface for my bindings to C#. I had started using Google's protocol buffers as my message protocol framework, but found that it's lack of inheritance and inability to easily identify a message type from a bytes stream just made it worth the effort to write my own code generator to create message classes off a simple message definition file (again using Lua). I keep going back and forth between Horde3d and Ogre3D for the rendering capability. Again rendering is not the focus, so it's whatever integrates the easiest that will win. I'm leaning towards Ogre3d since there's a bunch of Blender models that I want to use (not to mention I'm a huge Blender fan) and it has a cleaner data pipeline for Blender. Not to mention Ogre3d seems somewhat more active community. LOC-what a stupid metric I personally think LOC (lines of code) is a horrible metric for estimating effort on a given project, but in this case, it actually is a good metric for measuring the effort between the two similar projects (especially since I was the only engineer working on it). I've finally rebuilt 90% of the existing capability with significantly less code. my original effort was right around 22k lines of code in c++ and my redone effort was about 8k lines of code in C#. I figure another 1k lines to finish that last 10% and have the same functionality with about half the lines of code. That also translates to quite a bit less debugging. My free time is so scarce right now and I'm on such a tight timeline that this kind of productivity boost is a huge win. Performance tests aren't conclusive yet. My original C++ test application (that did almost nothing) was getting in the ballpark of 2000fps, and the C# is running at around 1400fps on the same machine, but they're not doing exactly the same thing, so it's hard to tell just how much performance is lost to using C# vs C/C++. I'm guessing at this point, as long as it's above 30fps, I'm happy. Let's see what happens when I throw a couple thousand entities at it. Behold! A spinning box with a cheap crate texture. Let the awesomeness flow. Next post: Kernel and application framework in depth...
  9. Scourage

    I know where I want to go today...

    [font="arial, verdana, tahoma, sans-serif"][size="2"] So I've decided to use this blog to provide an running commentary of my thesis in Modeling and Simulation. I'm hoping I stay interested in it enough to update it once every couple of weeks. I know that there are quite a few of topics in this post that I would like to go in-depth on. I'm working on a simulation engine (think game engine with the focus on simulation and not rendering) for massive entity counts such as 100k or higher that scales (in terms of cores and machines) easily and allows for simulation over a planetary scale. First a little background on what I'm doing: Overall design:[/font] The game engine is an entity bases simulation that uses a component model for the entities. All communication between entities and the components of the system is done through message passing, which allows for much easier multi-threading as well as much easier communication between server back ends. Entities are comprised of behaviors. Behaviors will define an attribute if it is something that needs to be shared with other behaviors or entities. All attributes are cached every frame, so there is temporal consistency during an update phase in a given frame. Tower of Babble: I had originally thought that most of this engine would be done in C++ and had started working with what I knew, but my advisor insisted on C#. At first I was pissed-I had already done quite a bit of work in C++, which I use for my day job and was very comfortable with. Not to mention I really wanted nothing to do with C#. Give me my trusty C++ (or C for that matter) and let me work with the machine as nature intended it. However, as I started to get into things I found that my productivity was quite a bit higher. It took me significantly less effort to build a capability in C# than it did in C++, and debugging was drastically reduced. Toolbench: I'm using a number of 3rd party tools to get this running, which I'm sure I'll discuss in quite a bit more detail in the coming weeks. While I was using C++, I used a custom build of GLFW for windowing and input, but since switching to C# I've settled on OpenTK, which is nice since it also has and C# bindings to openAL & openGL. I'm also using ZeroMQ for my message passing infrastructure, which I had recently learned about. ZeroMQ is very cool and pretty fast for what it does. I'll be sure to discuss it in quite a bit more detail later. I use Lua for all in-game scripting as well as any data definition files (such as entity and GUI templates). I'm using LuaInterface for my bindings to C#. I had started using Google's protocol buffers as my message protocol framework, but found that it's lack of inheritance and inability to easily identify a message type from a bytes stream just made it worth the effort to write my own code generator to create message classes off a simple message definition file (again using Lua). I keep going back and forth between Horde3d and Ogre3D for the rendering capability. Again rendering is not the focus, so it's whatever integrates the easiest that will win. I'm leaning towards Ogre3d since there's a bunch of Blender models that I want to use (not to mention I'm a huge Blender fan) and it has a cleaner data pipeline for Blender. Not to mention Ogre3d seems somewhat more active community. LOC-what a stupid metric I personally think LOC (lines of code) is a horrible metric for estimating effort on a given project, but in this case, it actually is a good metric for measuring the effort between the two similar projects (especially since I was the only engineer working on it). I've finally rebuilt 90% of the existing capability with significantly less code. my original effort was right around 22k lines of code in c++ and my redone effort was about 8k lines of code in C#. I figure another 1k lines to finish that last 10% and have the same functionality with about half the lines of code. That also translates to quite a bit less debugging. My free time is so scarce right now and I'm on such a tight timeline that this kind of productivity boost is a huge win. Performance tests aren't conclusive yet. My original C++ test application (that did almost nothing) was getting in the ballpark of 2000fps, and the C# is running at around 1400fps on the same machine, but they're not doing exactly the same thing, so it's hard to tell just how much performance is lost to using C# vs C/C++. I'm guessing at this point, as long as it's above 30fps, I'm happy. Let's see what happens when I throw a couple thousand entities at it. Behold! A spinning box with a cheap crate texture. Let the awesomeness flow. Next post: Kernel and application framework in depth...
  10. Scourage

    A blog....

    So I normally don't blog....hell, I don't even call my mom enough. I'm usually too busy doing whatever it is that I'm doing at the moment to then write about it later, but I guess I should start. Not to mention I would like to share what I'm working on for my thesis. More to come as soon as I figure out which direction I want to go.
  • 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!