DirectZZT - Remake of ZZT

Discuss how totally awesome Bang! is here.

Moderator: Terryn

Post Reply
futurefwarrior
newcomer
Posts: 4
Joined: Sun Sep 25, 2011 10:06 am

DirectZZT - Remake of ZZT

Post by futurefwarrior »

Hello guys,

I almost thought this great site was never coming back up, but fortunately, I've been wrong! Great to see the site is back alive :)
Alright so now I have to rewrite my post. I hope I can rewrite it, so let's try...


DirectZZT is a remake of ZZT. I've put that in bold because it's no pure clone. It actually comes with its own unique ideas, so it doesn't fully qualify as a clone. The ZZT-interoperability-stuff is cloned, but the rest not ;)

Anyways, the important stuff now.
Some points have "partially" written behind them, meaning that they aren't quite finished, owing to its Pre-Alpha stage (you may help me out on those to get them done faster).
Some points have "upcoming" written behind them, meaning that they are planned and will be introduced later (you may help me with those as well).

- Written in C# and using XNA (may be ported to other technology like OpenGL later)
- Imports .zzt Files (partially)
- No SuperZZT support (maybe it comes some day; you may contribute to this)
- Interprets ZZT-oop (partially)
- Comes with own, more powerful Powerscript scripting language, fixing many shortcomings of ZZT-oop (partially, upcoming). Powerscript will also be enhancable, meaning that it will accept extensions so it is unlimited in its feature set.
- Networking mechanisms: play your worlds (either ZZT or DirectZZT ones) over the wire for up to 16 players (partially, upcoming) in different game modes (survival, coop, ...) (upcoming)
- Modernized graphical style, using textures instead of a charset (partially)
- Each world may come with its own texture set, sounds etc. (partially, upcoming)
- More board objects (partially)
- Less limitations

The game is currently under development by me. I can not stress this out enough: I'm very happy about anyone contributing anything to this game, if someone likes. This is no one-man show. So if you'd like to help me out (even just a tiny bit), that's helping me more than you can imagine. Thanks :)

Either way, here is the link to the source:
http://code.google.com/p/directzzt/

There are currently no downloads available, so you have to compile it your own to play it.
You need Microsoft Visual Studio 2010 C# Express for coding, and Git for version control to get the source.

Thanks for you reading this. I always liked ZZT and I think I can contribute something to keep this game alive :)

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

Re: DirectZZT - Remake of ZZT

Post by Saxxon »

Good luck on your project :) If you have any questions about ZZT's inner workings, let me know.
futurefwarrior
newcomer
Posts: 4
Joined: Sun Sep 25, 2011 10:06 am

Re: DirectZZT - Remake of ZZT

Post by futurefwarrior »

Thank you! I'm currently working on the netcode, so that some players can play on the map.

Besides, the ZZT importer is struggling currently with the RLE data. I have no idea whether or not it even works well currently, so maybe someone with C#/C++ and .zzt-Knowledge could look over?
Saxxon, do you think you could give it a quick look over? That'd be awesome!

The project has slept briefly for some weeks, since I've been too busy with personal life. The next thing that's in, will be the multiplayer :)

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

Re: DirectZZT - Remake of ZZT

Post by Saxxon »

I can't seem to locate the RLE code. But basically what you want to do is this:

Code: Select all

int index, count, element, color;
index = 0;
count = 0;
while (index < totalTiles) {
  if (count == 0) {
    count = readByte();
    element = readByte();
    color = readByte();
    if (count == 0) {
      count = 256;
    }
  }
  tiles[index].element = element;
  tiles[index].color = color;
  count--;
  index++;
}
It is possible to encounter a Count of 0, this actually wraps around. It means 256.

I can't contribute much code because I am not adept at C#, I am a VB junkie :\ But I can provide code snippets in C-style that will demonstrate exactly what you need to do.
futurefwarrior
newcomer
Posts: 4
Joined: Sun Sep 25, 2011 10:06 am

Re: DirectZZT - Remake of ZZT

Post by futurefwarrior »

Hi Saxxon,

once again thanks for your help! That algorithm looks way better than mine actually. But that's also caused by the fact that I suck at file format and certain algorithms ;)

C# is really not that different from C (syntax-wise), so you might want to check it out what I did. Essentially I recreated your algorithm, but the output in-game is still weird. Maybe I have messed up earlier in the deserializer :/

The ZZT deserializer you'll find under "<root>/ZZTWorldSerializer/ZZTWorldSerializer.cs". The RLE-data part is in line 288.
Again, maybe I have screwed up earlier... maybe someone could give a lookover?

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

Re: DirectZZT - Remake of ZZT

Post by Saxxon »

It should work fine if you have the format correct. I've attached a document of the format I am working on. (Don't worry about the utility functions and stuff later on, you only need the format docs)

Code: Select all

Layout is like this:
* Header/World
*   Board 0
*     Thing 0
*     Thing 1
*     ...
*     Thing n
*   Board 1
*     Thing 0
*     Thing 1
*     ...
*     Thing n
*   ...
*   Board n
Attachments
ZZTIO.zip
ZZT format document
(8.42 KiB) Downloaded 477 times
futurefwarrior
newcomer
Posts: 4
Joined: Sun Sep 25, 2011 10:06 am

Re: DirectZZT - Remake of ZZT

Post by futurefwarrior »

Hi,

big thanks buddy! Unfortunately, I haven't had really much time so far to work on DirectZZT, so the progress was halted for quite some time. It hasn't stopped however, but I'll get it going when I find the time.

Greetings,
ffw
Post Reply