Cags
Well-known member
Ive been working on what is essentially a sliding block game for Pocket PC. My game has a few alternative modes to simply sliding however which is causing me a few nightmares. My game has gone through several iterations in terms of Graphics Engines but as usual Im still not happy and keep changing it. All you really need to understand is a square Board consists of Tiles (currently max size is 5x5). These tiles can move about in allsorts of various manners. Each square will end up on another square when it is moved, but various modes will have animated slides so the tiles do overlap for a time. These are the methods Ive tried.
1. Using Controls is the easiest method, once each tile is drawn it can be moved about without redrawing anything. When an effect needs to be added to every tile however you can see each tile refresh independtly (generally only the tiniest delay between, but it bugs me).
2. Using the Graphics objects and GDI+ I wrote a method that redraws all tiles to a backbuffer then the backbuffer to the screen, this works rather slow however and makes animations very slow and not at all smooth.
Each idea I have only seems to be perfect in certain situations. The sliding puzzle for example works fine with GDI+, because I can tell it to only draw certain squares. I could do the same with other modes but calculating which squares when they all interact would be far more difficult, and moves away from a standardised Graphics Engine and essentially creates a seperate one for each game mode. Ive also considered replacing the Graphics object by using GDI, but Im not sure if it will be worth the effort. Basically Im wondering if anyone has any suggests on the best way to proceed.
1. Using Controls is the easiest method, once each tile is drawn it can be moved about without redrawing anything. When an effect needs to be added to every tile however you can see each tile refresh independtly (generally only the tiniest delay between, but it bugs me).
2. Using the Graphics objects and GDI+ I wrote a method that redraws all tiles to a backbuffer then the backbuffer to the screen, this works rather slow however and makes animations very slow and not at all smooth.
Each idea I have only seems to be perfect in certain situations. The sliding puzzle for example works fine with GDI+, because I can tell it to only draw certain squares. I could do the same with other modes but calculating which squares when they all interact would be far more difficult, and moves away from a standardised Graphics Engine and essentially creates a seperate one for each game mode. Ive also considered replacing the Graphics object by using GDI, but Im not sure if it will be worth the effort. Basically Im wondering if anyone has any suggests on the best way to proceed.