Code center > Darwinbots Program Source Code

My DB2 non-optional changes, what do people think?

<< < (5/5)

Botsareus:
I think we should simplify the heck out of this one.

We need to have fixed ratio for our simulation and it should draw in that ratio... If anything add a scroll bar or zoom out...

ex:

If the simulation is a rectangle and the mdiform is a square it should display border limits on the top and the buttom, or a scroll bar across the buttom.

Now that I realise how crazy complicated this "aspect ratio correction" code is, I am not touching it, so I will do my PLAN A fix until someone can sit down and really fix it.  :wacko: However, I might look into adding vertical zoom in, zoom out buttons. And horizontal zoom in , zoom out buttons. I will also look into resetting the paint area to fit with the mdiform if the mdiform gets bigger.

Botsareus:
Numsgil, I just tried to separate the zoom algorithm into X and Y zoom algorithms without any luck. You are right, the system "stretches" the simulation to fit it into the screen ratio. As of now I am leaving this code alone.
Sorry for the misunderstanding. This concept was confusing for me, imagine how confusing it will be for a new user, I suggest you add a wiki on this subject to make sure new users are not confused.

Numsgil:

--- Quote from: Botsareus on December 02, 2010, 06:54:39 PM ---Sorry for the misunderstanding. This concept was confusing for me, imagine how confusing it will be for a new user, I subject you add a wiki on this subject to make sure new users are not confused.

--- End quote ---

It's only confusing when it's not working right (or you're looking at the code, haha).

Intuitively we have a good understanding of how it should work: it's like a video microscope.  You can move around (translate) and zoom in and out, and independently of that you can also enlarge the screen size and move the window around on your desktop.

The problem is that coding it to do that correctly requires handling a lot of Windows events and working through the math.  I've got it working fine for DB3 with the various Viewport and Camera classes, so if someone wanted to take a stab at redoing the graphics side of DB2 to do something similar it should work pretty well.

Navigation

[0] Message Index

[*] Previous page

Go to full version