Jump to content

Looking on information for creating binary game files ?


Recommended Posts

I want to learn how to create a binary file for games. For example these types of game binary files "armyops-bin", "ut2003-bin". Any information on creating these types of files for gaming would be of great benefit to myself. Thanks.

Link to comment
Share on other sites

these are binary files they are made by compiling source code.

 

eg) the hello world program in c

 

"hello.c" created on my desktop

#include <stdio.h>



int main()

{

printf("Hello Worldn");

return 0;

}

 

then to compile:

[john@administrator john]$ cd Desktop

[john@administrator Desktop]$ gcc -o hello hello.c

[john@administrator Desktop]$ ./hello

Hello World

[john@administrator Desktop]$

 

So i used gcc to create the "hello" binary file from the hello.c source file.

This is how they make a game binary only they use a lot more source files and link librarys.

 

So was you question how can you port a game to linux? if so you need the source code.

Link to comment
Share on other sites

these are binary files they are made by compiling source code.

 

eg) the hello world program in c

 

"hello.c" created on my desktop

<!--QuoteEBegin--><!--QuoteEBegin-->#include <stdio.h><!--QuoteEBegin--><!--QuoteEBegin--><!--QuoteEBegin--><!--QuoteEBegin-->int main()<!--QuoteEBegin--><!--QuoteEBegin-->{<!--QuoteEBegin--><!--QuoteEBegin-->	printf("Hello Worldn");<!--QuoteEBegin--><!--QuoteEBegin-->	return 0;<!--QuoteEBegin--><!--QuoteEBegin-->}<!--QuoteEBegin--><!--QuoteEBegin-->

 

then to compile:

<!--QuoteEBegin--><!--QuoteEBegin-->[john@administrator john]$ cd Desktop<!--QuoteEBegin--><!--QuoteEBegin-->[john@administrator Desktop]$ gcc -o hello hello.c<!--QuoteEBegin--><!--QuoteEBegin-->[john@administrator Desktop]$ ./hello<!--QuoteEBegin--><!--QuoteEBegin-->Hello World<!--QuoteEBegin--><!--QuoteEBegin-->[john@administrator Desktop]$<!--QuoteEBegin--><!--QuoteEBegin-->

 

So i used gcc to create the "hello" binary file from the hello.c source file.

This is how they make a game binary only they use a lot more source files and link librarys.

 

So was you question how can you port a game to linux? if so you need the source code.

 

Thanks johnnyv, is there an editor or progam I can use to view previously compiled code in Linux, or is this possible at all ?

Link to comment
Share on other sites

I think you can get a dissasembler (what ever you call it) that breaks a binary into machine code but thats virtually useless for what you intend as it almost impossible to make any sense of it especially if the binary is large like a game binary is.

 

I believe i saw talk a while ago on slashdot about a dissasembler that could output in c i think, but the c is uncommented and pretty much impossible to follow anyway.

 

It would probably be easier to learn c/c++/java + sdl + opengl and write your own game if you don't have the source code.(have i scared you off yet :twisted: )

Link to comment
Share on other sites

I think you can get a dissasembler (what ever you call it) that breaks a binary into machine code but thats virtually useless for what you intend as it almost impossible to make any sense of it especially if the binary is large like a game binary is.

 

I believe i saw talk a while ago on slashdot about a dissasembler that could output in c i think, but the c is uncommented and pretty much impossible to follow anyway.

 

It would probably be easier to learn c/c++/java + sdl + opengl and write your own game if you don't have the source code.(have i scared you off yet :twisted: )

 

:wink: Nope, this is relaxtion for me. It is my stress relief lately, it takes my mind off of what I normally do on a daily basis :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...