Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

frob

Member Since 12 Mar 2005
Online Last Active Today, 03:02 PM
*****

#5060381 Load/Perf Testing Interview Help!

Posted by frob on 08 May 2013 - 01:50 PM

What advice could you give.

Get a good night's sleep since they are flying you in.

Get some exercise about a half hour before the interview, such as light jogging.  Just enough to get your blood flowing.

 

I don't believe cramming for an interview will help.  Either you are a good fit naturally (which will be proven in the first 90 days) or not.

 

 

Make sure you ask them questions.  It isn't just if they are a good match for you.  Be prepared to turn them down if they don't fit your needs.




#5060307 How do you get a Deal with Sony!?!?

Posted by frob on 08 May 2013 - 08:35 AM

There are two options, either you will need to be the primary developer or a contractor.


If you are the primary developer you will need to demonstrate that your company can bring a multi-million-dollar project to market.

Or option two, you need to demonstrate that your company will actually be working on those games as a contractor.


In both cases you need to demonstrate a healthy existing games business.


#5059890 Is this bad?

Posted by frob on 06 May 2013 - 09:05 PM

Two maxims: Programmers should never repeat themselves, and magic numbers are bad.

 

 

Create a function to snap to a tile.  Perhaps use the signature Vector2F SnapToTile(Vector2F source) { }.

 

Second, rather than using the constant 64, instead use a static const int defined in a header file somewhere.

 

 

Your version will always snap to the nearest border, and perhaps someday you would rather the function snap to the nearest tile boundary.




#5059342 Maximum triangles per model for a 64 players MMO ?

Posted by frob on 04 May 2013 - 09:53 PM

Hi

 

Thank you for replying

 

So You're basically saying that I shouldn't worry about the number of triangles of each model and just go and purchase the ones I like - or am I wrong ?

 

What information is actually exchanged then ? - ie. it only players' position, current health, weapon damage etc ?

 

I'm sorry for asking, but I simply don't have much knowledge on this subject...

 

Mostly correct.

 

Your artists absolutely should be concerned about the number of polygons.  As part of the design of the engine you will need to figure out what your minimum spec machine will be, and roughly how many polygons you can render on that machine with your engine, and then divide by how many objects can be an a region, and then figure out your maximum polygon count and texture size based on that information.

 

The networking code has absolutely nothing to do with the rendering of graphics.  It has everything to do with keeping simulations in sync.  Please refer to the Forum FAQ (especially Q12) for what should actually be exchanged.

 

 

 You could also have a rendering engine for the same simulation that displays a simple unanimated box for each object.

Most advanced MMO ever.

 

Actually it is a realistically good part of an advanced game engine.  A simplified renderer is ideal for debugging and for running a bunch of automated tests on a single machine.  Often time the complex graphics just get in the way when you are debugging a network simulator or other part of the system.




#5059339 a question about OpenAL on iOS

Posted by frob on 04 May 2013 - 09:43 PM

It looks like you are correct.  I don't see anywhere in their example code that they free the memory the allocated with malloc() except in the case where there is a failure in initialization.

 

My guess is that they are just leaking the memory, making the OS clean up after them.

 

I agree it is a bad practice.  You should take ownership of your objects and manage their lifetimes properly.




#5059267 Where can I read about software architecture for video games

Posted by frob on 04 May 2013 - 02:16 PM

There are many libraries worth of good books written on the topic of software architecture.

The fact that the software happens to be a game is secondary.  Good software architecture rules apply to games just as readily as they apply to banking software, medical software, music playing software, and other industries.


As for the headaches, the above reply is correct.  All non-trivial projects will have headaches.  When we do our initial planning and scoping of features, we come up with a combination of metrics.  One of those metrics we term "headaches", how much anticipated grief the feature will give us.


#5059083 Remove any items from a list while iterating

Posted by frob on 03 May 2013 - 10:46 PM

Has anyone come up with a solution to this?


Yes.

Don't do it.


You can allow multiple readers of containers, but when a container must be modified all access must be locked to a single place.

This simple rule is true for all objects, and especially true in multi-processing applications where objects may be shared by a thread.


#5059020 Alternatives to singletons for data manager?

Posted by frob on 03 May 2013 - 02:43 PM

Ok, so a more generic version of the question: what is the best way to share the data between different classes that are completely un-related?

Factory methods and smart pointers.  Sometimes you cannot get away from it, so managers-as-factories (like a general purpose caching resource loader) need to exist.

 

A singleton is something altogether different.  It says "There can only be one of these.  Ever.  So let it be written."  That is nearly always (but not universally) a bad thing.

 

Don't use singletons.

 

 

 

The preferred way to do things is that when an object needs data you will either pass the data as a parameter when you need it, or set it using a mutator/accessor pair (get/set method) at some time during the object's lifetime.

 

In practice you can get very nearly all the data to objects using this method.  A programmer ought to be able to go for many months without touching anything other than direct parameters to their game objects.  

 

Almost everything should fit this usage pattern.  

 

Sadly, large programs have some objects that need certain bits to be accessible on a read-only basis to other parts of the system.  It is not ideal, but in the real world there are occasionally good reasons to create a very minimal, tiny, global object that points to the canonical versions of certain factory methods.  These may include links to things like the game clock, a handle to the main simulator, or a handle to the resource manager.  These should be used sparingly.  On the rare occasion that these must be used, keep the Law of Demeter in mind.

 




#5058453 Scared that Nintendo will say that one word: "NO!" (need input)

Posted by frob on 01 May 2013 - 04:29 PM

@Tom- Did I do something to offend you?  Ever since I joined, to me (and maybe you don't intend to be this way)  but you come off mean.  Maybe it's something that I did that was wrong, but I'd like to know.

Several people have expressed that in the past.

 

Tom is both precise and terse.


Some people interpret that as unfriendly.

 

Personally I find it refreshing and useful.  It encourages people to refine their facts and just ask their real questions.  Often in the process of refinement the individuals can discover their own answers.




#5058441 reinterpret_cast examples?

Posted by frob on 01 May 2013 - 04:06 PM

Now you can address the pixels on that scan.

With the caveat that the memory must be properly aligned.

 

The x86 family is almost unique that it will allow misaligned integer access.  There is a nasty performance penalty for each read.  

 

Most systems will simply crash on that line if you aren't lucky enough to have a correct alignment.




#5058426 The legality behind games that make obvious references to another

Posted by frob on 01 May 2013 - 03:30 PM


Assuming US law.

 

It is a fun and exciting area of trademark law called a nominative use.

 

If you want to refer to something you need to use its name.

 

Generally it is best to just explicitly name the thing you are referring to and then add in the footnotes somewhere that the thing is a trademark of the other company.  If you imply their product you can get in trouble, but simply using the name is generally the best action.

 

There is a 3-prong test for this:  

1) The item cannot be readily identified without using the trademark

2) Usage is limited only to what is necessary for identification

3) The user does not suggest a sponsorship or endorsement

 

Your examples are correct in that way.

 

I would have a quick shufti with your lawyer just to make sure you are keeping the use to a minimum, but a comparison between your product and theirs is perfectly legal in most cases.  If that is the thing's name, use the name.

 

 

 

There really aren't many cases for it that have run their way through the courts, but these are the two biggest precedents:

 

The current three-prong test laid out above comes from Playboy v Welles.  A former model was featured by the company.  The model used the names ("Playboy", "Playmate of the Year", "Playmate of the Month", and "PMOY").  The courts found that her use was legal nominative use.  She could use the names of the things simply because those are their names.  

 

Also see Volkswagen v Church. Volkswagen complained that a car dealership extensively advertised that the specialized in "Volkswagen Service" and "VW Service".  Notably, he did not use Volkswagen's styles, color schemes, or emblems, just the textual names.  He could refer to the names Volkswagen and VW simply because those are their names.




#5058254 Scared that Nintendo will say that one word: "NO!" (need input)

Posted by frob on 01 May 2013 - 12:25 AM

However, what confuses me is this statement:  "Although we are unable to grant permission, use of Nintendo properties without our formal permission may still be allowed depending on the circumstances." What does that mean?  Does that mean, even though I can't use explicity characters and stuff from Nintendo, that it is ok however to use concepts from the games?  What does it mean?

There are a few exceptions to trademark, copyright, and other IP rights.  Most IP rights have their own fair use exceptions.

The letter is probably referring to copyright's parody exception, and the trademark use would need to have a nominative defense.

It would be an extremely difficult thing.  First, you must have a parody of Nintendo's product.  You cannot have a broader scope because then it becomes a satire, not a parody, and satire is not an exception.  You would need to use the trademarks only in a way that satisfies trademark's 3-prong test.

If Nintendo decided to sue the still could, you would go to court and announce "Yes, we used their IP without permission.  We believe it fits this exception."  If the court doesn't agree, and finds that even the tiniest bit does not fit the exception, you have basically admitted guilt to willful infringement.


It is a very narrow and difficult path to try to make a legal parody.  Don't go there without the help of a good lawyer.  Additionally, a good lawyer will recommend you avoid the practice.  

Just go be creative and make something of your own.


#5057980 Component Or Entity ?

Posted by frob on 30 April 2013 - 12:43 AM

Both are essentially the same thing.

 

They represent a game object, and can use composition to add functionality as needed.

 

Both are reasonably well implemented and are good answers to the problem they are trying to solve.

 

Neither is strictly better or worse than the other.  They are very similar solutions to the same problem, and both work quite well.




#5057903 What's the effect of a member volatile function?

Posted by frob on 29 April 2013 - 04:35 PM

You didn't specify the language.

 

The major languages have their own "volatile" keyword, but it means something very different in each language.

 

Assuming C++.

 

 

I know that inside a volatile function you can only call other volatile functions,nothing else.

Okay...
 
Let's look at it carefully.
 

class Foo {
public:
    int f1() { x = 1; y = 1; return x;}
    int f2() volatile {  x = 2; y = 2; return y; }

    int x;
    volatile int y;
};

int main()
{
    volatile Foo a;
    a.f1();  // Compile error, cannot call non-volatile method on volatile object
    a.f2();  // OK

    Foo b;
    b.f1();  // OK
    b.f2();  // Implicit conversion to cv-qualified object, OK
}

 

 

 

So,if I create a nonvolatile object that has a volatile member function,and call that function,what exactly happens?

That is the case for b.f2().  

 

At compile time, the compiler performs an implicit 'qualification conversion'.  Since you don't implement a conversion function to volatile (they are super-extremely rare in real life, I've seen more goto statements than volatile conversion functions) all that happens is the this pointer inside f2() is volatile qualified.  The function executes normally.

 

 

 

 I know that inside a volatile function you can only call other volatile functions,nothing else.

Correct.  Const and volatile qualifiers work the same way.  Just like a const-qualified function can only call other const-qualified functions, a volatile-qualified function can only call other volatile-qualified functions.

 

 

because the method is volatile,does that mean that it will treat all the member objects in that object as volatile too?(aka,read their values absolutely everytime?)

No, that is not what volatile means.

 

Many C and C++ programmers think volatile means something different than it does.

 

Volatile is a de-optimization.  It is a request (not a guarantee) for the compiler to not make certain optimizations.  It was originally designed for memory-mapped I/O registers that were modified either by the hardware or operating system.  It says "Please take steps to not cache this value; it may be used externally."

 

Volatile objects mean that a variable access must be done before the next sequence point.  Nothing more.  

 

There is another keword, register, which means "try to store this object in a CPU register to speed up performance".  The volatile keyword is the opposite, "try to store this in memory and not on the CPU".  Really that means load/store optimizations generally get disabled.  

 

Optimizations of merging, reordering, and conversions are allowed on volatile variables, and compilers generally take those optimizations.  Volatile does not mean atomic.  Volatile does not mean 'correctly' shared between threads or between CPUs or through the OS.  Volatile does not mean it should be a synchronization primitive.  It simply means the object should live in memory rather than on the CPU.

 

In a multithreaded environment, the very first thing you you should do with a volatile-qualified member function is to lock this and then call the non-volatile equivalent. This is because there is no control and any thread might interrupt any other at any time; you need to keep with the original intent of volatile -- do not unwittingly cache values used by multiple threads at once. For example:

 

 

void Widget::Operation() volatile
{
    LockingPtr<Widget> lpThis(*this, mtx_);
    lpThis->Operation(); // invokes the non-volatile function
} 

 

 

Hopefully that clears it up.  It has nothing to do with "read their values absolutely everytime".  It means "please store this object in memory and disable load/store optimizations".

 

 

 

So now that I've tried to carefully answer the questions you asked, here's two for you:

 

Why are you trying use volatile members this way?  What real-life problem are you trying to solve?




#5057828 Scared that Nintendo will say that one word: "NO!" (need input)

Posted by frob on 29 April 2013 - 12:13 PM

If they don't, then you just release your clone anyways.

HORRIBLE IDEA.

 

Developing a game with a placeholder asset that you don't intent to release, or for the purpose of pitching it to a company, that is one thing.

 

But what you just described is willful infringement.

 

 

Normally, if a fan game made a game and naively copied their IP, the game owners would get a C&D order demanding the content be taken down.

 

But in this case, the person pitched it to the publisher, announced their intent, publicly stated online that they knew they were violating the law and violating the IP owners rights, and that they are going to proceed to violate it knowing full well that it is unlawful.

 

In that case Nintendo will probably skip the polite C&D order.  They will probably jump directly to a civil lawsuit.  And because Nintendo has evidence that you submitted the product to them, and almost certainly will search the Internet and find this thread, they'll have evidence that you willfully violated their IP, just about any court in the country will agree that it was willful infringement.
 

With willful infringement, the courts will usually give the MAXIMUM possible penalty.  If they don't think that is enough, they will also consider "enhanced" penalties, often it is 3X the maximum penalty for 'innocent' infringement.

 

 

 

There is only one correct answer:  Do not steal from others.  Make your own IP.  






PARTNERS