🔒 Locked
many programming questions
Advertisement
Original Post
first, hi im new here =]
now:
1) what is the best way for a beginner in C++ (like me) to make a game?
A) only engines? (sound, graphics, physics, networking, blabla..)
B) many engines and many my own? (graphics and physics engines, and sound and networking my own. for example.)
C) is program like Blitz Basic, is a better way to create a 3d game more than using engine/s?
2) is there a tutorial about using mysql with c++? or, how can i?
3) how can i tell my program to create files, for example, save files? i know that i can make a file by using ofstream, but when i write to the file it written like a txt file. how can i protect it? exept encrypt..i mean like binary files protecting their code..
for example, i write "Hello" to the file, and in the file source you will see many sentences of crap.
thanks, pex.
Hi 
The best way for a beginner in C++ to write a game is learn C++ first
You can''t expect to be able to work with something like OpenGL or DirectX if you can''t programm 
First another question.. do you actually know what an engine is?
For learning writing your own stuff is a good idea. You will probably first dive into graphics programming and add a few thingies like input and sound on your own.
There are alot of free engines on the internet but they don''t offer the same quality. OGRE is a good one but i''ve your a real beginner at C++ it could become difficult to understand it.
I can''t answer your second question..
With your 3th question, you say that when someone looks into your source file they will see a bunch of crap. Do you really mean into your cpp file? Because that wouldn''t make much.. you don''t encrypt your code because if you publish something people will not see the code.
Encrypting data you write to something like a text file is another story.. First try to come up with something yourself
Say you take each value that a character stands for and you lett some crazy formula do something with it(let''s say (x+10)^2) and write that to a file. Then when you load it you do the opposite(sqrt(x-10)) and you''ve got a very simple way of encoding something. Offcourse I wouldn''t advise you to encrypt really important data this way
The best way for a beginner in C++ to write a game is learn C++ first
First another question.. do you actually know what an engine is?
For learning writing your own stuff is a good idea. You will probably first dive into graphics programming and add a few thingies like input and sound on your own.
There are alot of free engines on the internet but they don''t offer the same quality. OGRE is a good one but i''ve your a real beginner at C++ it could become difficult to understand it.
I can''t answer your second question..
With your 3th question, you say that when someone looks into your source file they will see a bunch of crap. Do you really mean into your cpp file? Because that wouldn''t make much.. you don''t encrypt your code because if you publish something people will not see the code.
Encrypting data you write to something like a text file is another story.. First try to come up with something yourself
hi
(i hope that all the replies wouldnt began with a hi)
im not new to programming, im ~new to c++. it doesnt mean i dont know c++ (translate: i have a c++ friend and the c++ book boring me
)
thanks but i already have a 3d engine (irrlicht, also free)
and i dont think you understood the 3rd question..(or i didnt explained well..sorry if i didnt)
i mean, that in the code i will write something and this something will create a .sav file. (after compiling my cpp)
so, i have no problem to write to the .sav file, but i have problem since everybody can modify and read the .sav file..
[edited by - pex22 on April 19, 2004 9:35:23 AM]
im not new to programming, im ~new to c++. it doesnt mean i dont know c++ (translate: i have a c++ friend and the c++ book boring me
thanks but i already have a 3d engine (irrlicht, also free)
and i dont think you understood the 3rd question..(or i didnt explained well..sorry if i didnt)
i mean, that in the code i will write something and this something will create a .sav file. (after compiling my cpp)
so, i have no problem to write to the .sav file, but i have problem since everybody can modify and read the .sav file..
[edited by - pex22 on April 19, 2004 9:35:23 AM]
What is a binary file?
by RuneLancer
A binary file is not a text file.
Ok, seriously, to answer your third question, a binary file is a file where data is written in binary form instead of text form. For instance, if you want to save the player''s level, name, current health, and max health, to a file, in text you''d have...
43, Bob_Spoon, 100, 125
Now, if you were to write it to a binary file, you''d have...
+Bob_Spoond}
See the difference? Numbers are written directly to the file and not converted to text. ''+'' has the ascii code of 43 (hold alt, type 43, release alt). See the difference?
So, why isn''t text converted? Well, that''s because text is already in binary format. The ascii value of B is 66, so it writes 66 to the file. Which, when viewed with a text editor, maps to... B! :D If you want it to appear as garbage, you''d have to write your own function to convert it to/from garbage.
by RuneLancer
A binary file is not a text file.
Ok, seriously, to answer your third question, a binary file is a file where data is written in binary form instead of text form. For instance, if you want to save the player''s level, name, current health, and max health, to a file, in text you''d have...
43, Bob_Spoon, 100, 125
Now, if you were to write it to a binary file, you''d have...
+Bob_Spoond}
See the difference? Numbers are written directly to the file and not converted to text. ''+'' has the ascii code of 43 (hold alt, type 43, release alt). See the difference?
So, why isn''t text converted? Well, that''s because text is already in binary format. The ascii value of B is 66, so it writes 66 to the file. Which, when viewed with a text editor, maps to... B! :D If you want it to appear as garbage, you''d have to write your own function to convert it to/from garbage.
Before you try to write your own engine or create games using an existing engine, I''d recommed picking up some books on game programming that use C++ and go through them. You''ll learn a lot about how to make games as well as have practical examples of how C++ works.
To that end, I''d suggest picking up "Developer''s Guide to Multiplayer Games", since you seem to be interested in network programming. It even covers how to use MySql. You can find it here:
http://www.amazon.com/exec/obidos/tg/detail/-/1556228686/qid=1082389528/sr=1-4/ref=sr_1_4/102-7683339-0108926?v=glance&s=books
-John
To that end, I''d suggest picking up "Developer''s Guide to Multiplayer Games", since you seem to be interested in network programming. It even covers how to use MySql. You can find it here:
http://www.amazon.com/exec/obidos/tg/detail/-/1556228686/qid=1082389528/sr=1-4/ref=sr_1_4/102-7683339-0108926?v=glance&s=books
-John
:S
thanks, RuneLancer..the title scares me and i didnt asked what is a binary, but anyway.. \:
now i know it more clearly \:
whatever \:
so, file.write(b,s); writes to file the buffer b in size s and doing automatic all the ascii hard work?
(of course, i first open the file in binary mode)
cool, easy..
thanks gamersg and runelancer..
just back to my second question im not sure that people saw it..
how can i use mysql with c++?
thanks, RuneLancer..the title scares me and i didnt asked what is a binary, but anyway.. \:
now i know it more clearly \:
whatever \:
so, file.write(b,s); writes to file the buffer b in size s and doing automatic all the ascii hard work?
(of course, i first open the file in binary mode)
cool, easy..
just back to my second question im not sure that people saw it..
how can i use mysql with c++?
quote:
Original post by Teknofreek
Before you try to write your own engine or create games using an existing engine, I''d recommed picking up some books on game programming that use C++ and go through them. You''ll learn a lot about how to make games as well as have practical examples of how C++ works.
To that end, I''d suggest picking up "Developer''s Guide to Multiplayer Games", since you seem to be interested in network programming. It even covers how to use MySql. You can find it here:
http://www.amazon.com/exec/obidos/tg/detail/-/1556228686/qid=1082389528/sr=1-4/ref=sr_1_4/102-7683339-0108926?v=glance&s=books
-John
short question: why?
long question: how can game programming book help me a lot?
why not just using the engines and code the game and thats all? whats special in game programming books?
and about the another book, thanks i will check it out
(before buying, anyway i cant buy from amazon)
well, you''ve got to start from somewhere. A book is the better option, it will take you step by step through the process of making games, teaching you the game mechanics, and the inner workings. games are more than just a collection of tools.
reminds me of the differences between my friends who had a hacked copy of Amos, with no docs, and the ones who actually bought it and had the docs, sample code, and tutorials. Guess which ones got there faster. We didn''t have the internet, which is a great resource, but still a good book is 10 times better.
You can still try your hands on Ogre, Torque, and the likes, as you feel confident. It won''t be a total waste of time, one way or another.
In my opinion, I think Blitz Basic is a great way to learn how to make games, and you can achieve some very good quality, but you''ll only go that far. It''s like a simplified engine (in the syntax, not in the features), like an advanced scripting tool.
reminds me of the differences between my friends who had a hacked copy of Amos, with no docs, and the ones who actually bought it and had the docs, sample code, and tutorials. Guess which ones got there faster. We didn''t have the internet, which is a great resource, but still a good book is 10 times better.
You can still try your hands on Ogre, Torque, and the likes, as you feel confident. It won''t be a total waste of time, one way or another.
In my opinion, I think Blitz Basic is a great way to learn how to make games, and you can achieve some very good quality, but you''ll only go that far. It''s like a simplified engine (in the syntax, not in the features), like an advanced scripting tool.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement