Jump to content
  • Advertisement

digitec devil

  • Content Count

  • Joined

  • Last visited

Community Reputation

206 Neutral

About digitec devil

  • Rank
  1. digitec devil

    Game Polymorphism help

    Composition looks messy here because the suggestion was to have multiple types of object refer to each other - this is mixing inheritance and composition at a level you probably don't want. Composition would look more like 1 object class (concrete, probably no derived classes), with multiple "interface" classes, e.g. a component. Each component class could serve a different purpose (sound, physics, rendering, etc.). In an architecture I designed, these components were the fundamental processing blocks, not my objects; each component type had its own high level processor that was responsible for updating those components. Unity is a good example of component-based game engine design, whereas the Source Engine is an example of a game engine based on lots of inherited "object" classes (Entity).
  2. There are definitely ways to allow for members to be added/removed in changing formats, they all have their tradeoffs. You can embed each member in a structure, searching for it by name and type. You can have explicitly managed formats which tell you exactly which format you're loading up, letting you make up for new/old members. You can also do simple upgrade processes whereby you load all your serialized data using old loading routines, save them out using the new saving routines, and then you replace the loading routines. (Just backup your data before you do this in case mistakes are made). This method uses versions just to verify that it can work on the data, but doesn't specifically know about how to deal with different versions. Why do you think that a binary format would stop you from supporting linux and mac? Even if those platforms had data specific to them in your structures, you could still support that. It might be more work than a text-based format, but it's far from impossible. If you want some ideas, check out the nocturnal initiaitive's reflect library, and perhaps google's protobuf.
  3. digitec devil

    Unit testing: one check or multiple?

    I'm not entirely sure I see your point about invariants. What kinds of invariants might you try and verify that are eased with these other check methods? I'm well aware the test is nonsensical. Maybe you can illustrate why there's a need to point out that it's nonsensical? (i.e. what would a sensible example illustrate that mine doesn't). I understand the points with respect to global/persistent state, but they don't outright prevent concurrent tests from running. I'm not sure how much I follow the "don't do this because it could have typos" logic. Should I be avoiding == everywhere or do unit tests hold some special status that affords them less typo-prone code? [color="#1C2837"][color="#000000"] Does my post not make it clear I'm trying to learn about them? I understand that you want more information about the arguments, which is why I set my framework up the way I did (one of the fail methods just took a string, which could easily be generated via a function, so I did not have to format the values every time, I would just select the output I wanted from pre-existing functions). My big question would be this: do unit test frameworks typically give you the ability to extend the check methods without causing the unit test framework itself to change? (specifically, without causing your own unit tests to have to be rebuilt).
  4. I've noticed some unit test frameworks have multiple check types e.g. SomeUnitTest() { int i = 4; int j = 6; CHECK_EQUALS(i, j); CHECK_GREATER(i, j); } etc. I'm wondering, is there a reason people implement multiple CHECK methods/macros? Why not treat it like assert, where the statement should be true or it's considered a failure. In a simple unit test framework I put together, I added a fail print method (macro really), that would basically print to the log/output/etc. a formatted string explaining the details: SomeUnitTest() { int i = 4; int j = 6; CHECK(i == j); FAIL_PRINT("failed %d == %d", i, j); CHECK(i > j); FAIL_PRINT("failed %d > %d", i, j); } The fail print is never required - if it's not there then the failed check is reported similar to an assert, showing whatever is within the CHECK. Is this just a matter of choice on how to deal with doing checks in unit test, or is there some benefit of multiple check statements that I'm overlooking?
  5. digitec devil

    c++ dieing for game programming?

    One aspect of the language issue is the level of abstraction certain languages provide. Abstraction can easily be over-done when you're dealing with a console. When you know your target hardware as well as console developers are allowed to (although they might choose to ignore it), it just doesn't make sense to treat your software as if it operates on some abstract platform. Is C# suitable for making games? Absolutely. Is it going to beat platform-specific assembly? Almost certainly not, at least not in any case where it actually made sense to go down to the assembly level. In just a few years in the industry, working on numerous projects of varying scale and in various disciplines (game/tools/engine/etc), I've worked with C/C++, C#, PowerPC assembly, HLSL, Lua, Ruby, and even a couple proprietary languages. The point is that no language is going to solve all your problems, within all your design requirements, and be your favorite (people keep saying choose your favorite, but sometimes that is not your choice). Focus on learning and accepting that new languages will be thrown at you from time to time, and you'll do just fine.
  6. digitec devil

    Code reviews when working alone?

    This is what colleagues are for. I don't think you'll have any luck (or at least it would most likely be more costly than it's worth) paying for reviews. You should try and get to know other programmers that you trust enough to review your code, even if they're just acquaintances from the internet.
  7. By default it's only in the tools tab. On the far right hand of the screen there should be a tab with a hammer icon (next to tab with a monitor icon). If you click this tab you should just see a bunch of buttons, one of which says "Reset XForm". Click this and you'll get a rollout with a "Reset Selected" button. Select the objects you want to reset the transform of, and then click "Reset Selected."
  8. If the scaling on the object's node (the thing max uses to put an object in a scene) is negative, you'll get this effect. To correct it you either need to: 1) detect the negative scaling in your exporter code, and use this to change the winding order of your polygon faces (if you were exporting v1,v2,v3 you should export v2, v1, v3) or 2) correct the scaling in Max using the Reset Transform tool, and then re-export.
  9. digitec devil

    3DS Max exporting animations C++/DX

    If you have a legit copy of 3DS Max your install disc should have an SDK for developing plugins for use with Max. This will give you the most access to the MAX runtime that's possible, without the need to learn MaxScript or to create a tool to convert the MaxScript exports into something more suitable for loading (last I dealt with it, MaxScript output everything in a text format, which I would consider less than ideal for any kind of model or animation data).
  10. digitec devil

    bounding volumes

    You're close, but you have to consider that you want your maximum value to be easily overrided by any sensible value. This means that your initial max values should be very large negative numbers, similarly your initial min values should be very large positive numbers. This type of bounding box is axis aligned, each min-max range simply refers to one of the cardinal axes. Oriented bounding boxes can be advantageous when you're often modifying the transform (translation,rotation,scale) of an object, but not the object itself. Bounding volume hierarchies themselves are no easier or harder to implement depending on the volumes themselves, but some choices may be better suited than others. Many people just stick with a single volume (AABB quite often) for every volume in their hierarchy, but there's no reason you can't have each volume in your hierarchy be suited for the objects/hierarchies they contain.
  11. digitec devil

    What Math to Learn?

    In addition to algebra, you want Trigonometry, at least to start :)
  12. digitec devil

    Storing Model Data - Arrays or Vectors? (C++)

    I would suggest just an array because it's as simple and complex as you need it to be. As for knowing how many vertices are in this array, the format you're loading has to have that information somewhere. Things like dealing with 3 vertices at a time is trivial. for(int i = 0; i < num_array_verts/3; i++) { cout << array_verts[i*3] << " " << array_verts[i*3 + 1] << " " << array_verts[i*3 + 2] << ","; }
  13. digitec devil

    Rotation/Translation....help, please

    By "this method" do you mean all the shifts you're doing? I haven't looked into what NeHe suggests but I did the following to get a FPS style camera Vectors: position, left, forward. Flots: pitch, yaw. The camera is created by specifying position, pitch, and yaw. An UpdateVectors function computes the correct left and forward vectors (assuming a right-handed system (which OpenGL is)). With UpdateVectors, you only need to use cos & sin when you change pitch and yaw. UpdateVectors calculates the left and forward vectors like this forward = Vec3(cos(rad_pitch)*sin(rad_yaw), sin(rad_pitch), -cos(rad_yaw)*cos(rad_pitch)); left = Vec3(sin(rad_yaw - pi_over_2), 0, -cos(rad_yaw - pi_over_2)); Then when it comes time to position the camera you rotate pitch degrees around the x direction, then yaw degrees around the y direction, then you translate to the camera position. Hoepfully this helps. My source for those vector calculations was Wolfram's Mathworld: Spherical Coordinates
  14. digitec devil

    What do you want to see in an RPG?

    I'd say "tactical combat" is complete crap for small encounters. What is this, Rainbow Six? Tactics should be involved in large scale battles, and wars. But a fight between 10 people should not involve tactics, it should be so fast and visceral that you fight it the way you would if you were really in it - by the seat of your pants. My ideal RPG would have both versions of combat, for the people that love tactics, let them engage in battles and lead wars. For the people that love up close combat, let them get down on the battle field and really fight. For the people that love both, let them do both.
  15. digitec devil

    Name the effect!

    I don't think you could get everyone to agree on how to refer to that, I'd just call it a glowing ring. It's most likely an alpha blended ring with animated texture coordinates.
  • 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!