Author
|
Topic: Changing map files
|
FF4LIFE |
posted 08-30- 04:39 PM CT (US)
I'm still pondering on the best possible way to change map files during a game... I think i've narrowed it down to the only reasonable solution, but i've got a few other ones that have come to mind. The easiest and probebly the one i'll have to do, is to tell the player to minimize and run a certain .bat file that will copy some files and such so that a new map file is in the right place. I wish there was a way to run the .bat file without relying on the player, but i just don't think there is. With you dinkers i don't worry about that, but i will also be marketing this to some non-dinkers and flatout people that don't play many games. So if i can avoid this one, that would be best. Another kind of odd one i thought of would be to run dink from a cd. I'm already looking into the idea of having all my game music on a cd, that way people have a cd with cool music and also the music quality will be much better, without having to use 50 meg wavs. So if i were to have the dink program a cd, do you think there is ANY way that i could have it save and load the save games onto the hard drive? Because if i just put the essential files on the hard drive, the rest could be run off the cd. This would be really cool, because then for a new map file i could have a new cd. And to have a screen that says "Please insert disk 2" would just improve the game quality so much! Hehe, so anyway, do ya guys think its possible to have essential files, like save files, on the hard drive and the rest off a cd? One more thing, has anyone ever made the play_avi or whatever command work? Thanks a lot if all you did was read this post!
|
joshriot
|
posted 08-30- 04:49 PM CT (US)
hmm, i think you could load all the graphics and sounds off the cd in dink.ini and start.c or whatever so you could have everything else install on the hard drive, i dont know how youd make an enter cd 2 screen and have it replace the map in dink. you could have the autoplay of the new cd install the new map file or something. its an interesting idea.as far as i know no one has gotten an avi to play and the suggestion of making a front end type program play the avi and then launch the dmod has been brought up. i dont know if anyone has done it though. |
Beuc
|
posted 09-02- 09:47 AM CT (US)
Dink saves in the DMod directory... so no way in messing with 2-3 cds.Anyway, there's still the same problem with the differents maps: the saved games remember any change to any sprite on the map; this prevent you from using editor_type()-like commands, as they may alter the other map, and can't be applyed for 2 different maps. Well, let's say you don't use these commands. Then you'll have to change the map.
With CDs it's not possible, as the savegames can't be saved. And you don't want people to manually change maps. And you don't want people to Quit Dink, then double-click on a .bat or .exe files, then re-lauch Dink... Well, in these extreme cases, I think that Dink must be helped by another Win .exe program, who will automatically change maps [We'll call it maps.exe, to make all the explananation clearer].
But when?
The only way for Dink to communicate with the computer is the saved games. So here the trick I've found: * First, all the currently used files are on the Hard-Drive. * When you want to change a map, then you'll set a global variable, let's say &my_map, to a different value for each map (eg &my_map=1 for map1 etc), and after you'll save the game, number 999 (save999.dat) - or any other number. * Then maps.exe will check every xx seconds if the saved game changed (using the date of the last change), or if it was created. OK, you see what I mean? Now I continue. * The problem now is to know which map to copy in the main dir (from another dir or from a CD, whatever). If you only have 2 maps, you can make the program generate a map.txt file where it will put which map he has; so the prorgam will know that he must copy the other map in the main dir. But I'll explain a way for even 3-4 or more maps. Maps.exe will have to read the saved game, then find &my_map value, and then you'll know which map to use. You'll have to know how is coded a saved game. It doesn't seems too difficult. I've checked one, and the name of the global variables appear clearly. * To make the things easier, maps.exe may automatically delete the save999.dat, instead of just checking the last modification date. * Now maps.exe will copy the specified map in the main directory. * Then, maps.exe will have to communicate to Dink.exe to tell him that the processing and the copying are finished. We'll use Someone's great trick: generate a .c file which is spawn-() several time by Dink. eg: this is the 'normal' script script to_be_spawned.c void main() { &finished = 0; //0 = false: 1 = true. } and this is the generated script: void main() { &finished = 1; //0 = false: 1 = true. } When you change map you'll have to make a loop which spawn() the to_be_spawned.c script until &finished equals 1. * After, your DinkC script will save again the save999.dat with your global variable set to 0 (= no change), then teleport Dink to the right room in the new map :) * Maps.exe will wait for the new save999.dat to be generated by Dink.exe, then re-generate the to_be_spawned.c script witht the &finished value equal to 0, so all is OK for the next time. you'll change the map. All this is complicated, but it can be done. I'm still here for any question related to this :) Or here: sylvain.beucler@libertysurf.fr
-- Beuc |
Beuc
|
posted 09-02- 09:55 AM CT (US)
Oh, yeah, about AVI, I've searched, I've mailed Seth, and the conclusion is: no. Seth may have used a play-avi() command, but deleted it because of glitches in the game. Instead, he made Dink.exe autoplay an AVI using a separated .exe program. This program play the AVI, then execute Dink. If you make your DMod on a CD, and make it become the main game, then you may use this. Dink.exe check if a program called dmovie.exe exists, and if yes, executes it and quits. This dmovie.exe must re-lauch Dink with the -nomovie param after :) |
redink1
|
posted 09-04- 01:57 PM CT (US)
Hey yo... I just that would do pretty much everything you need (with multiple maps and all). Its been around in the Dink Community for quite a while too.How about... creating a series of D-Mods? This may seem stupid (or misleading :) but it makes the most sense... I mean, like in FB3, did part one and part two REALLY need to be in the same D-Mod? No. They could've been two seperate D-Mods easily (and would've probably worked a lot better). I bet at least a few people just gave up at the end of part 1 because they didn't know what the heck to do. People get your D-Mods quicker (or at least the first parts), you get feedback, etc. And if you don't want to make them download the same graphics again and again, you could store the graphics in dink\graphics\okalyd, and require that the people have the previous D-Mods by creating some simple scripts in dink\scripts. Yeah, it might be cool to create the longest and biggest D-Mod ever, but it isn't worth relying on the end users to try and figure out how it would work. Or trying to sell them some CDs (or even trying to get them to burn the CDs for themselves). |
FF4LIFE
|
posted 09-04- 05:18 PM CT (US)
Ok....it says there are 4 responses but I only see 3...crazy.... |
FF4LIFE
|
posted 09-04- 05:26 PM CT (US)
Ok, now I see redinks posts... Anyway...well, making multiple games isn't a bad idea...but i'm sort of marketing this beyond the dink community. Maybe that is what i'll do for you guys, but around my school i released the demo and quite frankly people were amazed. You guys weren't that impressed because you see it all the time, but to non-dinkers and flat out non-computer game players its crazy cool. So around my town it will be sold on a cd in a real snazy case, and thats why i want all these things to work so well. I have friends that can make really nice cenematics, so avis would be really cool to use. And i can't rely on non-dinkers to change map files, so i need an alternate way. I could release a different downloadable version possibly in multiple games, or just release each castle one at a time, and even rely on you guys to change your own maps, but i really hope to try and get avis and map changes working so i can put it on cds and release it to non-dinkers. Once again i'm going to ok this with seth before doing anything, and i'm sure he won't care, seeing as how every other dink-related email he gets he just shrugs off. Thanks for the help, you guys on this forum are great. For this it seems i'm going to need some programming other than dink script, so if you guys are willing to help that would be the coolest thing ever. I'd put you in the credits and everything! :) Thanks a bunch, i hope to start really hauling ass on my game again soon, once i get in the groove of school. I'm also still planning the new release of my demo with all the crazy cool changes i'm making to the game. |
Beuc
|
posted 09-05- 02:05 PM CT (US)
First, I think the DMod is on 2 maps but not like LoT, in fact I think FF4Life want people to go to map 2, then go to map 1, then return to map 1, etc.Then, about Seth, Kornelije once asked for releasing his DMod on a CD, and installed as the main game (instead of the original dink game) - and Seth agreed :) Last, if the program can read the saved games .dat files, then I think it can modify them, and backup them between 2 maps change. In fact, it could backup the maps infos from the saved game into a different folder, then rewrite the saved game with the map #2 informations. Thus FF4Life could use editor_type() - like commands :)) err... did you understood me? ;) |
FF4LIFE
|
posted 09-05- 07:21 PM CT (US)
Sort of. Thats a really good idea. So you're saying i can backup the saves and then only take the editor type information? I need a little more clarification on how that would work... Thats cool about seth not caring, i figured he wouldn't ;) And yeah, you got it right, i plan on having people be able to move back to the first map. If your idea about the editor types doesn't work out, i'm either going to not have you go back and use the editor type deleter thingy, and on all the important things that would need to stay, such as treasure chests, i'd put a global, or use multiple super globals. Explain a little more about that rewriting business. Sorry to sound so ignorant...but i am! ;) |
Beuc
|
posted 09-06- 01:04 PM CT (US)
Let's have a litle explanation:A saved game is a list of datas. These datas are: 1) the global vars 2) an info about each 99 sprites of each 728 screens. These infos are, eg, the sequence&frame of a chest when it has been opened. If you use several maps, the 2nd type of informations may conflict. A sprite in map 2 can turn itself into the opened chest from map 1, because it's the same sprite # and map #. OK? :) Now, if a program manage maps, it can also manage the saved games. When a map change occur, eg player go from map #2 to map #1, the program can replace, in the saved game, map infos from map#2 by map infos from map#1; of course, these infos from map#1 had been backed-up somehow when the player changed from map#1 to map#2. I think the program could have several dirs, erg /map1 & map2/ & map3/, and in each dir there's: - the map - the map infos for each map and for each saved game. I think it's clearer now :) [well, I hope ;)]
Any comments would be really cool :)
|
FF4LIFE
|
posted 09-07- 12:01 AM CT (US)
Yeah, its clear. I get that, i just don't get how it would be done. I guess i'll have to hope someone that know's how to disect those files can help me out there. Thats a great idea tho, saving the editor_type info. Thanks a lot! I'm sure it will make my game helluva cooler. If anyone thinks they know how this can be done in terms of actualy taking apart the save file, please do fill me in. Thanks a bunch! FF4LIFE |
Tamtur
|
posted 09-07- 01:17 AM CT (US)
i think that beuc is suggesting an exe program separate from dink that dink.exe would start. This program would be in a loop, testing the value of a certain global variable in the save file (say &map_num), so when you wanted to switch maps, the Dink script could change &map_num and save the game, then this other separate .exe program would detect and switch the files around or writeto them. I don't know how it would be accomplished exactly, but someone that can program in c++ or visual basic could make it work, I think. Good Luck |
Beuc
|
posted 09-07- 08:39 AM CT (US)
I know exactly how to do this :) The only thing missing is to know exactly how is coded a saveX.dat saved game. I'm studying this, modifying a skeleton DMod and looking into the saved game with Hex Edit :)The final result should be transparent (ie you won't care of it) for the DMod maker :) The .exe will take care of backing-up each map editor_type infos alone :) When I'll finish this, I may release a sample dmod with 3 sample map files. But as I told FF4Life by mail, I'll need TIME. |
redink1
|
posted 09-07- 12:05 PM CT (US)
You guys could contact someone (as in the creator of Fairy Goodness Online), who successfully 'broke' into the save game files to create the multiplayer part of Fairy Goodness. |
Beuc
|
posted 09-07- 01:00 PM CT (US)
As I mentionned previously in this thread, Someone didn't used saved game to make FGO. He generated scripts.Well, I'm quite sure. Are you really think, redink1, that Someone 'hacked' the saved games? |
redink1
|
posted 09-07- 07:58 PM CT (US)
Yes, I'm over 99% sure that someone used Save Games for Fairy Goodness Online. Of course, you're right as well... he also generated scripts.gonline.exe reads save2.dat for the data, and writes oinfo.c While this isn't anything like what FF4Life needs to do his map change save game transfer, someone at least has some experience in reading values from the save games, which could be useful. It'd be mighty hard to try to make FGO by just manipulating scripts... how would you get the info from a player into the program? I once mentioned to Silencer and someone that perhaps one could read variables directly from the RAM (or something like that) but they said it would be way too hard. |
Beuc
|
posted 09-09- 03:26 AM CT (US)
I've just had Someone on ICQ. In fact, he knows how to read a specified global var, not everything on the saved game :) I still owe him a lot, because he first (with Silencer's help) made Dink 'communicate' with the other part of the computer, with a .exe program added :)As for reading in the memory, it seems that cracks and trainer can do this. But I don't know how to do this. |
FF4LIFE
|
posted 09-09- 09:58 AM CT (US)
Wow, I would just like to thank all of you again for trying so hard to help me out. This is so cool. Also, if you guys email me and i don't respond in a couple of days...well, its just probebly better to post it up here. I've gotten in a habbit of not checking my email very often. |