Need a good way to organize a layout?
Hey, im writing my second online game but my first game using direct3d... but thats not important i need a way to be able to create sort of a layout... for example: ive been creating bitmaps and putting them onto pngs... then i can move the bitmaps around to create a "Layout" my problem is that my game supports any resolution. when i create the layout, i use an 800x600 resolution for the png but my game can run in 1280x800, 1280x700, 1024*720, 640x400, etc and it takes at least an hour or two to properly copy the whole layout into code (since i have to position things relative to screen size, center, border, topleft, next to each other, etc)... does anyone have any tips on how to create a layout? (Besides simply sticking with an 800x600 layout only) its sorta hard for me >.> but i hope i can save at least an hour ps: ive already created all my button-text-messagebox-mouse-animation classes =/ -ty
You have a few techniques to help keep things looking good:
- If you have resizable rectangles, you can split them into separate sections that look better when resized. There is one method that splits a bitmap into a "tic tac toe" 3x3 grid, and then stretches each portion at a different rate.
- Position things using a percentage of the screen dimensions.
- Position everything at the edges of the screen first, then stretch the inner widgets to fit (same as WinForms 'docking' technique).
- Position the most important controls first using a fixed pixel size, then position others using it as a reference point (for example in WinForms, positioning something based on the "Right" or "Bottom" of a different control.
- If you have resizable rectangles, you can split them into separate sections that look better when resized. There is one method that splits a bitmap into a "tic tac toe" 3x3 grid, and then stretches each portion at a different rate.
- Position things using a percentage of the screen dimensions.
- Position everything at the edges of the screen first, then stretch the inner widgets to fit (same as WinForms 'docking' technique).
- Position the most important controls first using a fixed pixel size, then position others using it as a reference point (for example in WinForms, positioning something based on the "Right" or "Bottom" of a different control.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement