Aplsos wrote:could it not automatically maximize the game window when loading? it makes things ugly as hell
It looks cruddy because it's not interpolated. Interpolation will not work on DirectDraw. You will need to switch DirectDraw off to have interpolation.
stretching to the default window resolution looks bad regardless of the directdraw/interpolation settings. also, toggling interpolation while directdraw is disabled causes exceptions.
That's something I can investigate.
I will also add in an option whether or not to auto-maximize. Restoring the window does put it back to its normal 640x350 size. If it ever loses this size, View->Reset Size will set it back.
EDIT: I have fixed the bug and added the feature above. Also, tooltips have been added for all the menus. In order for "auto-maximize" to take effect, you will need to click Options->Save All Settings.
Aplsos wrote:could it not automatically maximize the game window when loading? it makes things ugly as hell
It looks cruddy because it's not interpolated. Interpolation will not work on DirectDraw. You will need to switch DirectDraw off to have interpolation.
bitbot wrote:Yeah Saxx, this is what we've been trying to point out. It looks cruddy upon loading a game and gives off the wrong impression. The solution is to make the window default to zzt's resolution, enable scaling, or simply maximize the thing.
Otherwise, this is a real solid release. Thanks.
Glad to see you're working on something Sauce!
Scaling -is- enabled. It's just not interpolated. (read the above note) It used to default to the regular resolution. I put in automatic maximization as a feature you requested earlier :P
I guess what's confusing here is the use of the terms "scaling", "interpolation", "maximized", and "fullscreen". I will clarify.
Scaling: the process of resizing an image.
Interpolation: the process of smoothing an image when it has been scaled.
Maximized: the window takes up the entire desktop space, minus the taskbar.
Fullscreen: the window takes up the entire screen.
Sorry, got lazy with my terminology... busy weekend you know. Speaking of which, I didn't see a game from you mister!
Edit: Not scaling, I meant disproportionate resizing...? But don't give yourself more work than is necessary. It looks great once enlarged or maximized.
Last edited by bitbot on Thu May 17, 2012 9:50 pm, edited 1 time in total.
I did some studying on the use of 2D in Direct3D and found a possible way to implement this without a whole lot of trouble. It might take a couple weeks to implement since I am still learning. (But I learned DirectDraw in the same fashion..)
Implemented "flag keys" in the code. In the future, it will allow assigning a flag to a particular key. Pressing the assigned key will toggle the flag. For example, you could assign the I key to the I flag for some inventory based games (ESP comes to mind).
The I key was already implemented in this way in the code, but it was hard coded. Not anymore. I'm still figuring out if there should be the ability to do this on a per-game basis, and how the UI will allow the creation of these assignments.
Saxxon wrote:Implemented "flag keys" in the code. In the future, it will allow assigning a flag to a particular key. Pressing the assigned key will toggle the flag. For example, you could assign the I key to the I flag for some inventory based games (ESP comes to mind).
The I key was already implemented in this way in the code, but it was hard coded. Not anymore. I'm still figuring out if there should be the ability to do this on a per-game basis, and how the UI will allow the creation of these assignments.
This could come in handy... It would be helpful if one could visually see what flags are in use.
Found a crash when performing show desktop (Windows Key+D) or sometimes when max/minimizing:
Parameter is not valid.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at Lyon.DirectDrawEngine.Resized()
at Lyon.GameForm.ResizeD3D()
at Lyon.GameForm.UpdateSize()
at Lyon.GameForm.GameForm_Resize(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnResize(EventArgs e)
at System.Windows.Forms.Form.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Lyon
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/GAMES/DOS/ZZT/Lyon.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.DirectX.DirectSound
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectSound/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectSound.dll
----------------------------------------
Microsoft.DirectX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.DirectX.DirectDraw
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectDraw/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectDraw.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Smilymzx wrote:This JIT means it was doing something in JAVA, Of which it should not be doing?
JIT can be implemented in any compiler.
This error might be a little tricky to track down. Reason being, the exception happened during system code. It's in the DirectX-application interaction. I will need to do a little research to find out why.
Edit: I found the problem. When using Show Desktop, it sets the window's height to zero. Every time the window was resized it created a new Bitmap, which errors out when either dimension is zero. I was able to develop a different solution for resizing that should not have this issue.
New build sometime tonight, after I do a little stress testing.
Not too much other than cosmetic adjustments and bugfixes in Lyon (no real significant changes in the Roton library). You shouldn't experience strange crashes when using DirectDraw.
One change I did make in Roton was, when shooting, the movement vector was set to zero. I couldn't locate where this was in the ZZT code so I temporarily removed it. If you get strange results when shooting, please let me know. I found a shooting bug in CATCAT.ZZT which was resolved by this tweak. (There are plenty of other bugs in that game but they can be reproduced in ZZT)
Edit: It just occurred to me that the bottom row #PUT bug hasn't actually been implemented. Next release :)
Edit 2: Speaking of next release.. I might be able to corner the bug in Mission: Enigma and finally reproduce it exactly. I am rewriting the OOP core.
Private Sub ExecuteOOPCycle(OOP As OOPState, ByRef Instruction As Integer)
With OOP
.OOPNumber = ReadOOPNumber(.ThingData, Instruction)
If (.OOPNumber > 0) Then
.ThingData.Cycle = .OOPNumber
End If
End With
End Sub
I still can't explain this bug but I can finally reproduce it. I've been battling this one since I first wrote ZZT Experience way back when. Now that I am able to duplicate this behavior, I will find out what makes this happen. I don't see this bug as being particularly useful...
There are a few quirks with the interpreter yet, but it's shaping up to be better than what was coded before. Preposterous Machines appears to work better.
Also, I have added a super speed mode to the game speed menu. This will allow you to run games at the highest speed possible on your machine. Results will vary, and I fear this setting might actually lock the program up on some setups (it doesn't lock on any of mine).
I am playtesting the engine and if I don't find any bugs I will post a release tonight.
Whenever using #ZAP NAME:LABEL is used, ZZT only zaps it once per codebase instead of once per object. However, I don't actually see where in the assembly it keeps track. It cycles through the objects just as if you were #SENDing.
This is probably the only bug keeping me from releasing the new build. Will keep you posted.
I'm still trying to isolate how ZZT selectively zaps labels.
I think in the meantime I will release what I've got; it's working well on most games. The only one with the bug I've noticed is Burger Joint. I'm only having a problem with #ZAP target:label and #RESTORE target:label. Without targets, these commands work great.