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

Fredericvo

Member Since 06 Mar 2012
Offline Last Active May 14 2013 08:34 AM
*****

Posts I've Made

In Topic: How to 'ship' your game assets

12 May 2013 - 06:16 PM

Personally I store my assets as resources. (the Microsoft specific standard that stores icons, menus, some strings, bitmaps etc or custom data if you want)

I assume with resource editors it's still as simple to extract non-encrypted files of course but I can ship a stand-alone exe that self-contains everything.

If this solution interests you, look into the following functions on MSN: FindResource(), LoadResource(), LockResource()

The custom type is RT_RCDATA and is "defined" as 10. You would need to pass that value to the FindResource() function.

 

As an aside, I disagree that encrypting/obfuscating a program is useless because somebody in the world (a clever hacker) will undo that anyway. You can still buy some time and avoid every script-kiddie and his grandma to already steal your assets. If it were really useless then AAA titles wouldn't go to so much trouble doing it. Whenever you ask how to do this here, you are either suspected of wanting to bypass such a scheme yourself to steal a game (which sort of proves that such a system IS useful or why would they be so afraid that you bypass it) or maybe there is some elitism in which newbies aren't encouraged to be able to code to the same protected standards.


In Topic: Consistency across sessions

05 May 2013 - 03:24 PM

Not sure what your question is but if it's about maintaining state between server requests then you should look into php sessions. Basically the server can save some data that you access through a $SESSION array and the client sends a cookie with an id that retrieves the right session data across http requests. That's how a browser does it but you could emulate cookies by embedding the data in http headers (which is how cookies work under the hood anyway)

In Topic: Draw Call Sorting Using std::map

29 April 2013 - 11:25 AM

OK thanks all I think I've understood it now. And to Snowman thanks for the code and detailed explanation. This will prove very useful.


In Topic: Draw Call Sorting Using std::map

28 April 2013 - 04:44 PM

OK thanks. I think I got the functor now after some googling. Weird they didn't mention this in learncpp's chapter on operator() overloading.

I'll try to see where this can take me.


In Topic: Draw Call Sorting Using std::map

28 April 2013 - 03:32 PM

I'm not sure I understand this answer. Functors? Is that some C++11 construct? I guess I have some more reading to do...

Vectors don't have the notion of key/value and I also don't get what you mean by "and store the key in the render instance you submit"


PARTNERS