dimanche 24 avril 2016

Improve load data with C++ into Unreal Engine

I'm developing a game with C++ and Unreal Engine.

Every time I start the game I have to read data from a text file. This text file has, at this moment, 117,955 lines divided into 24 registers. The first character on each line is an index to identify them.

I will to load 12 or 13 registers, so I need to find them first. All the registers will be consecutive: from 0 to 12, or from 5 to 17.

I don't know if this is the best method to load data into a program. Now, I open the file, read it line by line until I found the first register.

I've thought that I can split the file into 24 text files, one for each register. But maybe it could be slower to open and close 13 files.

Another option is to use a small database engine like mySQL or maybe mongoDB.

You are more experienced programmers because I've just started to learn C++ and I always have programmed with C# and using SQL Server.

What do you recommend me?

Aucun commentaire:

Enregistrer un commentaire