ChangeResolution

ZGE Source Code discussion. Ask questions, present your changes, propose patches etc.

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1770
Joined: Sat Feb 23, 2008 11:15 pm

ChangeResolution

Post by Kjell » Fri Jul 11, 2008 11:56 am

Hello,

As I couldn't wrap my head around enabling direct access to integers ( CustomScreen ) in ZExpressions, I went with a ChangeResolution Component instead for Changing the Screen Resolution on the fly.

K
Attachments
ChangeResolution.gif
ChangeResolution.gif (10.43 KiB) Viewed 12741 times

User avatar
VilleK
Site Admin
Posts: 2172
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Fri Jul 11, 2008 12:24 pm

Wow, another cool new feature by Kjell! Only worry now is that our source code may become too far out of sync. I must put up a public Subversion soon, this will make syncing much easier.

Another concern is if changeresolution really is necessary now when we have the startup dialog? I imagine you had to make quite a number of changes in the code to make this work, and I'm just (as always) concerned about code size and complexity, and want to make sure that every new feature is absolutely needed. What do you guys think?

User avatar
Kjell
Posts: 1770
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Fri Jul 11, 2008 12:32 pm

Hej Ville,

Personally I'm not that fond of the startup dialog ( no offense ) and prefer having Resolution Settings accessible from a in-game menu. Plus this makes me able to decide which resolutions to support, including ( especially windowed ) formats that might be unconventional ... But I guess the dialog is sufficient for most users / project, and since this is somewhat of a temporarily solution until we can access integers directly, I can imagine you'd want to pass on this component for now. I'll be using it though :wink:

K

User avatar
VilleK
Site Admin
Posts: 2172
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Fri Jul 11, 2008 3:28 pm

It's a matter of opinion I guess. Personally I prefer choosing resolution before the application begins because I can select from the start if I want to run it in fullscreen or not. But I agree that a in-game menu is much prettier and professional (and cross-platform). Email me the code and I can take a look at it if you want to. I'm thinking of making a new release soon so email me everything you'd like to contribute the main build in that case.

User avatar
Kjell
Posts: 1770
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Fri Jul 11, 2008 4:23 pm

Hej Ville,

Indeed, it's a matter of preference. But, thinking ahead a little .. one thing that I'm sure pretty much everyone will prefer is to store the chosen preferences in a external file, so this can be a one time occurrence only ( unless the user changes his mind ). This will be quite a bit more tricky to implement in combination with the dialog. You'd need a dedicated routine that checks a file and overwrites the dialogue from appearing .. plus you'd have the problem of making the dialog appear again once the configuration file has been written ..

K

kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 » Fri Jul 11, 2008 10:15 pm

But this would be easier to do if you do use the menu internally in the application! :) just start the app something like 320x240 windowed than change res after you have read one file :D and before the App enters in the first App.State!

BTW: yep! Integer must be possible to access from within the ZExpression!!! Ville, Find a way for doing it! :)
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

more niceness,.

Post by jph_wacheski » Sat Jul 12, 2008 12:55 pm

Yes a one time set up is the most reasonable thing,. like most games do now. I sure don't mind the tinny dialiog currently as it save me from haveing to build/post a bunch of versions, and is simple enouph not to be a bother,.

So, for now, the in game menu sorta defeats its own usefullness without a possibility to save that setting., ( Saving is a very usefull feature, BTW, for long games, and player settings,. mouse sensitivity, avitar designs,. etc! ) although it apears to allow for your custom ratios and lets the desinger decide what rez.s should be allowed, so that may be desireable depending on what your doing,. say 1024x64 or other odd shaped game,. Kjell- Keep hackin' my friend!

Ville- the best option in my opinon is to include both systems in the design and let ppl decide what is best for their project,.(shorter simpler games may juat want the dialoge (no extra coding required!) , longer projects may want the in-game setup menu) if the code base can be sorted and smoothed out I guess,.
iterationGAMES.com

User avatar
Kjell
Posts: 1770
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Sat Jul 12, 2008 1:13 pm

Hej jph,

A SwitchResolution Component can even be useful when you just want to add a Alt+Enter ( using KeyPress Components ) fullscreen switch, although right now there is no way to know what the user has chosen when you use the Dialog route. So you'd have to guess where to switch to the first time while the game is running :? All minor client-side convenience issues though ..

*And a 1.9.? Release / SVN would be nice yes .. let's save 2.0 for something big(ger) :wink:

K

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski » Sat Jul 12, 2008 8:18 pm

yeah, where is 1.9 ? I have heard about loads of new stuff,. <whine> I wan'a see! </whine> However I guess I can actually wait as long as you need to make sure it all works well!! Is it soon though ?
iterationGAMES.com

Post Reply