|
1 registered members (Quad),
3,790
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Video_set bug
#79639
06/27/06 09:13
06/27/06 09:13
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
OP
Senior Expert
|
OP
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
When I used video_set with just video_mode declared at the top, it never worked no matter what I did. As soon as I defined the depth and screen, it worked without making any changes. If it otherwise requires these for it to work, it's not stated in the manual. Video mode does not work in this case: Code:
var video_mode = 8; ... video_set(1152, 864, 0, 0); // doesn't execute at all, even if first instruction
Video mode does work in this case: Code:
var video_mode = 8; var video_depth = 32; // if this and the next line are added as well var video_screen = 8; ... video_set(1152, 864, 0, 0); // this now works without even making any further changes
I find it suspicious behavior.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Video_set bug
[Re: ulillillia]
#79640
06/27/06 14:39
06/27/06 14:39
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Video_mode is for setting the default sizes, e.g. 800x600, 1024x768 etc. but it's not setting any video depth by default, video_set is used for arbitrary resolutions, so they may conflict there, since you leave the bitdepth to what it was, same as fullscreen/window mode, eventhough they never were set in the first place. I'd say it's not that amazing that it didn't work ... This should work instead: Code:
video_set(1152, 864, 32, 1);
Cheers
|
|
|
Re: Video_set bug
[Re: PHeMoX]
#79641
06/29/06 13:03
06/29/06 13:03
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
OP
Senior Expert
|
OP
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
I tried that as well and it didn't work. Whether I use a standard resolution (e.g. 800x600) or an oddball (e.g. 1242x815), it never worked. I'm using windowed mode so odd resolutions are supported. Video_set never worked at all no matter how I formatted it, whether using constants or from variables changed through inputs. However, as soon as I merely added these two lines, and nothing further, it began working, thus the behavior of a bug:
var video_depth = 32; // true color var video_screen = 2; // windowed mode
Even if video_set was used at the very start of a function, the first line of it (and not inside some if statement or while loop), it never executed, but everything else after it did. This was with version 6.40.5.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Video_set bug
[Re: jcl]
#79643
06/29/06 19:53
06/29/06 19:53
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
OP
Senior Expert
|
OP
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
Yes, I'm using window mode. Thing is, if video_screen and video_depth aren't defined, video_set doesn't work. That's like the behavior of a bug. I read the manual for that. I'm talking only about windowed mode. And please stop moving threads from the bug hunt forum - allow for at least 24 hours before moving them as there is sometimes information left out by users or you may not be understanding something.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Video_set bug
[Re: ulillillia]
#79644
07/02/06 11:04
07/02/06 11:04
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Quote:
Yes, I'm using window mode. Thing is, if video_screen and video_depth aren't defined, video_set doesn't work. That's like the behavior of a bug.
No, it's really no bug, look at your code again and at the description in the manual. You've not set any depth or window/fullscreen mode at all. 0 means, there's no change and obviously by default nothing get's set. Try running a game without setting any resolution, it won't give more than a black screen either.
Cheers
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|