Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 01-19-2010, 10:39 PM   #1
Baseband Member
dIxie's Avatar
Join Date: Jan 2010
Location: Canada
Posts: 68
Question Arcade Games in Console

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.


The hacker mindset doesn't actually see what happens on the other side.
dIxie is offline   Reply With Quote
Old 01-20-2010, 09:06 AM   #2
Site Team
berry120's Avatar
Join Date: Jul 2009
Location: England, UK
Posts: 3,422
Default Re: Arcade Games in Console

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...

berry120 is offline   Reply With Quote
Old 01-21-2010, 04:22 AM   #3
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 7,872
Default Re: Arcade Games in Console

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.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 11:57 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0