The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Making a Klik like proggie theory
 

Post Reply  Post Oekaki 
 

Posted By Message

Hagar

Administrator
Old klik fart

Registered
  20/02/2002
Points
  1692

You've Been Circy'd!Teddy Bear
21st February, 2005 at 10:47:12 -

Long time no post . I have been consideirng for some time writing my own version of something like TGF/MMF in C++.

This is what i have thought of so far (UML/C++ knowledge is handy ):

You have a file that contaons a series of instructions that are to be carried out by respective classes. Each cammand is seperated by a '\n' or a newline inside the file.

A class of Core shall inherit from the the classes of graphics,sound, filemanip etc. Allowing access to any member function needed i.e. display a sprite.

The instructions will be read one after the other and call the appropiate class member functions, this will have be done with a counter that points to the next command to be read from the file, this must be an inifinite loop that can be broke out of, resetting the intruction counter when all instructions have been performed.
Of course the instruction will be passed to something like a "switch" to decide which case and member function call should be carried out.

The only thing i can not figure out is how to have all the data needed (sprites, music and all that sort of stuff)including the runtime file (a little exe proggie that is a cut down version of my software that just runs files) bunged all together in one exe.

I have writ a basic compression algorithm in C using file pointers and buffers and all manner of stuff but that does not help me, how can i append everything a game or app needs into one file or the maximum of two files? Could i append say a .bmp on the end and use the file pointer to extract what i need?

Also please comment the theory of what i have said .

Image Edited by the Author.

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
21st February, 2005 at 15:02:53 -

Making a scripting language is hard, but I think if you stick a couple of kb of nulls at the end of a normal EXE, then paste in all your data, the EXE will still run normally. The EXE would have to be coded to open itself and extract the data from the end.
Else you can just keep all the files external or packed in to one external file.

 
- Tigerworks

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
21st February, 2005 at 17:17:13 -

yeah, it's probably best to just keep it external

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

turboferret



Registered
  04/07/2004
Points
  2
21st February, 2005 at 18:06:31 -

Isn't it possible to add resources at runtime?

 
This monkey is useless, it only has ONE ass!!!
   

Post Reply



 



Advertisement

Worth A Click