Pre-Order the Game!

Desura Digital Distribution

Thursday, August 5, 2010

Galaxy scrolling/zooming done!

I've finished converting the galaxy mouse input to support the recent changes. The galaxy now scrolls around SMOOTHLY! It uses acceleration/velocity formulaes to achieve the smooth gliding feel.

Zooming in/out is more accurate now. Previously, when you zoom in, it'd kinda zoom into where your mouse is pointing, but felt that it jumped around a bit. Now the same grid cell that you're hovering above will stay in that area while you zoom in. As for zooming out, the grid cell in center of your screen will stay in center. It's a lot more nice now. I really like how it looks/moves, and I doubt I'll tweak it any more. The only thing that I think I will add is a slider that determines how fast you can scroll around that you can set. But that's for later...

Stars and fleet icons and fuel range and paths are all being drawn now. However, the "taskbar" and mouse selecting fleets/stars, and the UI aren't working yet. I plan on overhauling the UI to use an UI class that automatically handles buttons/sliders/etc. Once that's done, I can easily add in more screens (planetary development, etc)


  1. Tried to D/L the 7/26/10 file but got nothing.

    Reworking the code?


  2. Yes, I'm reworking the code so buttons and sliders are handled by a class, and I just call "Button.Draw" or "Slider.MouseDown" instead of manually reprogramming the button or slider for every button/slider in the game.

    To clarify, the old way have say, 7 sliders, in construction screen, and each have its own mouse-click check code. The new way, I program one slider, then just do "Slider.Draw(x,y)" or "Slider.MouseDown(x,y)" and it'll handle the rest, returning values for me to handle.