Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bdens

Pages: [1]
1
General / Optimization Help
« on: December 24, 2015, 09:53:00 am »
Hi,

I'm writing a 2D game similar to Dungeon Keeper.  I have a view that looks at a grid of sprites, and can be scrolled around by the mouse.  I optimized the world view by only drawing sprites that are near the view (or camera if you will). 

I also have a map in the bottom left corner that draws the entire world with a different set of sprites, but which are still representative of what is seen in the main view.  Each map sprite contains 9 pixels, whereas each world sprite contains 48 * 48.  Now, the map sprites and view sprites used to be the same sprites, but I hoped that making a second smaller sprite that was drawn every frame would be less intensive.  I did not see any visual performance increase from the change.  Is that what should be expected? 

Now, the game only modifies one sprite at a time, so it would be very easy to draw the map once and then make a change and draw that change whenever necessary.  But doing that yields some undesirable results, like screen flickering (I actually broke a monitor doing that lol).

Beyond these two options, I'm rather clueless about how to optimize my map drawing process.  Anyone willing to give me some suggestions?

2
Window / Drawing without Clearing - Monitor "Broken"
« on: August 27, 2015, 04:48:26 am »
Hi,

I'm implementing a minimap for my 2D Tile game.  I have a vector of tiles, and I really wanted to just draw the map once, and then draw changes (excluding window.clear() calls), since drawing each tile of the map each cycle will be very intensive for large maps.

The problem is that when I do not clear after each frame, the screen portions that are not drawn each frame will flicker between black and their desired color.

Is there a way to fix this?

Also, the flickering has made a permanent square of flickering on my monitor :\, effectively ruining my monitor, so, perhaps a word of caution to others experimenting with such.

Pages: [1]