Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

602 Good

About _DarkWIng_

  • Rank

Recent Profile Visitors

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

  1. Quote:Original post by jteeuwen The extra info that the (de)Serialization methods use cannot be ommited. The Framework needs this info in order to read the serialized data back into your app properly. I wish it could be omited if the I had no intention of deserializing the objects back (my opertion is one-way). I guess I will use the RawSerialize function from other thread to serialize each object in array and add them together. I was just hoping for something faster.
  2. Hi. I have an array of structures that I need to cast to array of raw data bytes so it can be passed to a dll (not mine). There are number of different structures (like vector2, vector3,..) that need to be transforemed this way and I was wondering if there is a safe generic solution to this or will I have to write custom function for each type. I've tried using: DataType[] buffer; //.. create and fill buffer... MemoryStream ms = new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize( ms, buffer ); byte[] temp = ms.ToArray(); But this will full array with other serialization info (object type?). Is there a way to serialize data fields only? Thanks.
  3. I just remembered that the code for this is also included in source last demo Tranquillity so you can grab it from there.
  4. _DarkWIng_

    post if you hate to document

    Quote:Original post by benryves Documenting code for me (eg /// <summary> tags) is good. Documenting my applications for end users is bad. Same here. I document my code very strictly, but I really hate writing documentation for the dumb users. Not to mention that I have to localize it for 2 different languages. Plain simple boring.
  5. You have mail! I only implemented sky colors.
  6. I can't help you with your code but I can send you my implementation of that paper. It's a bit to much to post it here.
  7. _DarkWIng_

    Sky system.

    There are also some nice links in Forum FAQ.
  8. Quote:Original post by Flimflam The only thing I entirely dislike about .NET is it's inharent inability to easily work with binary files, not having to load one value at a time. That has always put me off the .NET api, even though I have learned it. The pressure on using XML and other such text-based files really upsets me. This should help you. Using C# 2.0 you can write a generic function that can read any type(struct) from binary file.
  9. I wouldn't learn it. Consider how much do you need it when writing a new program/game in C# from zero? You might need a function or two that isn't exposed trough .net but when that time comes you just look it up in MSDN. I would rather start learning something newer. PS: And about Vista. Sure they will keep winAPI (or at least emulate it), but why on earth would you use it to write new programs since there other *much* better options.
  10. _DarkWIng_


    I'm glad to hear it worked so fine for you. One more thing you can do is to blur it twice (or even more times) with smaller kernel. Something like 5x1 + 1x5 + 5x1 + 1*5 + ... You can just ping-pong the buffers. And actually separating 2D Gauss in 2x 1D is not fake but mathematically correct.
  11. _DarkWIng_


    I used something like Red_falcon's idea in my demo and it works just fine. You also have to remember that you can separate 2D Gauss to 2x 1D. Implementing this gives a nice performance bonus. (for 16x16 kernel you only need 32 samples.. quite a save)
  12. _DarkWIng_

    a _BETTER_ random number generator?

    Quote:Original post by Rattrap Usually you just take use a modulous operation For the n-th time : no. Using mod operator screws up distribution no matter how good your RNG is. Use something in the lines : value = random() / max_random_number * max_desired_value edit: Matt Apple gives a nice example of this use.
  13. _DarkWIng_

    [.net] Regular Expression Problem

    Try something like: return Regex.IsMatch( "0123456789012", @"^([0-9]{11})$" ); or even return Regex.IsMatch( "0123456789012", @"^(\d{11})$" );
  14. _DarkWIng_

    Octree/Polygon splitting

    @rgirard413: Looks like your problem is in creation of octree nodes. You should never have triangles that are outside the node intersecting it. You'll have to modify box-triangle collision/intersection routine so it finds such cases as described. Searching Google for AABB-triangle should give some nice results. @paic: We all know splitting triangles is bad. That's why I suggest him to look at the spatial structures that minimize the number of splits needed. Going for octree to loose-octree can simply reduce number of splits by over 90% with only a few % overgrowth.
  15. _DarkWIng_

    Octree/Polygon splitting

    Quote:Original post by paic when a triangle is in more than 1 node, you can simply duplicate the triangle to include in each node. This is a bad solution for any modern engine. Sure it may be easy to implement but it will cause sou much trouble in the long run. Just think about blending/transparency. @rgirard413: You either split it in nodes or use a bit different spatial structure like loose octrees or ABTs.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!