GithubHelp home page GithubHelp logo

davidkinder / level9 Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 8.0 1.22 MB

Interpreter for games released by the UK company Level 9, originally written by Glen Summers.

Home Page: http://www.davidkinder.co.uk/level9.html

License: GNU General Public License v2.0

C++ 25.70% C 71.16% Makefile 0.57% Batchfile 0.14% CSS 0.02% HTML 2.41%

level9's People

Contributors

cibersheep avatar davidkinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

level9's Issues

Documentation improvements

Recently I acquired a copy of the MS-DOS port of Lancelot, which I wanted to play with a modern interpreter (Specifically, I was using Gargoyle, but its Level 9 terp is based on this one, and most of the problems I've encountered are also present in the standalone GtkLevel9 terp).

What I started with:

  • a bunch of files named 1.PIC through 30.PIC, plus a PALETTE.PIC
  • files named GAMEDAT1.DAT through GAMEDAT3.DAT
  • files named MENU.TXT and MENU.EXE

I wanted to know exactly which files I needed to make the game work with Gargoyle/GtkLevel9, but that information was difficult to come by. The included level9.txt talks about what files were used by the original terps, which was interesting, but it wasn't clear to me whether Gargoyle/GtkLevel9 required exactly the same files and filenames.

My first attempt was just to point Gargoyle at GAMEDAT1.DAT, but that failed because Gargoyle doesn't recognise that file as a Level 9 game. GtkLevel9's "File → Open" dialog also doesn't recognise that file, because it's only looking for *.dat, not *.DAT.

Poking around the Gargoyle source tree, I discovered it seemed to associate *.l9 and *.sna files with Level9. I didn't know what "sna" was, but "l9" seemed appropriate. level9.txt suggested that game files could be named just about anything, so long as they contained the volume-number in the right place, so I renamed my files to lancelot1.l9 through lancelot3.l9, and then I could launch the game with Gargoyle and have it run.

The next problem was that the included pictures were not displayed. Searching the Level9 source suggested that it should try both upper-case and lower-case extensions, but in retrospect I think that's only for a single-file picture archive (i.e. LANCELOT.DATLANCELOT.PIC). At any rate, once I renamed the images to 1.pic through 30.pic (i.e. with a lower-case extension) images started appearing.

Lastly, I tried opening lancelot2.l9 and lancelot3.l9 instead of just the first one. Loading lancelot3.l9 took me to the final part of the game, which made sense, but loading lancelot2.l9 gave me a weird error in Gargoyle:

Next disk file: lancelot2.l1

[ Lancelot, pt. 2 (Amiga/PC *USA*)

Unable to load: lancelot2.l1

The game has exited.

In GtkLevel9, the result is even stranger - it loads the title-screen image, but does not write any messages to the text window, and just beeps when I press a key.

I guessed that perhaps the game couldn't start from the middle, and it was trying to decrement an integer in the filename to find the first part of the game, and failing. Sure enough, if I renamed the game files to lancelot1.sna through lancelot3.sna, everything started working perfectly.

From this experience, I respectfully suggest a few changes that would have made this more straightforward:

  • Coordinate with Gargoyle about what the ideal file-extension for Level 9 games should be
    • .DAT and .dat are traditional but too generic
    • .sna works everywhere but apparently is supposed to be a "Spectrum snapshot" which isn't appropriate
    • .l9 would be great except that it breaks the "automatically switch between game segments" feature
  • Check for PC images with upper-case and lower-case extensions
  • Consider writing a step-by-step guide for verifying what format a game is in, and how to convert it into a convenient form for use with the Level9 terp (descriptive filenames, a distinctive file extension that can be associated with an executable, etc.)
    • I am willing to help with this, if I have access to games I can try to convert.

Level 9 games in Blorb files

It would be possible to add support for all the files for a game to be kept in a single Blorb file. The Blorb specification already includes an executable chunk type for Level 9 games ('LEVE'). Support for all the games and graphics formats would involve:

  • Single part games would have a single executable chunk.
  • Multiple part games would have multiple executable chunks, numbered in order of the parts.
  • Bitmap graphics would be represented as PNG images.
  • Line drawn graphics data would be represented as a binary data resource chunk ('BINA').

For this to be of any use it would also be necessary to create a tool to create the Blorb files from the original data files and/or the output of L9Cut.

Graphics / Line drawings seems not to work with glk implementation

I have compiled glk implementation with cheapglk and remglk.

  • Checked that the game I'm playing has graphics (in garglk pictures are shown).
  • In remglk: after initiate with { "type": "init", "gen": 0, "metrics": { "width":800, "height":600 }, "support": [ "graphics", "graphicswin" ] } and typing glk graphics I get «Glk graphics are not available.»
  • In cheapglk, typing glk graphics also shows: «Glk graphics are not available.»

Add a menu item to set the background colour

Hi David, I enjoy using your magnetic scrolls, infocom and level 9 emulators - any chance of adding a background text colour option to the Level 9 emulator? Currently you can only change the font foreground colour, and my eyesight is struggling a bit with the white background - I use white text on a dark grey background in the other two.

Can't compile on Ubuntu 16.04

Hi. I was trying to compile the generic code in GNU/Linux (Ubuntu 16.04 64bits) and I found some errors.
gcc generic.c level9.h level9.c bitmap.c -o level9
and it was compaining about:

level9.c:2025:6: warning: implicit declaration of function ‘stricmp’ [-Wimplicit-function-declaration]
I changed strincmp for strncmp
also stricmp for strcmp

level9.h:120:1: error: unknown type name 'FILE'
I added added: #include <stdio.h> at the top of level9.h

/tmp/bitmap-f74ba0.o: In function bitmap_amiga_intensity': bitmap.c:(.text+0x150a): reference to pow' not defined
I added -lm to link math library:

Finally gcc generic.c level9.h level9.c bitmap.c -o level9 compiled the code. I can run it in the terminal (no pictures for now) but it is working apparently great.

Thanks!

Cannot easily restore a game saved from Part 2 of Lancelot

Steps to reproduce

Using the Gtk port of the interpreter:

  • Load the first part of the MS-DOS version of Lancelot with gtklevel9 GAMEDAT1.DAT or whatever

  • Play through the game until you get to part 2:

      > yes
      > east
      > fight knight
      > yes
      > go to merlin
      > north
      > sleep
      > sleep
      > go to king's road
      > north
    
  • Save the game

  • Quit the interpreter

  • Next time you want to want to play, load the second part of the game with gtklevel9 GAMEDAT2.DAT or whatever.

  • The game detects that it's part 2 of 3, and automatically switches to part 1.

  • Load the game you saved earlier.

Expected results

The terp automatically switches to the correct part of the game, then loads the save data.

Actual results

Sorry, unrecognised format. Unable to restore.

please insert game disc.

That data was not saved from Lancelot.

Thy adventure is over.
Please type RESTART, OOPS, RESTORE or RAM RESTORE.

Notes

With the version of Level9 in Gargoyle, I can safely restore my game if I play through to part 2 first.

With the standalone version of Level9, I always seem to get the "unrecognised format" error.

Gtk source code doesn't compile on Ubuntu 16.04

It's fairly easy to update the configuration to make it compile.

  1. Make sure libgtk2.0-dev are installed on your system.
    sudo apt install libgtk2.0-dev

  2. The compiler gives an error after trying to compile with make

gcc -o gtklevel9 level9.o bitmap.o main.o config.o gui.o text.o graphics.o util.o `pkg-config --libs gtk+-2.0`
/usr/bin/ld: bitmap.o: referencia sin definir al símbolo 'pow@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:46: fallo en las instrucciones para el objetivo 'gtklevel9'
make: *** [gtklevel9] Error 1

Just edit the Makefile file in /gtk on line 43: adding -lm flag (to include math library:

LIBS = $(GTK_LIBS) -lm

  1. Run make in the /gtk folder

Is extracting all location images possible?

Hope this is the right place to ask, but is it possible to extract all of the location images from (for example) the C64 versions of Level 9 games somehow (specifically v2 and v3 games)? Obviously, it is possible to do this by playing through the entire game and saving a screenshot at each location, but I was wondering if the tools already exist to be able to do this? I'm not a programmer, so am assuming that the repeated objects are stored as lines and fills (seeing as they are constructed on the screen as you watch). Not that it is relevant, but I used to work at Rainbird Software and we published some of these titles (but this was just before my time at the company!). Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.