Data Realms Fan Forums
http://45.55.195.193/

Can you save your game?
http://45.55.195.193/viewtopic.php?f=4&t=25249
Page 1 of 2

Author:  Jabberwocky [ Sat Aug 20, 2011 3:52 pm ]
Post subject:  Can you save your game?

Hi,

I picked up this game with the HIB, and it is easily my favorite. My 11-year old son and I play co-op and have a blast.
We are about to start playing skirmishes against each other and we were wondering if there was a way to save the game? I know that some games can go long and we don't always have time to finish.

On a side note, does anyone have any tips on PvP for n00bs?

Author:  Duh102 [ Sat Aug 20, 2011 5:21 pm ]
Post subject:  Re: Can you save your game?

Sadly, there is no way to save games. This is in part because most people tend to run out of money within 10 or so minutes (at least in previous versions).

Author:  Jabberwocky [ Sat Aug 20, 2011 5:33 pm ]
Post subject:  Re: Can you save your game?

OK. Thanks for the reply. That is too bad.

Author:  C4lv1n [ Sun Aug 21, 2011 8:39 pm ]
Post subject:  Re: Can you save your game?

You can save in Campaign though, I think, my bother and I were playing that yesterday.

Author:  Jabberwocky [ Sun Aug 21, 2011 11:23 pm ]
Post subject:  Re: Can you save your game?

My son and I have not tried campaign yet. We are having fun with DarkStorm on Dummy Assault.

Author:  Data [ Mon Sep 05, 2011 7:11 pm ]
Post subject:  Re: Can you save your game?

We might get in-game action save feature at some point, but the campaign will encourage smaller fights that hopefully won't need saving mid-fight, and get autosaved immediately after they finish

- D

Author:  Mehman [ Sat Sep 17, 2011 7:36 pm ]
Post subject:  Re: Can you save your game?

I'm currently working on a save system, it isn't operationnal yet but I'm making progress.

Author:  bioemerl [ Sat Sep 17, 2011 7:49 pm ]
Post subject:  Re: Can you save your game?

and the above is one of the reasons that every video game ever made should fully support modding

Are you using lua to save and load the game, or something else?

Author:  Mehman [ Sat Sep 17, 2011 7:54 pm ]
Post subject:  Re: Can you save your game?

lua:
Image

Author:  bioemerl [ Sat Sep 17, 2011 8:22 pm ]
Post subject:  Re: Can you save your game?

Mehman wrote:
lua:
Image


so you have the saving part working then
but the loading part?

also does it save the actors velocities so if there is a actor flying through the air, will it continue on its path after load? or just start and fall down (which is still fine with me)

Author:  Mehman [ Sat Sep 17, 2011 10:01 pm ]
Post subject:  Re: Can you save your game?

The saving part works fine, it saves velocities, and will save equipment, and the terrain pixel per pixel. For the loading part you start with the map that corresponds to the game you want to load, then it reads the save file, checks for differences with the map and modifys the terrain to what is written in the file by adding MOPïxel that instantly settle, it works but it takes time(1 to two minutes). If only I could find a way to directly add TerrainObjects it could be much faster, but I'm still looking for the TerrainObject create function. Then it adds the actors, objects, particles...etc.

The files look like this:
Code:
Brain Case
696.5
636
0
0
100
0
Actor
...Many actors, particles, devices
PhaseEND
0
0
0
0
128
128
12
10
...etc
PhaseEND

The part before PhaseEND is for the actors and devices, with Position, velocity, health, team, class, name, then come the terrain, each line is a pixel of terrain(material id).
Of course it's waaaaaaaaaaaaay longer than this, I couldn't post it because of the 60000 character limit. The shortest I have is 4441259 characters long.

Author:  bioemerl [ Sun Sep 18, 2011 1:54 am ]
Post subject:  Re: Can you save your game?

very very cool, saving in cortex command has always been wanted, after you have a huge survival match and are still alive and have to go.... Sounds like it will work very well also, no bugs or glitches as far as not saving things,

what about any sort of timers, lua code, or other code based things?

Author:  Mehman [ Tue Sep 20, 2011 6:43 pm ]
Post subject:  Re: Can you save your game?

I'm afraid saving code based thing will be rather difficult if not impossible.

The whole map reconstruction one pixel at a time is too laggy and the terrain doesn't behave properly, I devised a new way of doing that: the script writes a bitmap of the terrain and then it is used as a MAT file to load the scene like you would do for a preset scene. I got the bitmap part working: here is the first automatically generated MAT file (converted to .PNG to reduce its size):
As you can see the bunkermodules are saved as well:

Author:  bioemerl [ Wed Sep 21, 2011 3:35 am ]
Post subject:  Re: Can you save your game?

Mehman wrote:
I'm afraid saving code based thing will be rather difficult if not impossible.

The whole map reconstruction one pixel at a time is too laggy and the terrain doesn't behave properly, I devised a new way of doing that: the script writes a bitmap of the terrain and then it is used as a MAT file to load the scene like you would do for a preset scene. I got the bitmap part working: here is the first automatically generated MAT file (converted to .PNG to reduce its size):
As you can see the bunkermodules are saved as well:


That is very cool
I assumed the code saving thing would be very hard to do, but its not to big of a deal, most codes are quick
Now, on to edit that bitmap!

Author:  Kettenkrad [ Wed Sep 21, 2011 6:46 am ]
Post subject:  Re: Can you save your game?

Mehman wrote:
I'm afraid saving code based thing will be rather difficult if not impossible.

The whole map reconstruction one pixel at a time is too laggy and the terrain doesn't behave properly, I devised a new way of doing that: the script writes a bitmap of the terrain and then it is used as a MAT file to load the scene like you would do for a preset scene. I got the bitmap part working: here is the first automatically generated MAT file (converted to .PNG to reduce its size):
As you can see the bunkermodules are saved as well:

No BG scenery?

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/