Arcade Games in Console

dIxie

Baseband Member
Messages
68
Location
Canada
I am currently working on creating some old arcade games such as asteroids and tetris that will work and appear in console. I have gotten most of them to work but I do have a question. Is there any way for me to register a score and store it as an executable so that I can re-save over the executable that is there. This may not be possible but any info or code that you could give me would be incredibly helpful. BTW I am trying to do all of my code in C.
 
I'm not sure of how you'd put it in the executable - that'd involve changing the program at the same time that it's running which is a bit awkward at best and plain not allowed on some systems.

Why not just put it in a separate file somewhere like every other game does it? If you don't want people editing the score then you could look into some form of basic encryption...
 
no. the exe file running the game will be locked.
also in order to do that you'd need to release the source as a part of the game, in the game, and include a compiler in the game, so that when a high score was registered the source in the game would be altered to include the high score then recompiled to replace the existing .exe, all in all a rather messy approach.

you'd also probably find that you couldn't link the compiler without permission from the creators.


what you need to use is a text file to store the high scores.
this can be read/written/replaced with simple file functions available to C.
 
Back
Top Bottom