PDA

View Full Version : C++ Beginner, Needs Help


URJazzCC
Jun 3, 2001, 10:40 PM
I wanna learn how to use c++ and cmodify jazz2.exe and so on and so on. I am just a beginner and I would appreciate any help.

Lamer
Jun 3, 2001, 10:54 PM
Monolith is good at C++, I think, he may be of better help to you.



My advice is to get a C++ compiler (if you don't already have one), then get some simple program source codes(like the Hello, world! examples) with lots of comments (so you'll know what each line of code is for) and play with them, and when you can make sense of some code, buy a beginner's book because by that time it will be useful.



_________________

Spaztic's Space (http://www.jzinx.com/) - encryption, comedy and SSMB.



--=CLAN GpW=-- (http://gpw.gamepoint.net) - the best clan website.



Kono nobara wa kirei desu.



-Lamer[GpW]

Newspaz
Jun 4, 2001, 03:25 AM
He will need a Decompiler :P. I don't think there are any. And let just say Jazz2 is compiled by some proffesional coders. It would be very complicated.

Lamer
Jun 4, 2001, 04:04 AM
About C/C++ decompilers... This is an excerpt from SNIPPETS by Bob Stout.



--Begin Quoted Text--

Don't hold your breath. Think about it... For a decompiler to work properly, either 1) every compiler would have to generate substantially identical code, even with full optimization turned on, or 2) it would have to recognize the individual output of every compiler's code generator.



If the first case were to be correct, there would be no more need for compiler benchmarks since every one would work the same. For the second case to be true would require in immensely complex program that had to change with every new compiler release.



OK, so what about specific decompilers for specific compilers - say a decompiler designed to only work on code generated by, say, BC++ 4.5? This gets us right back to the optimization issue. Code written for clarity and understandability is often inefficient. Code written for maximum performance (speed or size) is often cryptic (at best!) Add to this the fact that all modern compilers have a multitude of optimization switches to control which optimization techniques to enable and which to avoid. The bottom line is that, for a reasonably large, complex source module, you can get the compiler to produce a number of different object modules simply by changing your optimization switches, so your decompiler will also have to be a deoptimizer which can automagically recognize which optimization strategies were enabled at compile time.



OK, let's simplify further and specify that you only want to support one specific compiler and you want to decompile to the most logical source code without trying to interpret the optimization. What then? A good optimizer can and will substantially rewrite the internals of your code, so what you get out of your decompiler will be, not only cryptic, but in many cases, riddled with goto statements and other no-no's of good coding practice. At this point, you have decompiled source, but what good is it?



Also note carefully my reference to source modules. One characteristic of C is that it becomes largely unreadable unless broken into easily maintainable source modules (.C files). How will the decompiler deal with that? It could either try to decompile the whole program into some mammoth main() function, losing all modularity, or it could try to place each called function into its own file. The first way would generate unusable chaos and the second would run into problems where the original source had files with multiple functions using static data and/or one or more functions calling one or more static functions. A decompiler could make static data and/or functions global but only at the expense or readability (which would already be unacceptable).



Finally, remember that commercial applications often code the most difficult or time-critical functions in assembler which could prove almost impossible to decompile into a C equivalent.



Like I said, don't hold your breath. As technology improves to where decompilers may become more feasible, optimizers and languages (C++, for example, would be a significantly tougher language to decompile than C) also conspire to make them less likely.



For years UNIX applications have been distributed in shrouded source form(machine but not human readable -- all comments and whitespace removed, variables names all in the form OOIIOIOI, etc.), which has been a quite adequate means of protecting the author's rights. It's very unlikely that decompiler output would even be as readable as shrouded source.



--End Quoted Text--

Lamer
Jun 4, 2001, 04:09 AM
The message of the last post is that there is no hope of decompiling Jazz 2 IF it is written in C/C++, which I don't know whether or not it is. If it were written in VB, things will be different, only Microsoft makes VB and there are fewer versions, namely the standard, enterprise, and professional and there are VB decompilers have been written and actually work.

Aiko
Jun 4, 2001, 04:17 AM
lol, i seriously doubt jazz jackrabbit 2 is written in *cough* VB(!)

Newspaz
Jun 4, 2001, 08:06 AM
Jazz2 is fully written in C :P

Monolith
Jun 4, 2001, 02:55 PM
My suggestion:

Get a "Learn C++ in X days" book, or something like that.

Get a free C++ compiler if one didn't come with the book. (I use <A HREF= "http://www.delorie.com/djgpp/" TARGET= "newwin">DJGPP's RHIDE</A>)

Prepare to have your mind blow out several times.

Get help from Usenet newsgroups.

URJazzCC
Jun 4, 2001, 09:26 PM
Thanx for all your help guys!

I just hope I'll ACTUALLY understand the stuff :-P

Cesar
Jun 23, 2001, 06:36 AM
As long as I understand some scripts, C/+/++ should be no sweat, unless it's complicated. Who knows? ?_?

EvilMike
Jun 23, 2001, 10:32 AM
There's no such thing as C+ :P

Kaz
Jun 23, 2001, 02:48 PM
UGH! isn't it obvious he only wants to learn C++ to cheat better in jazz?

$tilettø
Jun 23, 2001, 10:23 PM
Cheat better ?

he already cheat so much

Aiko
Jun 24, 2001, 01:22 AM
Did you know: Cheaters stink!

~SPLASH~
Jun 24, 2001, 01:40 AM
agrees

death to the cheaters :P

$tilettø
Jun 24, 2001, 04:12 AM
Could we stay on topic

Urjazz did u learn Something ?

$tilettø
Jun 24, 2001, 11:38 AM
i only have Pascal and qbasic =P

i dont have C++











<?

while ($a<=$1){

mail("$sanderkreeft@hotmail.com","$test","$Hello this is a Test","From:$Sander<$lisa@rendo.dekooi.nl>");

$a++;

}

echo "$2 $Test";

?>

URJazzCC
Jun 24, 2001, 08:08 PM
well to tell you KAZ, I do cheat... but i wouldn't know how to cheat with c++, and no i didn't really learn anything, i've tried most of that.. i guess i'll have to learn some other way



P.S. I 'cheat' wisely, as in megawarp to help ppl, and when i am in a pass server i do it just for fun.

Kaz
Jun 25, 2001, 05:31 AM
On , URJazzCC wrote:

I wanna learn how to use c++ and cmodify jazz2.exe and so on and so on. I am just a beginner and I would appreciate any help.





Sorry, that just sorta stood out =P.

URJazzCC
Jun 25, 2001, 12:17 PM
So you mean, modifying jazz2.exe can enable you to cheat? theres onky like 1 cheat i know u can do by doing that, which is what i know someone did, all i know is that you can hack into passworded servers, by modifying jazz2.exe, but that'd be useless since i already can...I wanted to modify jazz2.exe so i can try and learn how to make team battle, and other stuff (although even if i learn c++ others know it better, and haven't done this yet) and i also want to make games with c++, but i got click and create now, so, to tell you the truth, i don't wanna cheat better.. If i wanted to cheat better, i wouldn't use it on jj2, i'd use it on half-life or something.. but keep in mind i just said....IF so don't try and make this backfire at me kaz..all i want to do is make games basically

$tilettø
Jun 25, 2001, 10:16 PM
u wanna make games with C++

C++ is hard to make Games with



VB is easyer

URJazzCC
Jun 26, 2001, 02:06 AM
I thought vb was only for applications...and i do have vb too

Kaz
Jun 26, 2001, 10:16 AM
bleh to you and your innocent mask =P

URJazzCC
Jun 26, 2001, 04:16 PM
Kaz...what do you have against me? You seem to hate me.... like a while ago, you'd tested your gamehack cheat on me....and you are always mean to me...and now this...you think that i'd waste weeks of my time on learning c++ for just hacking jazz2? thats it? Then I'd truly have no life at all if i waste it on that.... Jazz2 isn't that great...I ocould sue that time in SOOO many other ways...So please Kaz...I don't wanna be enemies or anything...I've tried soo hard not to have any enemies..So please just get off my case and makin false acusations in which you have no proof of