Jump to content

  • Log In with Google      Sign In   
  • Create Account

Hodgman

Member Since 14 Feb 2007
Offline Last Active Today, 08:02 AM

Posts I've Made

In Topic: Fast Way To Determine If All Pixels In Opengl Depth Buffer Were Drawn At Leas...

Today, 08:05 AM

"Thousands of triangles" should not be something that alters the framerate so dramatically. A modern game can draw hundreds of thousands of triangles at 1000fps -- which is one of the reasons that VBO's replaced begin/end (same number of gl function calls required for any number of triangles).

 

You need to profile your game to find out where the time is being spent. Set up a class that records the high-frequency timer at two points in time, subtracts the difference, and logs the result, and then put instances of this class in any function that you think might be a performance hog.

It's common to do this with a constructor/destructor:

struct ProfileLogger { ProfileLogger(const char* name) { PushProfileScope(name); } ~ProfileLogger() { PopProfileScope(); } };
#define Profile(name) ProfileLogger _profile_(name);
 
void Test()
{
  Profile("Test");// calls PushProfileScope("Test") here
  DoStuff();
}// calls PopProfileScope("Test") here

From this data you can get a hierarchical breakdown of where all your CPU time is spent per frame. Trying to optimize without this data is just shooting in the dark.

 

From the sounds of it, your game is almost certainly CPU-bound, so you can start here. Later on though, you can use gl timer queries to do the same thing on the GPU side -- wrapping parts of the scene in two timer queries to find out how long it took the GPU to process those commands.


In Topic: Rpg Stats - Temporary Changes, Harder Than I Realised!?

Today, 06:30 AM

Yep, this can lead to troubling bugs (or exploits) when attributes can change as well -- e.g. if you happen to level-up while a buf is enabled.

So:
3. Represent the stats as a stack of operations.
e.g. a stack for your speed stat might contain:
*Slow: Subtract 10
*Base: Set 50

When you evaluate that from the bottom up, you get (50-10) = 40.

 

When you cast the slow spell, the new instance of that spell adds an operator to speed's stack and retains a handle to it. When the spell ends, it uses that handle to remove the operator that it added earlier.

If the player levels up, you can modify the 'base' item in the stack above, and it will automatically allow you to recompute the new resulting speed value, including buffs.

 

You can keep a cache of the speed attribute as well as this stack, and update the cache whenever the stack is modified... But never change that cached value -- always change the stack of operators, and let the stack update the cache with the new value.


In Topic: you all say oculus rift but why not google glass?

Today, 04:35 AM

I suspect that they have three very thin layers of glass and each layer contains the red, green and blue channel and they rely on the additive properties of light to render a colored image.

Sounds odd to me. I don't think the additive properties of light have anything to do with this. It probably has a full spectrrum (white) light source which then would be filtered through the three layers. An aqua layer to filter unwanted red, a yellow layer to filter unwanted blue, and a violet layer to filter unwanted green. A glass layer cannot magically add a red tone to light, AFAIK.

I think you're both talking about two different aspects of the system. Forgive the ascii art -- sounds like slayemin is talking about how the projection gets reflected into your eye (right), and you're talking about where the projection comes from (top).
   Green Source  ___
     Red Source  __ \
    Blue Source  _ \ \
                  \ \ \ 
                  L L L
                  a a a
  Eye->           y y y
                  e e e
                  r r r
                  1 2 3

In Topic: Do Studio Production Costs Account For Salary's?

Yesterday, 11:07 PM

Yeah of course the cost of staff is included in the budget; paying people to build things is the primary cost of development. The average gamedev salary in the USA is $80k -- so salaries for 100 staff over two years is $16 million! As well as tools / services, etc, there's also all the boring stuff like renting an office, paying the power/internet/cleaning bills, keeping the fridge stocked with milk, etc... All up, 100 staff over 2 years (and the tools / facilities to allow them to work) probably costs more like $24 million.

 

The over-budget situation depends on the contract that's in place. Usually publishers don't pay developers $20M up front in one big cheque and then hope for the best. Instead, most contracts are based on "milestone" payments. At the beginning of the project when the budget/design is being approved, the plan will include what kind of progress will be made at different points in time. e.g. Month 3 - character can roam a test level will all abilities, Month 6 - AI combat is complete, Month 9 - Level 6 is completed in full as a "vertical slice" example of the finished product, Month 12 - a beta is released for testing, etc, etc...

The publisher will only release small portions of the funds as each milestone is achieved. If the developer is late in achieving a milestone, then they'll be late in getting paid for it. If the developer doesn't have large cash reserves, this might mean that they're unable to pay salaries for a month and all their staff quit and the developer goes bankrupt.

In other situations, the developer might be contractually obligated to deliver on their promises -- and if they don't (or are late), the publisher might sue them for damages and the developer goes bankrupt.

Yeah, there also might be some situations where the publisher has sunk so much money into a game already, that they agree to pour in even more money to help the developer catch up and actually finish the game... but it's probably more likely that they'd cut their losses and cancel the project.

 

Sometimes the publisher themselves might be contractually obligated to another entity. e.g. a publisher might have paid $1M to a sporting organization to secure the rights to product a game about that organization (NFL, NHL, FIFA, etc...)... This contract could specify that the publisher must release a game within a certain time-frame, or the contract is automatically cancelled. In that situation, if their developer was late, it would jeopardize their contract with the sports franchise, so they might feel pressured to release a buggy game early in order to fulfill their contract... and then they might sue the developer for failing to fulfil the other contract :lol:

 

However, since the global financial crisis (market crash of 07/08), the big publishers have dramatically reduced the amount of work-for-hire projects that they do with third-party developers. It used to be common for a large independent developer to work with a publisher in the manner outlined above... but these days, publishers tend to mostly work with developers that they actually own outright! In that situation, if the developer fucks up, they can just fire you or liquidate your whole office. They also might do that anyway even if you succeed in making a good game though! :lol: :(

 

FWIW I've worked (as a developer, not management) on 5 shipping console games and 6 cancelled console games  -_-


In Topic: How Do You Protect Your Eyes?

Yesterday, 10:43 PM

Make sure your screen isn't (too much) brighter than the surrounding environment.


PARTNERS