How to make an interpreter?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
ERKAN
Posts: 45
Joined: Thu Apr 10, 2008 12:39 pm
Location: Ukraine

How to make an interpreter?

Post by ERKAN »

Hi, As ScummVM isn't an emulator I wanted to ask if one of the developers could explain how you make ScummVM "read" the game, counting what's in the data files, is there a way to make an interpreter for Cosmo? (Cosmo's Cosmic Adventure)
I've managed to rip some of the sprites, but I'd like to try and make something like ScummVM but just for this game, what I mean is that I don't want to make a fan game or remake, something like CloneKeen (Sorry I can't explain 100% what I want)
I want to know how do you run at least one game that has packed graphics, music so maybe I could make something like CosmoVM
Thanks in Advance
Eugene
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

Well, first you get to know your programming language (Lets say C++).

Then (when working with a bare-butt text editor gets bothersome) you chose a nice working environment. (Lets say Eclipse)

Then you figure out how to read files with your programs (Any C++ book should have that info)

Then, you look for libraries that may help you read the files you need. (The SDL Library will help you read PNG files amongst other things)

If you can't find any libraries or info that can help you with the specific files you want to open, you are up for some good old reverse engineering. This is not easy, and you will need some experience to do this. At this point you will at least have SPECIFIC questions to ask to others. Knowing what it is exactly you want to know helps a lot.

---

I am actually trying to do something similar at the moment. I am looking for a method to read Diablo1 spite archives (cel and cl2 files). There are editors for those but none of them are open source.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

ERKAN - you could ask the people who made the editing tools for Cosmo's Cosmic Adventure in regards to file structures etc: http://www.dosclassics.com/cosmic/dl.php
bobdevis wrote:I am actually trying to do something similar at the moment. I am looking for a method to read Diablo1 spite archives (cel and cl2 files). There are editors for those but none of them are open source.
The guys at http://linux.prinas.si/gemrb/doku.php might be able to help you as they are working on a similar project for Baldur's Gate.

You could also have a look at the source for Wargus and Stargus to see if Blizzard used a similar sprite format in Warcraft 2 & Starcraft.
User avatar
ERKAN
Posts: 45
Joined: Thu Apr 10, 2008 12:39 pm
Location: Ukraine

Post by ERKAN »

ezekiel000 wrote:ERKAN - you could ask the people who made the editing tools for Cosmo's Cosmic Adventure in regards to file structures etc: http://www.dosclassics.com/cosmic/dl.php
Thanks for the link, I spent 3 days ripping the mni files that contain the sprites with Textract, did some batch converting to png and didn't even look for any tools! :(
Tried wombat tools to get the levels, but it had some bugs with them, though all graphic resources are with me (Practically)
So let me try to understand:
1. I must download Eclipse IDE for C/C++ Developers (79 MB)
2. I must download SDL Libraries
3. I must download a C++ development app (I am using Bloodshed Devcpp, is it OK?)
Did I get it right?
Anyway I have some more questions (Sorry if they seem dumb to you)
How do you link together SDL and a development kit? (DevCPP)
What SDL package should I download for this devkit? (Will SDL-devel-1.2.13-VC6.zip (Visual C++ 6.0) work?)
Where can I find some tutorials on controls and basic SDL commands?
How can I make a GUI for the interpreter? (How did you make ScummVM's GUI?)

EDIT: I found a website that szevvy often visits so I'll try to contact him!
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

ERKAN wrote:Where can I find some tutorials on controls and basic SDL commands?
http://www.libsdl.org/
ERKAN wrote:How can I make a GUI for the interpreter? (How did you make ScummVM's GUI?)
ScummVM's GUI has been written from scratch

You might want to have a look at LUA for the game logic language:
http://www.lua.org/

Or you could just write the whole thing in Adventure Game Studio (AGS):
http://www.adventuregamestudio.co.uk/

Big projects like the Sierra KQ1, KQ2 and QFG2 remakes used it - check here: http://www.agdinteractive.com/
User avatar
ERKAN
Posts: 45
Joined: Thu Apr 10, 2008 12:39 pm
Location: Ukraine

Post by ERKAN »

Ok, I'll check!
md5 wrote:ScummVM's GUI has been written from scratch
I understand, I wanna see the code of it (How you made such a skin, buttons, I wanna make a similar skin for the time being until I manage to run at least the 1st episode)
You might want to have a look at LUA for the game logic language:
http://www.lua.org/
I'll check it
md5 wrote:Or you could just write the whole thing in Adventure Game Studio (AGS):
http://www.adventuregamestudio.co.uk/
Cosmo is a platformer so AGS won't work!
md5 wrote:Big projects like the Sierra KQ1, KQ2 and QFG2 remakes used it - check here: http://www.agdinteractive.com/
I know of these remakes, but they won't do for me, I wanted to know about the skin

Anyway, thanks for the links, I probably need to contact the authors of OpenJazz or CloneKeen, cuz these games are platformers too

Looked in the internet for the required SDL libs for DevCPP, Mingw32 works fine! :D
User avatar
Jade
Posts: 46
Joined: Tue Jan 17, 2006 10:15 pm

Post by Jade »

not to sound harsh, but do you have ANY programming experience at all, not just using tools others have written? the GUI is the last thing you should worry about. I just want to be sure you understand the scope of a project like this, I mean no offense by anything I've said. ambition only goes so far
Post Reply