Users browsing this thread: 1 Guest(s)
Enribeaver
#18
I'd be against serializing, it doesn't really gain you anything, in fact it inflates file size in XML's Case,
Just use BinaryReader and BinaryWriter (System.IO)
there simple as can be so long as you dont get lost between your saving and loading loops (which I did at one point, it leads to the loading desynchronising with the file and reading stuff wrong, but it'll only happen in complex loops, in my case I was saving Tilesets from a SpatialHashTable)

the original reason I wasn't using serializers is because their not supported on xbox and windows phone, I THINK but not sure, I think its not available on the reach profile, which if you dont use the reach profile your game wont run on DX9 systems only DX10+, I realised this a while ago when I gave a game to my friend with a really crappy laptop.

EDIT:
look up Spatial Hash Table its much nicer than a quadtree for non-cluttered collisions (quadtrees are meant for masses of colliders, the overhead isn't worth it in this case)
I just made a fer helper methods to handle the SpatialHashMap with Rectangles as well as Vector2's this meant I could just pass the objects area and add it into each grid piece, or get all the objects in a grid within an area (excluding duplicates ofc) it takes a bit of cleaning up but its really fast and really simple.
my trick was to each frame get a list of the objects within the cells which intersected with the view, and only pay attention to those object, things outside of that list wouldn't even get a check against them, no need, already have a list of all the relevant items.
Thanked by:


Messages In This Thread
Enribeaver - by recme - 08-17-2012, 09:03 PM
RE: [IN DEVELOPMENT] Enribeaver - by Virt - 08-17-2012, 09:10 PM
RE: Enribeaver - by Zadaben - 08-27-2012, 01:17 PM
RE: Enribeaver - by recme - 01-18-2013, 10:29 PM
RE: Enribeaver - by TheShyGuy - 01-18-2013, 10:41 PM
RE: Enribeaver - by Phaze - 01-19-2013, 11:11 AM
RE: Enribeaver - by recme - 01-19-2013, 11:15 AM
RE: Enribeaver - by TheShyGuy - 02-04-2013, 06:31 PM
RE: Enribeaver - by TheShyGuy - 02-10-2013, 09:42 PM
RE: Enribeaver - by Bombshell93 - 02-11-2013, 02:40 AM
RE: Enribeaver - by TheShyGuy - 02-11-2013, 08:34 AM
RE: Enribeaver - by Bombshell93 - 02-11-2013, 09:23 AM
RE: Enribeaver - by TheShyGuy - 02-11-2013, 06:23 PM
RE: Enribeaver - by Bombshell93 - 02-12-2013, 04:31 AM
RE: Enribeaver - by TheShyGuy - 02-12-2013, 08:20 AM
RE: Enribeaver - by Phaze - 02-12-2013, 01:03 PM
RE: Enribeaver - by TheShyGuy - 02-14-2013, 09:01 PM
RE: Enribeaver - by Bombshell93 - 02-15-2013, 06:44 PM
RE: Enribeaver - by TheShyGuy - 02-15-2013, 09:41 PM
RE: Enribeaver - by Bombshell93 - 02-16-2013, 05:29 AM
RE: Enribeaver - by TheShyGuy - 02-16-2013, 01:06 PM
RE: Enribeaver - by Bombshell93 - 02-16-2013, 02:52 PM
RE: Enribeaver - by TheShyGuy - 02-16-2013, 04:53 PM
EnriBeaver Game - by Zadaben - 08-27-2012, 02:03 AM
RE: EnriBeaver Game - by Kopaka - 08-27-2012, 04:33 AM
RE: EnriBeaver Game - by Goemar - 08-27-2012, 07:11 AM
RE: EnriBeaver Game - by Virt - 08-27-2012, 07:20 AM

Forum Jump: