Lyon

Discuss how totally awesome Bang! is here.

Moderator: Terryn

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

I wonder whatever became of the other ZZT clones. Plastic, ZIG, BANG!, Z++, ZZ3 (yes I remember this thing), etc. I hope we don't have to add Tyger to this list too. I really like the idea of an enhanced ZZT that is fundamentally ZZT without being Megazeux (there's a place for each of them)

Release should be ready tomorrow. Maybe even tonight. If you guys have any more feature requests for the main ZZT engine please let me know! I'm sure there are more bugs waiting to be fixed.

Edit: It's about time I add the torch life indicator. Going to do that now.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Yay, new build.

This one doesn't have a lot of changes since the last version. To see what's changed, see the posts between this one and the previous build. Biggest changes are the ability to hide menu bar with F12, maximize with ctrl+enter (for game window) and alt+enter (for main window), the torch life indicator, and the inventory engine button (pressing I will automatically ?+I or ?-I accordingly).

There is no interface for the demo recorder but it's in there and fully functional until I figure out what to do with it. There is also no interface for customizing controls. That'll come later.

Also, I just found out - you can actually do the pause-fast-move trick in Lyon! Rapidly press the arrow key and P alternatively and you can move faster than cycle 1. I honestly didn't think such a glitch would make it over from ZZT but I am pleasantly surprised.
Attachments
Lyon-src.zip
(129.57 KiB) Downloaded 144 times
Lyon.zip
(121.6 KiB) Downloaded 146 times
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Lyon

Post by Commodore »

Funny, when I heard menu bar I thought I was going to be able to hide the side status bar for some reason.

You should work on getting save to work, it would make testing easier. I couldn't be that much different from the editor's save routines right? Maybe a separate file could keep track of a save game's origin. Pressing R from the title screen could bring up a windows style load window with just the saves that match the current world. I don't know, maybe there's enough unused space in the zzt file format to watermark it with this information?
*POW* *CLANK* *PING*
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Save would be pretty easy to implement. I need to rewrite how the main window and the game window communicate. They don't actually communicate at all once a game has started - when you start a game, the main window loads an Environment and passes it off to the game window, nothing else. The only way the main window knows what to save is which window you have focused. I will create a set of events that can be raised from the game window that will alert the main window to save/load/etc.

The reason I did this is because Lyon does not require a game window to be open to do things.

If it's the side bar you want to hide, I can certainly implement that as well. Probably F11 or something.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

It being a slow day at work today, I might have an update tonight.

I was thinking about the practical and hard limits of the ZZT file format. Theoretically you would be able to have 255 boards and up to 32767 bytes per board - capping the size of the world to 8356097 bytes which is well over practical limits. We'll probably never reach that.

My question is, should the editor impose practical limits or theoretical limits? And do we even have a specific limit before we start seeing issues in ZZT?
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Lyon

Post by Commodore »

Some games are too big to run on certain setups. Sivion comes to mind. I say you might have a warning if the saved world might not run in ZZT, but not stop it from happening.
*POW* *CLANK* *PING*
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Commodore, you've inspired me to do something awesome.

I've converted a lot of the one-way communication to event-based communication. Windows does this happily as this is what it was designed for. What this means is the removal of a lot of wonky functionality. Not a lot of cosmetic change though. But that means it's easier to add more features.

Things that raise events so far: Refresh HUD, Redraw HUD, Quit Game, Quit ZZT, Load World, Restore Game, Save World, Save Game, Cheat. These events are simply sent to the owner which takes immediate action instead of waiting for the end of the game cycle. HUD updates are snappier. The UI doesn't need to track active windows anymore except for input (which Windows does for me, whee)
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Lyon

Post by Commodore »

Not sure what sparked it, but happy to oblige. :keen:

I got a bug. I was running kevedit in a window alongside lyon. I went fullscreen with the kevedit window and lyon threw an error. The game window became a red X. This did not happen when I turned directdraw off.

Code: Select all

************** Exception Text **************
Error in the application.
-2005532082 (DDERR_UNSUPPORTEDMODE)
   at Microsoft.DirectX.DirectDraw.Surface.CreateSurfaceFromHBitmap(IDirectDrawSurface7** lppSurf, HBITMAP__* hbm, SurfaceDescription desc, Device dev)
   at Microsoft.DirectX.DirectDraw.Surface..ctor(Bitmap source, SurfaceDescription desc, Device dev)
   at Lyon.DirectDrawEngine.Update(Bitmap BackgroundData, Rectangle Rect)
   at Lyon.GameForm.UpdateD3D()
   at Lyon.GameForm.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(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.3082 (QFE.050727-3000)
    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/JEFF/Desktop/lyon/Lyon.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    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.3053 (netfxsp.050727-3000)
    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.3053 (netfxsp.050727-3000)
    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.3053 (netfxsp.050727-3000)
    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.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.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
----------------------------------------
*POW* *CLANK* *PING*
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Nice, good catch. That's an exception type that the code isn't set to handle. Lyon attempts to draw to the window if the window would normally be on the screen. I'm guessing KevEdit uses what's called Exclusive mode while in full screen, where it can't actually draw to the primary surface. Will get that fixed now.

Edit: Fixed and verified.

Edit 2: Pressing S to save and R to restore works in game. Pressing R to restore on the title screen works as well. If you use the shortcuts in this way, the game is automatically paused. New windows will only be opened if you use the File menu to access games.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Was there any difference between ZZT 2.0 and ZZT 3.2 fundamentally? I actually based the ZZT code from 2.0 because I was too lazy to grab UNLZEXE. I didn't really notice anything other than cosmetic changes.

Related note: SuperZZT core is based on SuperZZT 2.0.
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Lyon

Post by bitbot »

Not sure other than the resolution.

Bitman's cleanzzt is an uncompressed 3.2 exe. The only modification is the annoying fake wall/water message and bleep noise are hexed out.
It's my preferred choice.

Would you consider removing that in Lyon? I think most of us can do without it.
Attachments
cleanzzt.zip
(44.58 KiB) Downloaded 151 times
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

bitbot wrote:Not sure other than the resolution.

Bitman's cleanzzt is an uncompressed 3.2 exe. The only modification is the annoying fake wall/water message and bleep noise are hexed out.
It's my preferred choice.

Would you consider removing that in Lyon? I think most of us can do without it.
You'll be able to customize Lyon soon :) It's never bothered me personally but I think I can make this happen. The reason it's in there now is so that we have a "default" which matches ZZT exactly.

I put in a class stub for high scores, which I don't know is worth adding. I am going to put in preliminary support for ZIP archives. If Deflate actually works, I'll be impressed.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Great news! Most ZIP files use Deflate as the compression method. I have tested the Deflate compression class built into .NET and it works great. This ZIP code will support both Store and Deflate. That should cover 99% of all ZIP files.

I looked for hours online to see if anyone had written a ZIP class for .NET and found nothing. It's actually not hard to implement. I might consider posting the ZIP specific code from Roton online elsewhere as a guide to others.

Edit: posting the source here so I can pick it up at work :)
Attachments
RotonZipFile.zip
(1.72 KiB) Downloaded 128 times
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Sorry for all the posting. A ZIP file might contain multiple worlds. How should I handle which one to use?
User avatar
Aplsos
ill make a meal of you
Posts: 429
Joined: Fri Jan 23, 2004 3:06 pm
Location: beautiful downtown joelville
Contact:

Re: Lyon

Post by Aplsos »

menu
r
Post Reply