FlixelCommunity / flixel

Community fork of Adam “Atomic” Saltsman's popular game engine Flixel. Distilled from a variety of Flash games he worked on over the last couple years, including Gravity Hook, Fathom and Canabalt, its primary function is to provide some useful base classes that you can extend to make your own game objects.
http://flixelcommunity.org/
Other
84 stars 17 forks source link

Improvement of the debugging screen #139

Open Gama11 opened 11 years ago

Gama11 commented 11 years ago

I already mentioned this in #89, because the enhancement of FlxG.log encourages the use of the console / the debugging screen.

What I dislike about the console in Flixel 2.5+ is that the log window is extremely small and that the log and the watch windows use FlxWindow, which means they can be moved around and resized. However, this isn't really neccessary at all in my opinion, I myself have never used this feature except by accident because it seems like these actions aren't blocked when the console is hidden. Plus, if two windows overlap, both will be affected, not just the one on the top.

I don't see why anybody would want to move or resize those windows, especially as those settings aren't saved and there's already the option of changing the window arrangments via FlxG.setDebuggerLayout. That's why I preferred the Flixel console before version 2.5 (not sure when exactly it was introduced, but around that version). It would just cover the whole screen back then.

Another point Dovyski brought up is that the watch window could as well be hidden as long as FlxG.watch hasn't been called. An argument against this would be that people get to know about FlxG.watch because of that window, in the first place, at least that was the case for me. It's quite a helpful feature, especially as you can change the values of the variables you watch.

My suggestion is to either add a new debuggerLayout, perhaps called DEBUGGER_CLASSIC, where the log window covers the whole screen and the watch window appears only when used, or to make this the default setting. Also, the resizing and moving features of FlxWindow should be disabled unless specifically actiavted via a Boolean, like FlxG.flexibleDebugWindows. Would also be convenient to add another button to the debugging screen for that, next to the button for visualDebug for example.

If the resizing and moving feature of FlxWindow should really be useful, it should also be possible to arrange the windows in a way you like and then save it - a local shared object could be used for this, flixel already creates one for volume. It would then be activated by setting the debuggerLayout to DEBUGGER_CUSTOM.

IQAndreas commented 11 years ago

Just a side idea, rather than have the "log" and "watch" windows split space, how about doing it "tabbed" style, where buttons switch between the currently active output textbox?

Gama11 commented 11 years ago

Just a side idea, rather than have the "log" and "watch" windows split space, how about doing it "tabbed" style, where buttons switch between the currently active output textbox?

Hm.. interesting idea, but it seems like that's only beneficial for games with a really small resolution where not that much information can be shown, which is probably rare. Or if you're using log / watch a lot. Could be another debuggerLayout, DEBUGGER_TABBED perhaps?

What do you think about the initial suggestions though?

greysondn commented 11 years ago

@IQAndreas : I think the way that TheMiner does things may be the way to go here, but in a Flixel fashion: http://www.sociodox.com/theminer/index.html

Tabs work for that. I also think finding some way to preserve older workflows or to integrate them into the new ones is essential. Why not compromise?

First tab can be all the older stuff, with a configurable viewport. Newer tabs can be newer things as we add them. It'd be nice to have hooks to profile built in by default but - let's be honest, who wants to put forth that much effort?

Actually, I'm half kidding. I'm strongly considering a few tools that may call for a few tabs, but they're more aimed at solving the creator-product disconnect than they are at profiling. But all the same, I'd like to see the debugger become a powerful tool for Flixel apps so there's compelling call to use Flixel, and I intend to move towards using it to rapidly prototype various things. I'm not afraid to chip in to see all this happen - one piece of what I can conceive at a time.

Dovyski commented 11 years ago

I would love to see this console implemented in the new Flixel debug panel.

Gama11 commented 11 years ago

@Dovyski I have actually thought about how awesome the abliity to enter commands for debugging would be in the past. I'm wondering how difficult it'd be to integrate this into flixel. It looks like it's extremely simple to use and also really flexible.

Dovyski commented 11 years ago

I agree! The ability to enter commands can help a lot in some cases. I don't think it's difficult to integrate that console into Flixel, but if they turn out to be "incompatible", we can invest some time coding our own.