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

0 Members and 1 Guest are viewing this topic.

Offline aimtec

  • Able Ordinary Rate
  • Posts: 1
    • View Profile
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

  • Captain
  • **********
  • Posts: 584
  • Thanked: 32 times
    • View Profile
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

  • Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 6470
  • Thanked: 812 times
    • View Profile
    • http://www.starfireassistant.com
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

  • Petty Officer
  • **
  • Posts: 24
  • Thanked: 3 times
    • View Profile
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
  • Posts: 2
    • View Profile
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

  • Leading Rate
  • *
  • Posts: 9
  • Thanked: 3 times
    • View Profile
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

  • Petty Officer
  • **
  • Posts: 24
  • Thanked: 3 times
    • View Profile
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
  • *****
  • Posts: 85
  • Thanked: 4 times
    • View Profile
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 :)
 

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51