The New World Posted July 13, 2010 Author Share Posted July 13, 2010 [EO] Full-Screen TutorialPre-Requisites: http://www.touchofdeathforums.com/smf/index.php?topic=61858.0To get the most out of this short and simple tutorial you must understand how to successfully change the size of the picScreen and MAX_MAP to fit any size you please.This still allows the editors to over lap the game.This will all be Client-SideFor complete full-screen, disable your form's controlbox and set the borders to 0 - None.In modDirectDraw7 find…```Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_NORMAL)```![](http://www.freemmorpgmaker.com/files/imagehost/pics/074c1c9a7aff55ac026ba6f901c7a729.png)As commented above it within the source, it says that"' dictates how we access the screen and how other programs' running at the same time will be allowed to access the screen as well."We want to change that one line of code to this..```Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)```And directly below it we want to add..```Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)```![](http://www.freemmorpgmaker.com/files/imagehost/pics/9a15976507fc5bd6e12a4dee872b46c5.PNG)Explanation..```DDSCL_FULLSCREEN```This is a DirectDraw command to set the given form in full-screen. Which is this case was declared to be frmMainGame.```DDSCL_EXCLUSIVE```This means that our application has complete control over DirectDraw, so other windows stuff is kept out.```DD.SetDisplayMode(1024, 768, 32, 0```This DirectDraw command sets the display mode to the resolution of 1024, 768 and the 32 is the set colour quality. These can be changed to fit your needs, I simply used my own desktop resolution.If you want something that comes before the MainGame form to be fullscreen, you must empty the string before each new set. Like this.```Set DD = DX7.DirectDrawCreate(vbNullString)Call DD.SetCooperativeLevel([color]FORMNAME[/color].hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)'Second form loaded to be full-screenSet DD = DX7.DirectDrawCreate(vbNullString)Call DD.SetCooperativeLevel([color]FORMNAME[/color].hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)Note: I have yet to get it to set it to the user's current resolution, but for now, heres a starting point for a fixed res. :P To come: I suppose I'll just have to teach you how to make it optional to play in a windowed or full-screen mode, as well as set it to the user's resolution and not just what you set. ``` Link to comment Share on other sites More sharing options...
Souless Posted July 13, 2010 Share Posted July 13, 2010 Pretty sure I did it right, all it seemed to do was make frmMainGame load in full screen when the project loaded. Thus not allowing one to play as the user had not logged in. Link to comment Share on other sites More sharing options...
The New World Posted July 13, 2010 Author Share Posted July 13, 2010 That only happens when your resolution isn't correctly set to fit your own needs, and when you don't include```Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)```This was only a base, I might just go ahead and add how to make it optional to play in Full-Screen or Windowed mode as well as setting it to the user's resolution. Link to comment Share on other sites More sharing options...
Novur Posted July 17, 2010 Share Posted July 17, 2010 Well, to get the screen's resolution you would have first get the resolution.```Dim ScreenWidth as StringDim ScreenHeight as StringScreenWidth = (Screen.Width / Screen.TwipsPerPixelX)ScreenHeight = (Screen.Height / Screen.TwipsPerPixelY)```We set to variables, ScreenWidth and ScreenHeight.We set them to your Screen's Width, and your screen height. Though, this will return some ridiculously high number that is not right. Therefor, we have to divide it by the TwipsPerPixel X/Y it makes.Then:```Call DD.SetDisplayMode(ScreenWidth, ScreenHeight, 32, 0, DDSDM_DEFAULT)``` Link to comment Share on other sites More sharing options...
guzmanm Posted July 17, 2010 Share Posted July 17, 2010 Rose? Didn't I already told? You're awesome. Link to comment Share on other sites More sharing options...
The New World Posted July 17, 2010 Author Share Posted July 17, 2010 A cheaper way to do this is to fully extend the form without that code, and for the frmMainGame just edit your constants and size your picScreen accordingly, as you also have to disable your controlbox + border. Link to comment Share on other sites More sharing options...
Chakkra Posted July 17, 2010 Share Posted July 17, 2010 Yay! I am using this!! Link to comment Share on other sites More sharing options...
Kinjiru Posted July 22, 2010 Share Posted July 22, 2010 This didnt work for me, this happened>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/0d296a3e85d14a6e4ba9d00a3fd664b4.png) Link to comment Share on other sites More sharing options...
The New World Posted July 23, 2010 Author Share Posted July 23, 2010 @Kinjiru:> This didnt work for me, this happened> > >! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/0d296a3e85d14a6e4ba9d00a3fd664b4.png)Did you use your own resolution? Link to comment Share on other sites More sharing options...
Kinjiru Posted July 23, 2010 Share Posted July 23, 2010 @Yukiyo:> @Kinjiru:> > > This didnt work for me, this happened> > > > >! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/0d296a3e85d14a6e4ba9d00a3fd664b4.png)> > Did you use your own resolution?yes, 1440x900 Link to comment Share on other sites More sharing options...
The New World Posted July 23, 2010 Author Share Posted July 23, 2010 @Kinjiru:> @Yukiyo:> > > @Kinjiru:> > > > > This didnt work for me, this happened> > > > > > >! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/0d296a3e85d14a6e4ba9d00a3fd664b4.png)> > > > Did you use your own resolution?> > yes, 1440x900bleh, I don't think I ever posted because everyone ignored this but, All this does is effect the hWnd of the form. If you want true full screen, just set your border to 0 - None and change your MAX_MAPX and MAX_MAPY, as well as your picScreen to fit. This tutorial wasn't truly based on EO but more as a basis for working more with the form functionality of DD7. Link to comment Share on other sites More sharing options...
Kinjiru Posted July 23, 2010 Share Posted July 23, 2010 @Yukiyo:> @Kinjiru:> > > @Yukiyo:> > > > > @Kinjiru:> > > > > > > This didnt work for me, this happened> > > > > > > > >! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/0d296a3e85d14a6e4ba9d00a3fd664b4.png)> > > > > > Did you use your own resolution?> > > > yes, 1440x900> > bleh, I don't think I ever posted because everyone ignored this but, All this does is effect the hWnd of the form. If you want true full screen, just set your border to 0 - None and change your MAX_MAPX and MAX_MAPY, as well as your picScreen to fit. This tutorial wasn't truly based on EO but more as a basis for working more with the form functionality of DD7.Ah, see what you mean Link to comment Share on other sites More sharing options...
DshWinchester Posted July 23, 2010 Share Posted July 23, 2010 ~~can you post an full example?like 800x600~~my badthe tut is for increase just the frmmaingameI owe you a pie ;D Link to comment Share on other sites More sharing options...
Ertzel Posted July 24, 2010 Share Posted July 24, 2010 Problem with this is what if the Owner has a giant monitor and a really big resolution, but their players have small monitors and smaller resolutions, since it is all setup for the owners comp the screen will be messed up for everyone else..Same thing goes for making no border and just making it all spread out across the fullscreen program because if the owner has more room then things might be off other players screens… Link to comment Share on other sites More sharing options...
Robin Posted July 24, 2010 Share Posted July 24, 2010 It's just the basics of a fullscreen system. It's not hard to make the backbuffer resize itself accordingly and render a certain area of the map depending on the resolution the player is at. Link to comment Share on other sites More sharing options...
Kiliage Posted August 11, 2010 Share Posted August 11, 2010 It works for me only when i press Run in VB6,in game nothing changes :/What i must do to transport it to game? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted August 11, 2010 Share Posted August 11, 2010 File > Make client.exe. Link to comment Share on other sites More sharing options...
Kiliage Posted August 11, 2010 Share Posted August 11, 2010 Works great thx Soul Link to comment Share on other sites More sharing options...
Coolguy6318 Posted October 5, 2010 Share Posted October 5, 2010 How do i make the resolution change 2 what the player is using? Link to comment Share on other sites More sharing options...
takatoreborn Posted November 13, 2011 Share Posted November 13, 2011 I second what cool guy asked. How do we make it render to our players screen? Link to comment Share on other sites More sharing options...
gregnator Posted December 10, 2011 Share Posted December 10, 2011 Greatly done!Have any idea how i might make a button on the game before you login that you can choose windowed and fullscreen?> Link to comment Share on other sites More sharing options...
Murdoc Posted December 11, 2011 Share Posted December 11, 2011 @Captain:> Greatly done!> > Have any idea how i might make a button on the game before you login that you can choose windowed and fullscreen?>Stop making requests and learn how to code Link to comment Share on other sites More sharing options...
wito35 Posted December 29, 2011 Share Posted December 29, 2011 **I do not have** anything **in my client** like this:**Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_NORMAL)** Link to comment Share on other sites More sharing options...
wito35 Posted December 29, 2011 Share Posted December 29, 2011 **I have only this**:![](http://img249.imageshack.us/img249/7107/20111229122407.png)And how I change the code to this:**Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)****I have this** when I run the game:![](http://img225.imageshack.us/img225/998/20111229122506.png)why ? and what I should do ? :sad: please help :sad: :embarrassed: Link to comment Share on other sites More sharing options...
Whackeddie99 Posted December 31, 2011 Share Posted December 31, 2011 @wito35:> **I have only this**:> ![](http://img249.imageshack.us/img249/7107/20111229122407.png)> > And how I change the code to this:> > **Call DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)> Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)**> > **I have this** when I run the game:> > ![](http://img225.imageshack.us/img225/998/20111229122506.png)> > why ? and what I should do ? :sad: please help :sad: :embarrassed:Here is what you need to do to make it work with EO2.0:changeCall DD.SetCooperativeLevel(frmMainGame.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVE)to DD.SetCooperativeLevel frmMain.hWnd, DDSCL_FULLSCREEN Or DDSCL_ALLOWMODEX Or DDSCL_EXCLUSIVEchange Call DD.SetDisplayMode(1024, 768, 32, 0, DDSDM_DEFAULT)to DD.SetDisplayMode 1024, 768, 32, 0, DDSDM_DEFAULTTHIS IS HIGHLY UNRECOMMENDED Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now