JcBernack / anno-designer

A building layout designer for Ubisofts Anno-series
http://code.google.com/p/anno-designer
2 stars 2 forks source link

Some valuable enhancements? #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems like you load the icon graphics from disk every single time you render 
an object (RenderObject(DrawingContext drawingContext, AnnoObject obj in 
AnnoCanvas.xaml.cs). You might want to load them before, like in a dictionary 
to avoid this.
Following the same idea, you could create the brushes once and modify them only 
when needed : adding a building requiring a new brush, modifying the color 
associated of a brush...

When saving to a file, you create a new AnnoCanvas in RenderToFile (still in 
AnnoCanvas.xaml.cs) with a reference to the current _placedObjects collection. 
Making a copy of it would allow you to remove any dependency for the new 
AnnoCanvas and render it asynchronously.

What would be nice too :
- no locking to the top left corner, ie. a way to move around and zoom in/out 
centered on the current cursor position;
- a quadtree to reduce the testing on objects so the rendering happens faster :D

By the way, I don't play Anno 2070 yet, but your application is really great!

Original issue reported on code.google.com by ingernva...@gmail.com on 19 Dec 2011 at 6:21

GoogleCodeExporter commented 9 years ago
First of all thanks for your feedback! :)

Most of the things you mentioned we're a result of coding the whole application 
base in just a few days and I didn't have time to improve some of the rather 
ugly parts. ;)

Icons: The loading mechanism is bad, that definiately has to be changed.
Brushes: I'm alreayd reusing some of the brushes, but not all you're right.
Export: Copying the objects collection was on my todo list, but for other 
reasons. I haven't though about rendering asynchronously, good point. Someone 
reported that the application hangs a few seconds when he's exporting images. 
I've never noticed any lag but rendering asynchronously might help there.

Locking to the top left corner:
I have indeed thought about moving the origin around, but I thought being able 
to move all objects instead (by pressing both mouse buttons) would be 
sufficient. Maybe I'll think about that again, but there are more important 
things to do I suppose ;)

Reduce testing:
To be honest, when implementing the collision testing I was really surprised 
that it worked that good. No optimization whatsoever has been done there - I 
was just happy that it worked and continued with what was next on the list :D

I've played all anno titles so far and I enjoy this one the most :)

Original comment by jc.bern...@gmail.com on 20 Dec 2011 at 12:29

GoogleCodeExporter commented 9 years ago
I created new issues for each bug/feature.

Original comment by jc.bern...@gmail.com on 21 Dec 2011 at 9:56