Community
Message Board

Chat room - users
Game Over
( 394431 downloads)
Work In Progress
( 523201 downloads)
Links

Code Exchange
Downloads
Tutorials
Add to Favourites

Submit news

DIV ARENA FORUMS
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Modern aspect ratio, strange behaviour of setmode()
ahmok
DIV Junior
**




Posts: 37
Registered: 31-1-2019
Member Is Offline


[*] posted on 12-3-2019 at 02:08 AM
Modern aspect ratio, strange behaviour of setmode()


Hello, I read the help document. It mentions:


"set_mode(<new video mode>;)

Establishes a new video mode for the game execution. The allowed
videomodes that may be specified as a parameter are the following
ones:

m320x200 - VGA standard
m320x240 - X Mode
m320x400 - X Mode
m360x240 - X Mode
m360x360 - X Mode
m376x282 - X Mode
m640x400 - SVGA VESA
m640x480 - SVGA VESA
m800x600 - SVGA VESA
m1024x768 - SVGA VESA"


The above modes are not modern monitors' ratios 16:9. (1366x768, 960x540, 1920x1080, etc.) Help document does not mention how to make 16:9 game window. But I try setmode(1366768), setmode(960540), I succeed!!!!!!!

However, if I try setmode(1366x768), error appears. Furthermore, if I try setmode(m1366x768), error also appears. But..why?

Why setmode() does not support 16:9 ratio officially? May setmode() support any dimension's game window in future versions? Thanks a lot!!!

View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 12-3-2019 at 04:44 AM


To a large extent it is possible to customize your video mode.
The values you listed are just a set of predefined constants.
i.e. m800x600 is the value 8000600. So using set_mode(8000600) is the same thing as set_mode(m800x600).

As you can see the width of the screen is the first four digits. and the height is the last 3. So if you want a resolution of 1366x768, just say set_mode(1366768), easypeasy.
Having said that, I don't know what to do about resolutions with a height that is greater than 999. but 1776x999 would be the same ratio as 1920x1080 and is only a bit smaller.
View user's profile View All Posts By User
ahmok
DIV Junior
**




Posts: 37
Registered: 31-1-2019
Member Is Offline


[*] posted on 12-3-2019 at 07:35 AM


Quote: Originally posted by dom cook  
Having said that, I don't know what to do about resolutions with a height that is greater than 999. but 1776x999 would be the same ratio as 1920x1080 and is only a bit smaller.



When I try setmode(19201080), it seems that an error happens.

Moreover, there is another problem. If user wants to develop game with game window 400x1000, it is impossible. I try setmode(4001000), a very, very fat window appears. Very strange.

If a comma is used inside Setdmode() command in future versions, there will be no confusion. Setmode(400, 1000), right?

Will we see this change in the next version of DIV Games Studio? I don't know. However, I am very optimistic, sure!!!
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 12-3-2019 at 08:16 AM


Quote: Originally posted by ahmok  


When I try setmode(19201080), it seems that an error happens.

Moreover, there is another problem. If user wants to develop game with game window 400x1000, it is impossible. I try setmode(4001000), a very, very fat window appears. Very strange.



Not really, I told you that it wouldn't work for screen heights of 1000 or more.
set_mode(4001000) defines the window width at 4001 and its height at 000 so no surprises that that doesn't work. Try 399999. I'm sure you can afford to sacrifice 1 or 2 pixels.
View user's profile View All Posts By User
ahmok
DIV Junior
**




Posts: 37
Registered: 31-1-2019
Member Is Offline


[*] posted on 12-3-2019 at 04:59 PM


Quote: Originally posted by dom cook  
Quote: Originally posted by ahmok  


When I try setmode(19201080), it seems that an error happens.

Moreover, there is another problem. If user wants to develop game with game window 400x1000, it is impossible. I try setmode(4001000), a very, very fat window appears. Very strange.



Not really, I told you that it wouldn't work for screen heights of 1000 or more.
set_mode(4001000) defines the window width at 4001 and its height at 000 so no surprises that that doesn't work. Try 399999. I'm sure you can afford to sacrifice 1 or 2 pixels.


If DIV Games Studio follows this rule, DIV Games Studio should produce an error message. User asks it to make a 4001x000 game window. It should be an impossible request. Right? However, the game window is about 80-100 pixels in height now. This may be a bug of DIV Games Studio. In addition, this forum started in Mar 2016 but no other post is about this issue. No other user talks about this aspect. Why? You or I should be very surprised!



[Edited on 12-3-2019 by ahmok]
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 12-3-2019 at 06:06 PM


No, I'm not surprised. This place isn't exactly teeming and I don't suppose any of the handful of users has seen this a major problem. DIV has got a whole bunch of issues that need sorting out and, relatively speaking, this one is kind of trivial.

For my part, I enjoy the fact that using DIV generally requires compromise and a willingness to find work-arounds. That's what I was trying to encourage you to do here. May I ask why you need these exotic screen modes?
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 12-3-2019 at 09:56 PM


I'm going to get my old linux laptop back up and running and try to address some of these issues

If we can find a stable version (cictec can you help) to start from, we can start some bug fixes
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 12-3-2019 at 10:07 PM


Quote: Originally posted by MikeDX  
I'm going to get my old linux laptop back up and running and try to address some of these issues

If we can find a stable version (cictec can you help) to start from, we can start some bug fixes

Waiting for any other feedback from dom or others, the most stable version would seem to be the last one I published, whose code is where I indicated for PM, so we could start again from the one for this current version of DIV.
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 12-3-2019 at 10:09 PM


This may be hard to do because of the rollback (although I kept the old master for records, this includes some changes we discussed in PM about codepage filesets)

View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 12-3-2019 at 10:13 PM


It is probable, however this version corrects over 40 bugs that the current official repository does not contain.
Let me check this week if it is possible to convert the files to the appropriate code page and work without problems, so I update the repository and we could start from here.
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


cool.gif posted on 13-3-2019 at 05:10 AM


Quote: Originally posted by CicTec  

Waiting for any other feedback from dom (who is really cool) or others,


To be honest, I'm playing around on DIV a lot at the moment and keeping my eyes open for problems but apart from the bugs that have already been talked about, I'm finding your build to be completely reliable.

I'm more than happy to keep looking. To my mind it would be a tragedy if DIV went the way of the dodo and seeing DIV revived has become something of a personal goal. Of course, it goes without saying that without the two of you on the case, I'd have to abandon this goal so I want to give you every encouragement to keep up the good work.

Although, when it comes to expertise with DIV, I'm more of a driver than a mechanic, I'm even edging towards rolling up my sleeves and getting myself a computer with which I might be able to delve into the inner workings and try to help you boys out where it counts.




[Edited on 13-3-2019 by dom cook]
View user's profile View All Posts By User
ahmok
DIV Junior
**




Posts: 37
Registered: 31-1-2019
Member Is Offline


[*] posted on 13-3-2019 at 07:30 AM


dom cook,

Ok, I see. Thanks for explaining.

"May I ask why you need these exotic screen modes?"

No special reason. I am learning the language of this software and therefore I want to try different things with the language.


MikeDX. CicTec.

Thanks for looking into this issue.

Both of you are very hardworking software developers in this community. Thanks again.

View user's profile View All Posts By User
ahmok
DIV Junior
**




Posts: 37
Registered: 31-1-2019
Member Is Offline


[*] posted on 13-3-2019 at 07:44 AM


Quote: Originally posted by dom cook  

Although, when it comes to expertise with DIV, I'm more of a driver than a mechanic, I'm even edging towards rolling up my sleeves and getting myself a computer with which I might be able to delve into the inner workings and try to help you boys out where it counts.


Hi, you are a skilful driver and they are excellent mechanics. This is very good!

Moreover, DIV Games Studio is a Ferrari racing car.

Actually, I am only a student driver.

[Edited on 13-3-2019 by ahmok]

[Edited on 13-3-2019 by ahmok]
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 13-3-2019 at 08:48 AM


Quote: Originally posted by dom cook  

To be honest, I'm playing around on DIV a lot at the moment and keeping my eyes open for problems but apart from the bugs that have already been talked about, I'm finding your build to be completely reliable.

I'm happy, thanks for the feedback. :)

Quote: Originally posted by dom cook  

I'm more than happy to keep looking. To my mind it would be a tragedy if DIV went the way of the dodo and seeing DIV revived has become something of a personal goal. Of course, it goes without saying that without the two of you on the case, I'd have to abandon this goal so I want to give you every encouragement to keep up the good work.

Thanks for your support, we will try to do what is possible with the available resources.

Quote: Originally posted by dom cook  

Although, when it comes to expertise with DIV, I'm more of a driver than a mechanic, I'm even edging towards rolling up my sleeves and getting myself a computer with which I might be able to delve into the inner workings and try to help you boys out where it counts.

This would be very good. :)
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 13-3-2019 at 07:36 PM


So, should I get Windows or Linux. I'm inclined to go for Linux but an concerned that I'd be making things harder for myself.
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 14-3-2019 at 02:45 PM


Linux would be the best bet since you can compile div yourself and maybe get your hands dirty.
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 14-3-2019 at 05:31 PM


One step closer.
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 18]