Jibble

Author Topic: Running game from CD/DVD  (Read 4928 times)

Running game from CD/DVD
« on: 27 Feb 2007, 11:11 »
Hi all, I made another post about running my game from a dvd
with an error of :

"unable to write to the current directory. do not run this game off a network or cd rom drive. also check drive free space (you need 1mb free)."

I was told to edit the acsetup.cfg file to include the variable "datadir" to tell where the path of the files are on the dvd. I dont know how to do this to include all possable dvd drive letters as it is the "F" drive on my pc but on my mums its drive "D" I need to know how to script this.

This is what is in the acsetup.cfg file at the moment.

[sound]
digiid=-1
midiid=-1
digiwin=1096302880
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
usevox=0
[misc]
gamecolordepth=32
defaultres=5
screenres=1
letterbox=0
windowed=0
refresh=85
cachemax=20480

Im going to be running the game from the dvd as it has alot of avi files about 3.6 gig worth.

Thanks Shaun.
« Last Edit: 27 Feb 2007, 14:56 by strazer »

Re: How to script this help
« Reply #1 on: 27 Feb 2007, 11:47 »
I'm not sure it's even possible to run an AGS game from a non-writable media. You can use Game.SetSaveGameDirectory("$MYDOCS$/Name of your savegame folder") in your game script to allow the game to save to the harddrive instead of trying to write to the DVD. However, the game setup still needs to be able to write to the .cfg file if you change any settings, and I *think* that has to be placed in the same dir as the .exe file.

Re: How to script this help
« Reply #2 on: 27 Feb 2007, 12:03 »
You can't play the game from non-writable media - that's what the error means - but you can run the game off you HD and have the bulk of the data on CD or DVD.

This should probably have gone in the other thread, rather than starting a new one for an extenstion of the same question. (Although, this part probably doesn't belong in Beginners Tech, so I'd likely have moved it over anyway...)

If it's only going to be used on one or two computers, you can probably just edit acsetup.cfg for them as needed (as GG said, it'll need to be on the HD, along with the game EXE). If you're looking to distribute it to a lot of people, you'll probably need to look into some sort of installer program, that can make the changes automatically. I think innosetup can do that, but I'm not sure - Google or a forum search might be more help.
I know what you're thinking ... Don't think that.

Re: Running game from CD/DVD
« Reply #3 on: 27 Feb 2007, 15:02 »
Yes, please don't open two threads about the same problem. Your thread will get moved to the appropriate forum if needed. Also, use more descriptive subject lines next time.

As for your problem, I also think an installer that puts the exe and cfg to the hard drive and adds the correct datadir line to acsetup.cfg is your best bet.

Re: Running game from CD/DVD
« Reply #4 on: 27 Feb 2007, 17:05 »
yup. some games ask you when installing if you want to load minimum, or maximum data (meaning all the avi's for cut scenes) onto the hard drive. when i finish my asterix game id love to work with a group to do a larger game with lots of cut scenes and animated elements in the game. the game should be huge in itself so i was wondering since there is the option to split the game up into smaller pieces, can you keep most of the pieces also on a cd and only install the 1st exe piece to the hard drive?
« Last Edit: 27 Feb 2007, 17:07 by Da_Elf »

Re: Running game from CD/DVD
« Reply #5 on: 27 Feb 2007, 18:14 »
Be aware that running directly off discs doesn't work as well anymore as it used to back in the mid-nineties. Today's drives are much faster in reading - BUT, for that reason they also take longer to "spin up" (accellerate from standstill to reading speed). If your game frequently reads data off disc (such as in FMV games), this could make the game feel rather choppy and a full install would be preferable. If it's only a once-in-a-while thing (a cutscene every five minutes), it shouldn't be a problem.

Re: Running game from CD/DVD
« Reply #6 on: 02 Mar 2007, 16:23 »
If using an installer program to copy the exe file, cfg file and the setup file to a hard drive will work ie being able to run the avi files (some 3.2 gig of them) from the dvd I would love to know how and what program best dose this if someone would point me in the right direction that explains this ide apreciate it.

Thanks
Shaun.

Candle

  • Truly Hated
Re: Running game from CD/DVD
« Reply #7 on: 03 Mar 2007, 04:27 »

Re: Running game from CD/DVD
« Reply #8 on: 08 Mar 2007, 14:13 »
Hi all I have tried to install and use install creator but it dosnt support an install to read from the installed files that go onto the hard drive and read the files when needed from the dvd..... unless I buy the full program but on their forum they said to just use ags and script it but im still at a dead end to how to do this.

What can I do for this?

Thanks
Shaun.

Re: Running game from CD/DVD
« Reply #9 on: 08 Mar 2007, 15:33 »
it dosnt support an install to read from the installed files that go onto the hard drive and read the files when needed from the dvd

I don't think I understand. Could you rephrase that?

To be clear, the function to read game data off the disc drive is a function of AGS (datadir).
All the installer has to do is put the game exe and cfg onto the hard drive and then modify the acsetup.cfg, adding the datadir parameter. I can't imagine an installer program wouldn't be able to do this.

Re: Running game from CD/DVD
« Reply #10 on: 11 Mar 2007, 14:25 »
To strazer, you hit the nail on the head I have tried one install creator program but it didnt have this feature and another program made one single file that installs all the files but im trying to avoid this type of install. Another program called Tarma Installer might do what I need but they ask me to buy a registration fee or the installed game will not work after 8 hours and im not going to fork out $280 to do this. Dose anyone know of a free program that will install the 3 files and link the rest of the avi's to the dvd im using? Or by using the function datadir in AGS can someone please tell me how to script it to read the avi files from any dvd rom drive. I might have to stear clear of an installer program and just use the datadir function and manualy install the three files that will then read from the dvd. Once again how do I do this? Thanks Shaun.

Re: Running game from CD/DVD
« Reply #11 on: 11 Mar 2007, 14:37 »
problem is that with that link you sent that it says you have to specify the folder where the data can be found. what if your cd rom is drive E but someone elses is drive D?

Re: Running game from CD/DVD
« Reply #12 on: 11 Mar 2007, 14:57 »
InnoSetup should be perfectly capable of making those changes to the .cfg file.

Edit: A small addition. The function I was thinking of in InnoSetup is made for editing .ini files, but I don't see why it should't be able to add a line to the .cfg if you input the right filename.
« Last Edit: 11 Mar 2007, 15:04 by GarageGothic »

Re: Running game from CD/DVD
« Reply #13 on: 12 Mar 2007, 00:02 »
I dont realy know what your talking about GarageGothic could you please tell me who or where to surf to that explains all this in laymans terms or someone that can help me from start to finish?

Thanks
Shaun.

Re: Running game from CD/DVD
« Reply #14 on: 12 Mar 2007, 00:25 »
Well, I would recommend downloading InnoSetup and reading the documentation for the program. When you create an installer with InnoSetup, the actions performed by the installer is determined by a script file. Most actions are set up for you by the wizard, so you normally don't have to edit the script manually. But if you want to use special functions, like this one, you must add them by hand before compiling the installer.

Look up "INI" in the index of the InnoSetup help file for more info. I'm guessing it should be something like:
Quote
[INI]
Filename: "{app}\acsetup.cfg"; Section: "misc"; Key: "datadir"; String: "{drive:{src}}"

I'm not sure that the String value at the end is correct (I *think* it should add the drive letter for the cd drive you install from), if not, you'll have to play around with it a bit and check the help file for other possible parameters.
« Last Edit: 12 Mar 2007, 00:33 by GarageGothic »

Re: Running game from CD/DVD
« Reply #15 on: 12 Mar 2007, 13:27 »
Thanks GarageGothic what you said did the trick, thanks everyone else too.

Regards
Shaun. 8)

Re: Running game from CD/DVD
« Reply #16 on: 12 Mar 2007, 14:42 »
Awesome that it worked without further changes. Glad to be of service.

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re: Running game from CD/DVD
« Reply #17 on: 12 Mar 2007, 23:09 »
I once got KQ2VGA to run off a CD, totally. All I installed on my hard drive was the acwin.exe interpreter, winsetup.exe and acsetup.cfg.

Wish I could remember the settings. It made for a nice "Minimal (just the engine) / Medium (just the exe and assorted game.00? files) / Maximum (whole thing)" option at instalation.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.