Author Topic: C# Aurora Database  (Read 21817 times)

0 Members and 1 Guest are viewing this topic.

Offline aimtec

  • Able Ordinary Rate
  • a
  • Posts: 1
Re: C# Aurora Database
« Reply #45 on: July 28, 2017, 08:39:00 AM »
i dont understand why u would have to use a database for savegames

the easy way is to just use the 'System.  Runtime.  Serialization.  Formatters.  BinaryFormatter'
- create a class 'Savegame' which contains all the objects u want to save
- this class and every class of every object inside this class has to be marked with [Serializable]
- use the binaryformatter to save an object of 'Savegame' into a file
you could even throw everything into an object array and serialize that, but having a 'Savegame' class makes it more readable and adjustable for the programmer

 

Offline Bughunter

  • Bug Moderators
  • Rear Admiral
  • ***
  • Posts: 929
  • Thanked: 132 times
  • Discord Username: Bughunter
Re: C# Aurora Database
« Reply #46 on: July 28, 2017, 12:39:25 PM »
I don't think the game is structured that way that it could easily handle the full game state in a serializable object, so could be a pretty big change. It rather does several small writes at different times like every time you change something from the gui. For this kind of use a db is actually not bad.. except for the fact that it is (was) Access in this case which is always bad.
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20350 times
Re: C# Aurora Database
« Reply #47 on: July 28, 2017, 01:15:14 PM »
I do a lot of manual editing of the data (especially while programming), so a database makes this much easier.
 

Offline Frick

  • Chief Petty Officer
  • ***
  • F
  • Posts: 43
  • Thanked: 14 times
Re: C# Aurora Database
« Reply #48 on: August 01, 2017, 11:25:45 AM »
On a hardware note, I just upgraded to a high end NVMe SSD drive.  Wow, it makes a difference for all the IO in the game.

What did you have before? I've run the game solely on SSDs (Crucial BX100/200) for a while now and it still gets really slow after a while.
 

Offline Shuggana

  • Able Ordinary Rate
  • S
  • Posts: 3
Re: C# Aurora Database
« Reply #49 on: August 02, 2017, 10:25:43 AM »
Quote from: Frick link=topic=9117. msg103773#msg103773 date=1501604745
What did you have before? I've run the game solely on SSDs (Crucial BX100/200) for a while now and it still gets really slow after a while.

Worth noting the NVMe is a PCI-e SSD, while your own (and mine) are SATA.

While a SATA SSD still has incredible throughput a PCIE-e SSD is currently the fastest available on the market.  Can often be twice as fast as a SATA.
 

Offline Retropunch

  • Petty Officer
  • **
  • R
  • Posts: 18
  • Thanked: 6 times
Re: C# Aurora Database
« Reply #50 on: August 02, 2017, 05:06:36 PM »
Whilst I'd obviously like to see as shorter save time as possible, I honestly believe that the most important thing is avoiding in game slowdown and stability.  If it means that saving and loading take a bit longer then I'm fine with that.

Saving and loading are infrequent actions, and they're ones that you can basically be doing other stuff with.  We're not in the days of computers only being able to run one program at a time - checking a few emails whilst it's saving isn't going to kill me, but 5 minute turn times will!
 
The following users thanked this post: TheDOC, MagusXIX

Offline Frick

  • Chief Petty Officer
  • ***
  • F
  • Posts: 43
  • Thanked: 14 times
Re: C# Aurora Database
« Reply #51 on: August 03, 2017, 12:16:53 AM »
Worth noting the NVMe is a PCI-e SSD, while your own (and mine) are SATA.

While a SATA SSD still has incredible throughput a PCIE-e SSD is currently the fastest available on the market.  Can often be twice as fast as a SATA.

I know, and the latency is better too, but I was wondering if he went from HDD to NVMe or SATA SSD to NVMe. An SSD is plenty faster than HDD, but the game still got slow. I even tried it on a RAMdisk once (DDR3) and even that did not help.
 

Offline DuraniumCowboy

  • Warrant Officer, Class 1
  • *****
  • D
  • Posts: 88
  • Thanked: 7 times
Re: C# Aurora Database
« Reply #52 on: August 04, 2017, 09:31:00 AM »
Quote
I know, and the latency is better too, but I was wondering if he went from HDD to NVMe or SATA SSD to NVMe. An SSD is plenty faster than HDD, but the game still got slow. I even tried it on a RAMdisk once (DDR3) and even that did not help

I had a middle grade SSD, a Crucial drive.

Another thing with SATA vs NVMe, is that SATA was designed for spinning disks, so NVMe is the first real standard designed to handle non sequential IO.  My benchmarks show almost x5 IO performance over my old SSD.  Of course, a lot of that likely gets bottle necked somewhere else, as you are at that point sucking out data faster than anything else can really handle.  Still, I was wondering if the ability to parallel, small IO might make database IO better and thus improve turn times.  Or then again, maybe its placebo effect :)