Chunky by FelipeFS
Chunky by FelipeFS
GPWiki.org
It is currently Mon Dec 22, 2014 9:08 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Nov 09, 2011 4:36 am 
Source Code Swashbuckler
User avatar

Joined: Wed Nov 09, 2011 3:58 am
Posts: 199
Location: Brazil
Hello everybody. I'm developing a great game engine(to make comparison, its like Game Maker, Construct, and RPG Maker) at the moment, the main part, to generate source code, syntax analysis (which includes a scripting language that I created), and compilation is out in many ways. The programming is not the problem for me. I'm developing with Free Pascal and Delphi. It's pascal, but as I am a C++ programmer too(and any code presented here for anyone will be welcome), I guess it's better to ask this question to programmers of a lower level language.

At the present time I am in dilemma about how the images of sprites will be stored after the compilation of the game(I mean this dilemma is about the design of how the game engine will work about this):

- Using resource files *. res
Using this method means faster conclusion in the process of completing the game engine, since it will not have to program a specific file type that stores images. But using this method, when the game under development is built, the images will be embedded in the executable (*. exe), increasing the initialization time of the game, and the amount of memory used (because I do not intend to use the class TResourceStream to open an external *. res file, that would leave the *. res exposed to the end user, which could be manipulated).

- Using an own file type *. dat
The advantage of using *. dat files in the final result of the compilation, ie, when the game has already been compiled and *. dat files are exposed(not embedded in the executable) to the end user, is that the game will load each image once, when the image is required, saving memory. The problem is that this method requires more development time for the game engine, and there is no guarantee it will work 100% as the *. res works. Highlighting that the *. dat should store more than one sprite image, as a package file.

Which method you advise me to do? and why?
Thanks!

_________________
"Life finds a way." - Ian Malcolm
My WebBlog: PixelDeveloper
English is not my native language, so excuse me for any writing mistakes.


Top
 Profile  
 
PostPosted: Wed Nov 09, 2011 8:14 am 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3826
Location: South Africa
Quote:
leave the *. res exposed to the end user, which could be manipulated

Seriously, don't worry about this. If your player base is small, no one is going to be meddling with your data files. If your player base is large enough, some bright spark will meddle with your data files anyway. If .res files will be easier for you to use, I'd say use them.

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
PostPosted: Wed Nov 09, 2011 9:22 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3952
Location: Ferriday, LA, US
FelipeFS wrote:
... to open an external *. res file, that would leave the *. res exposed to the end user, which could be manipulated.

Also, a .res file stored inside an exe can also be manipulated through a resource extractor/unpacker program. Putting your resource file inside the executable provides no real protection from someone meddling with it, if they really want to do so.

_________________
Wear your sorrows with a smile!


Top
 Profile  
 
PostPosted: Wed Nov 09, 2011 9:47 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2230
Location: England
You could actually be better off allowing the game to be modified, as you will attract users who are interested in that sort of thing. :) I imagine .dat files would be more convenient than .res for that.

The only way to stop content from being meddled with is to encrypt it. The decryption key would be embedded in the application, and would be used to read encrypted content. The encryption key is known only to you, so that only you can authorize content for the game.

But even then, if users are sufficiently skilled, they could reverse compile the application and replace the decryption function with a simple reader, so that unencrypted content could then be used.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Thu Nov 10, 2011 6:03 pm 
Source Code Swashbuckler
User avatar

Joined: Wed Nov 09, 2011 3:58 am
Posts: 199
Location: Brazil
Thank you all for the answers, I will start to code a "model" for the data files.

Jasmine wrote:
But even then, if users are sufficiently skilled, they could reverse compile the application and replace the decryption function with a simple reader, so that unencrypted content could then be used.


But still it's a greater sense of security, I would be happier with that. :)

_________________
"Life finds a way." - Ian Malcolm
My WebBlog: PixelDeveloper
English is not my native language, so excuse me for any writing mistakes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group