Code center > Darwinbots Program Source Code
My DB2 non-optional changes, what do people think?
Numsgil:
--- Quote from: Botsareus on December 01, 2010, 05:39:24 PM ---
--- Quote ---The aspect ratio is a display bug only; it shouldn't affect the simulation at all.
--- End quote ---
It will not affect a simulation.
It will affect "the" simulation when you start a new one...
--- End quote ---
What?
Are you talking about the simulation size or the aspect ratio of the graphics?
Botsareus:
Numsgil, here, look:
Uploaded with ImageShack.us
If I press "Start new" the resulting simulation the way it is setup above will always be a square…
Numsgil:
The display and the underlying simulation are separate.
For instance, I assume you know you can zoom in and out with the magnifying glass icons? That only works if the display is separate from the simulation.
Try spamming the zoom in, zoom out, and lock/unlock icons. When you see a tiny white square in the top left corner that's a good indication that the display is borked (that white square is the simulation extents. You're waaaayyy zoomed out).
Botsareus:
Tryed it. Same thing.
One good way of knowing is, If you do what I did above and insert like 5 blank robots, look how they position themselfs.
Uploaded with ImageShack.us
And if I started this one wide then the result will be wide...
Uploaded with ImageShack.us
All I am doing is clicking the species tab first, and then start new...
BTW: With my planB I am not sure if I can resize a MDIForm to be bigger then the desktop...
Numsgil:
Bleh, you're not understanding.
Okay, imagine there's a square simulation, with the simulation extents of like 2000x2000.
Now imagine you draw it. If the aspect ratio is wrong, it will be drawn as a rectangle. The underlying simulation is still 2000x2000. The bots see it as 2000x2000. But you, a human, see it as rectangle. Because of the way graphics are drawn, circles will still look circular, but they won't match up to the physical reality of the actual simulation (which from your point of view would be ellipses).
There's some code somewhere that can sort of reset the aspect ratio, but it's buried right now in the lock/unlock or zoom in/out code, and it's conditional on the state you came from and the state your going to (eg: try zooming out from a "locked" display that's zoomed way out). Which is why it should fix itself if you can spam those buttons in specific order I don't remember.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version