Jump to content
  • Advertisement

msn12b

Member
  • Content Count

    688
  • Joined

  • Last visited

Community Reputation

390 Neutral

About msn12b

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. msn12b

    Any Microsofties Present?

    Whatever the number is it pales in comparison to the content size. A better question would be what was the biggest set of content in Halo 2? MSN
  2. Quote:From the article: Jefferson's motion said the search violated "speech and debate" protections in the Constitution to ensure the independence of lawmakers. Quote:US Constitution, Article 1, Section 6 U.S. Constitution - Article 1 Section 6 Article 1 - The Legislative Branch Section 6 - Compensation (...) They shall in all Cases, except Treason, Felony and Breach of the Peace, be privileged from Arrest during their Attendance at the Session of their respective Houses, and in going to and returning from the same; and for any Speech or Debate in either House, they shall not be questioned in any other Place. (...) This is why it is unconstitutional. Because this very act is forbidden in the Constitution. Yeesh. Edit: Adding relevant part of Article 1, Section 6 of the US Constitution. However, it is certainly possible that investigating Jefferson's office does not strictly fall under this section: Link MSN
  3. Quote:Original post by Anonymous Poster Hi, this is the AP from above. For a while in my serialization lib, I was using placement new with a special empty constructor that took a dummy parameter, but I realized (the hard way) that it doesn't address the issue of array elements inside a class, which have their default constructors called no matter what. So using placement new with a special constructor isn't a bulletproof solution. What I resorted to was having a global bool variable called 'generating_vtables' that triggers an early exit from the default constructor if it's true. It works, and is actually safe since I'm using a code generator to generate the default constructor (among other functions) for all of my serializable classes, but again, is not the most elegant solution. A quick and easy way to grab the vtable pointer without incurring the cost of constructing an object would allow me to generate much cleaner code, but as several people have already said, the language doesn't give us an easy way to it so I shouldn't hold my breath. Thanks anyway. Well that is certainly an interesting constraint. Are you trying to serialize any C++ type? If you don't have constraints on the data model you are using, then you'll have to stick with the constraints imposed by the language, which leads to situations like this (not being able to custom initialize array elements). I.e., either don't allow complicated default constructors, or declare your own array types/templates to allow for this construct. MSN
  4. Quote:Original post by Anonymous Poster Just out of curiosity, what was the solution you came up with? I've been writing my own serialization library, and I've resorted to declaring dummy class instances in order to steal their vtable pointers to use during deserializeation, as someone else already suggested. It technically works, but it feels like an inelegant solution. Did you find something better? BTW, if anyone else knows, how does the boost serialization library get around this problem? Use placement new. How many times will I repeat myself?? MSN
  5. Quote:Original post by BrianL If you really want to do it all manually, assuming the first 4 bytes of an object contains the vtable (very compiler specific!), create a temporary of each object on startup. Copy the first 4 bytes. Whenever you create an object of this type, copy this value over the start of the object. Note that by doing this, you are potentially messing up constructor/deconstructor pairing, etc. RAII and all of its permutations go out the window if you aren't extremely careful. It's a lot easier if you declare a constructor that does nothing and use placement new. You need to have a separate pass over data to do this, as the vtable cannot be guaranteed to be in a fixed location across multiple links. Like I said before, this is how it was done in Halo 2. MSN
  6. Quote:Original post by Deyja Chances are, the Halo team just declared their classes in such a way that their particular compiler always stuck the vtable in the same spot, then used a simple constant offset for it. In VS, you should be able to figure out where it is in a particular class using the debugger. It's probably going to be in the same spot regardless. And I've got a hunch that's at offset '0'. Or it could be exactly the code I posted. Placement new will initialize raw memory correctly to be a valid C++ polymorphic object (i.e., give it a correct vtable). MSN
  7. new (pointer) class(dummy_argument_to_constructor) MSN
  8. msn12b

    What about Halo 3?

    Quote:Original post by dbzprogrammer As for multiplayer & Co-op, Co-op will have up to 4 people at once (HOLY SHIT YEA!), and just think how hard legendary will be! Also, a new storyboard feature they're adding are sub-missions, say there's a bunker full of ammunition, you can take it, or the enemy can, it doesn't affect the actual plot, just how hard it will be for you later. =D XBOX Live is what they're using. Where did you read all this? MSN
  9. msn12b

    What about Halo 3?

    Quote:Original post by zedzeek i believe these screenshots (which look great) http://www.bungie.net/Games/Halo3/gallery.aspx?gallery=Screenshots&page=1 are from a video + have no relation to the actual game. Those are in-engine. As was the trailer itself. The trailer at the press briefing was run directly off a Xbox 360 development kit. Quote: then again halo has never been great graphically, its about gameplay and apparently its one of the more fun fps's. I would restate this as the Halo engine is not a screenshot engine. MSN
  10. msn12b

    What about Halo 3?

    Quote:Original post by PumpkinPiemanEdit: Also, I found it funny that those two by the end were giggling like a bunch of little girls. "Well, why don't we show them that thing" "Oh, yeah, that." Like we weren't expecting a re-hash of the series Halo. Go ship a game. MSN
  11. msn12b

    Today's Penny Arcade strip

    Quote:Original post by Ravuya They were working on something different before Halo 2 ("Phoenix"), but Microsoft apparently had other plans for them. It had nothing to do with Microsoft. Here is the most anyone who knew anything has said about it. MSN
  12. msn12b

    Hack.net Mark II

    It looks like a set of coordinates. MSN
  13. Quote:Original post by JBourrie If you have an object that is used everywhere in the program, will be created when the program starts, and lasts until the program ends, then static/global objects are the most straightforward/flexible/readable way to do it. Straightforward: Yes. Flexible: Hardly. MSN
  14. Quote:Original post by Catafriggm Quote:Original post by rekishi Nice stuff!! BTW, is there any quick way to clear the cache? When i'm making some speed tests reading files, the cache screws everything. It read a 400MB file in 9 seconds, but the second time is 0,5secs, even after closing the application. I want it to read from disk all the time, any way to do that? There isn't really a way to do this on Windows, but on POSIX you can clear the cache with fadvise. CreateFile(..., FILE_FLAG_NO_BUFFERRING, ...) or whatever that flag is. MSN
  15. Quote:Original post by blaze02 Oh, if only file i/o speed was a problem. The only reason it would be absolutely necessary to have fast i/o is for on-the-fly loading of terrain, textures, models, etc. If these are done on-the-fly, they will most certainly be done in threads. If these are done in threads, the computer is smart enough to swap threads while waiting which negates the hard drive seek/read times. 1. File I/O speed IS a problem. 2. Even if I/O is offloaded to a thread, if you need data before it is available, you need to handle that case (usually by blocking or showing alternate data). MSN
  • 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!