Product Chat / Investigating the Map Save File

Author
Message
DVader
15
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd May 2019 18:27 Edited at: 2nd May 2019 19:25
EDIT - So far all tests have proven GG is working fine with save files or at least with the ones I checked. I 'll leave the posts as is though.

Hi. I don't visit as often as I used to, but after a brief discussion in another thread, I decided to have a think about about it - the ongoing after awhile, my game slows down issue. Caused from my experience from just saving your level over and over and/or deleting objects etc.

This is just a starting point for anyone with the interest and time to spare.
I created a new blank map and saved it. Then I extracted the .fpm. Then I added a default building and saved and extracted again.
The first version of map.ele, which I'm pretty sure is the correct one reads thus:

Nice and neat I added the space between the square brackets as without it the text would not display
The second version with one object loaded looks like this:

I'm guessing here, that the spaces are mainly quirks of loading it into notepad. Nowhere near as neat now though, although that isn't the problem really.

If I continued this, adding a few more objects to see how the file changes, then start deleting them, you would expect the data to be removed. I haven't got this far as yet as due to time restraints but I will continue and add another object and then try deleting one. If the file does not reflect this or leaves some junk behind then we know what the problem is.

For anyone interested in trying this out themselves and want to beat me to it you can extract your levels in winrar with the password mypassword. I'm pretty sure I'm not doing anything naughty here I believe it is fairly common knowledge. Any mods think this is not allowed, feel free to remove it.
@Teabone. I remembered it (the password)

I'll get back when I have looked a little more, or of course if someone is really in need of working this out, feel free to take the initiative from my very basic start point As an aside. The file size of the bigger file (with one entity) still registers as the same size as the first one in Windows. Modern computers eh? lol.

Edit - Okay. I ended up not having to stop looking as I thought I was I've tried adding another object and it added the relevant data. I then deleted both objects and checked. Back to the simple 8[] line. So, the element file is working just fine, at least from a very small test with no real stress making a real game would. They were just static entities as well so dynamic structures may be a cause or of course, not

If there is any issue with level saving slowly eating away at memory or speed, the elements one seems fine. How this could change with a proper complicated game map of course would be a lot more difficult and very slow to check using this step by step method. Also, different objects may cause problems. I used the first 2 default buildings built in to GG. Other items may cause issues possibly and could have a different story. The problem of allowing people other than TGC to make stuff Although I have no evidence either way here, just eliminating stuff.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 12th May 2019 11:39
Quoted, ty 4 take the time for test it.
I don't have that issue so far, but if so, I'll use your step by step method.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 17th May 2019 11:40 Edited at: 17th May 2019 15:21
if you want to probe further into the map.ele file and read it in, you can find the following code in M-Entity.cpp. it'svery much like the FPSC code and I used similar code for one of my tools when reading in entity placement info.



I'm going to read this data in as I have some ideas floating around in my head.

so output so far is thus based on a blank map with a placement of 2 entities, a building and a wizard character:



current DBPro code is :



just a matter of building the code up a bit at a time from the C code.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM
DVader
15
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 17th May 2019 14:40
Not really done much C++ programming (I dabbled with the Dark Basic version for a day or two I think. Was it Dark Studio?). This looks a really big load routine from a quick glance. I'm guessing it's doing all the things we expect in there like truncating the file down etc. When the sun has gone in, I'll have a proper look and see if I can understand anything here, lol.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 17th May 2019 14:43 Edited at: 17th May 2019 15:19
all it's doing is reading in DWORDs (Long) , floats, strings etc and assigning them to a variable and storing them in a structured array, so I'm doing a quick test proggy to read in the file, not yet complete in DBPro for a bit of fun, see what comes out in a debug file. Of course, there is probably a ton of other stuff going on:

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 19th May 2019 09:47 Edited at: 19th May 2019 10:00
anyway, for those that have DBPro and want to view readable content of the map.ele file, here is the code:



you should see something like this in the output file "mapele.txt":



Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM
DVader
15
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th May 2019 15:37 Edited at: 19th May 2019 16:07
Not used Dark Basic in a few years either. Seem to remember it having issues on newer Operating systems, so tend to use AGK for anything these days. That's still a big file it's going through! Is Dark Basic working okay these days? I had issues with some of my old games not working on newer versions of windows as I remember. Also have you noticed it doing anything it shouldn't to the files you tested? I'd either have to get DB again or convert it to work with AGK (probably needs a few different command names mainly). Probably easier to find DB out

I did sit down to do some programming yesterday but wanted to try something first and ended up working on that all night. It wasn't what I had originally sat down to do, but found it quite amusing, watching the computer do it's thing, lol.

All done by the computer Amazing what can be done with random and a few bits of code. I saved this image as I was quite impressed considering how simple the code was. Easy to get distracted sometimes
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 19th May 2019 16:19
@Dvader-I use C+, DB , AGK and sometime Purebasic. I will be writing a version for AGK as I'm getting more into that lately but still use DBPro to work stuff out quickly. Not noticed anything unusual yet about the the map file but will check it out a bit more. DBPro works fine and is great with Matrix1Utils. Love the pic, looks crazy ha
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 24th May 2019 14:02
ok so I have now successfully ported lights/markers etc into GameGuru automatically upon loading a GG formatted FPM file (see pics below). This is for my ongoing AutoWelder project bringing in FPSC levels to GameGuru + entities etc. my findings are that issue was that "Read File" in the source code was being used to read in DWORDs (4 bytes) instead of reading in LONGs (even though READ FILE defaults to 4 bytes or DWORD/LONG-bug maybe?). Anyway, I'm still investigating but there may be some issues with the reading/writing of the mapsave files but don't want to jump to conclusions just yet.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2019-08-17 16:40:08
Your offset time is: 2019-08-17 16:40:08