way Posted November 12, 2003 Share Posted November 12, 2003 Hi, sry, if I'm the second or third who asks this Question, but I want to know, if you know any Coding-Tutorials for JKA or JK-2 (I think it's almost equally)? I do not know anything about Coding, and just want to ask what for things with coding goes? like can I add new weapons? thx for answers:) Link to comment Share on other sites More sharing options...
razorace Posted November 12, 2003 Share Posted November 12, 2003 There's a minor tutorial included with the JK2 SDK, but it's not very good. You'll have to basically learn everything yourself and ask specific questions in the JKO coding forum. Link to comment Share on other sites More sharing options...
Wudan Posted November 12, 2003 Share Posted November 12, 2003 Well, we've seen enough folk interested in coding come around to know a thing or two about your question. Are you serious about coding? It's just C, except without pretty much any of the standard library available. Read a few C tutorials, bone up on the syntax and structure, and go from there. The hardest part, I'd say, for a beginner, is to get started coding. We don't know precisely what JA's setup will be, but it seems you'll need to be able to compile DLLs (which you can do in Windows, Mac, or Linux), as qvms don't seem to play a part in JA (for shame ... or joy?) If there isn't any wacky-ness (and I don't think there will be), you can compile in Dev-C++, which uses MingW to compile. It's free, so I'll write a tutorial for setting it up, as I think you'll need free tools in your conquest. A few people put up money to purchase big software packages to make software, and models, but I'd say free is my favorite f-word. Link to comment Share on other sites More sharing options...
Tchouky Posted November 12, 2003 Share Posted November 12, 2003 you should consider reading these tutorials: http://www.planetquake.com/code3arena they're not designed for jk2 or jka but for quake 3. but since jka and jk2 are based upon quake 3 's code they can still be followed. good luck. Link to comment Share on other sites More sharing options...
way Posted November 12, 2003 Author Share Posted November 12, 2003 Thank you for the answers:) @Tchouky: I will read it, thx @Wudan: Can you give me a URL, please? I would be thankfull, if you would write a Tutorial @Razorace: I knew it would be difficult, but everything on my own? I will try, but can't do more than that. I think first I'm gonna buy a book about C (just C, not C++ ?) and learn the basic-things. PS: thanks again. Nice Users, nice forum:) Link to comment Share on other sites More sharing options...
Wudan Posted November 13, 2003 Share Posted November 13, 2003 Perhaps the best place to start is with a tutorial I didn't find until later, but it's free, concise, and ... free! http://cslibrary.stanford.edu/101/ The CS library at Stanford is free and open to the public - and it's good! This is the essential C one, but they have quite a few more. I'd recommend getting Dev-C++, as it's free also, and you can start coding right away! Link to comment Share on other sites More sharing options...
Commodus Posted November 14, 2003 Share Posted November 14, 2003 Here are some functions that you might find useful once you learn some C and when the SDK comes out (I'm gambling that the functions and the source file names will be unchanged, since JKA and JO are similar) in g_active.c: ClientThink_real() - this function is called every client frame (a frame is a unit of time - so basically you can do things to clients every x seconds or x minutes, like poison) in g_client.c: ClientSpawn() - this function is called when the client spawns for the first time on the level/map. You can use this to change the client's state (e.g. make them faster, give them more health, give them different weapons etc.) or do other things. ClientUserinfoChanged() - this function is called every time the userinfo of a player/client changes. For instance, if the player changes their model or changes their force powers. You can use this to set the player's model to a particular model you might want (e.g. if you're making a class based mod). in g_missile.c: CreateMissile() - creates a "missile" object, basically an entity that is the missile entity type and has a linear trajectory (travels in a straight line until it hits something, or until it reaches the end of its life variable). This function is used in the firing functions of some of the weapons - so when somebody fires, a "missile" is created that travels forward (unless the programmer changes some of its options). in g_combat.c: G_Damage() - handles damage, so you can put code in here that allows you to handle damage from different weapons differently (like adding knockback, or doing some other complicated thing), using the "mod" (Means/Method of Death) integer and checking it against the different MOD_ enums of different weapons. I admit that it's been a while since I've coded for JK2 and some of this info might not apply to JKA, but I think most of it's correct. You will most probably want to check out some of the stuff in the cgame and ui modules and the other functions in the game module. Hope this helps, Nith Link to comment Share on other sites More sharing options...
Tchouky Posted November 18, 2003 Share Posted November 18, 2003 Originally posted by way I think first I'm gonna buy a book about C (just C, not C++ ?) and learn the basic-things. it might be a good thing to start with C. It will be a little easier and since quake 3 and jk2 are coded in plain C it's not necessary to code in c++. but i suspect jka will be coded in c++ though the dll only thingy and no qvm might be a sign =) edit : Nith Sahor im 100% sure that what you said will remain true in jka . Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 18, 2003 Share Posted November 18, 2003 but i suspect jka will be coded in c++ though Nith Sahor im 100% sure that what you said will remain true in jka Arent these two statements a bit contradictory? If they have indeed moved to C++ for JKA (which I seriously doubt btw), they will undoubtedly have re-arranged a significant chunk of the code base. (...if they didn't, there would be no benefit from moving from C - would there...?) ...and so the filenames will almost certainly change. THe function names may not change in some cases, but the way they work will undoubedly change. one quick example: ClientSpawn() -> g_client.c might become something like CClient::Spawn() -> g_client.cpp ...but anyway, highly unlikely the JKA source code will turn out to be C++ imo. ...but we'll see I guess... Link to comment Share on other sites More sharing options...
Vile Posted November 19, 2003 Share Posted November 19, 2003 I am also intrested in modding JK:JA, I have a firm background in the C programming language so if it is in C I can read it just fine , but what I want to know, where to I get what .cpp files to mod the game? or is it not in .c or some other format? Just would like to know on that information so I can start familarizing myself with the functions and how stuff is set up. Link to comment Share on other sites More sharing options...
razorace Posted November 19, 2003 Share Posted November 19, 2003 The MP source for JKA isn't out yet. Link to comment Share on other sites More sharing options...
Vile Posted November 19, 2003 Share Posted November 19, 2003 ok cool that is good to know , so basically no one can mod JA coe wise as of now? But we can still add new models? and skins? Link to comment Share on other sites More sharing options...
Wudan Posted November 19, 2003 Share Posted November 19, 2003 Yes, new models, skins and maps. No code, just yet. Link to comment Share on other sites More sharing options...
Tchouky Posted November 20, 2003 Share Posted November 20, 2003 Originally posted by RenegadeOfPhunk one quick example: ClientSpawn() -> g_client.c might become something like CClient::Spawn() -> g_client.cpp if they turn to c++ it's obvious that it will change a bit, and i agree with your example, but such a change is nothing. the function will still be there and have the same role so it doesn't really change anything (except a small bit of syntax..) . Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 20, 2003 Share Posted November 20, 2003 the function will still be there and have the same role so it doesn't really change anything (except a small bit of syntax..) . If the only difference between C and C++ was syntax, then there wouldn't be that much difference between them. C is a procedural language C++ is an Object-Orientated langiage there is a world of difference not only in the syntax, but in the whole structure of the code. C++ allows far more organised, flexible and maintainable code. I assure you - if it has been moved from C to C++, the structure of the code - in many if not most places -will be significantly different - enough that you will have to look in a different place to find the function you were looking for. In fact, in many cases, you will find many big functions split into various segments and split up between different classes. One huge example would be the saber system. If the saber system had a nice OOP design this time round ... :drool: ...but anyway -I think this is all theoretical anyway. I'll put a 95% probability on the JKA source code still being in C. (Heh -how stupid am I going to look if I'm wrong...!) Link to comment Share on other sites More sharing options...
Emon Posted November 20, 2003 Share Posted November 20, 2003 It's probably more likely than 5%. Raven did EF in C++, and they switched to straight DLLs, so you never know. Link to comment Share on other sites More sharing options...
Commodus Posted November 20, 2003 Share Posted November 20, 2003 Well, Quake 3 and JK2 were coded in a very object-oriented sort of way so the differences should not be too big... Link to comment Share on other sites More sharing options...
Emon Posted November 20, 2003 Share Posted November 20, 2003 Er, they were in C, so they couldn't be object oriented. Link to comment Share on other sites More sharing options...
Commodus Posted November 20, 2003 Share Posted November 20, 2003 I said in an object oriented way, not actually object oriented.... like the way the gentity_t type could be a missile, a client or a bot. Obviously things like inheritance and encapsulation are missing, but it has that sort of style. Link to comment Share on other sites More sharing options...
Wudan Posted November 20, 2003 Share Posted November 20, 2003 In the much broader spectrum that the term 'object oriented' deserves, C is an object oriented language. If you say not, please explain what an 'object' is, and how 'C' is not oriented around the handling of them. Link to comment Share on other sites More sharing options...
Emon Posted November 20, 2003 Share Posted November 20, 2003 Objects are instances of classes, which are groups of data and functions. But that's only a part of it. Object-oriented programming is about encapsulation, polymorphism and inheritence. This page can explain it better than I can. Edit: Wudan, does that answer what you're asking? If I recall, you started programming not too long ago in C, and haven't done much C++, so I assumed you were being serious and all, so I don't mean to insult your intelligence if you weren't. Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 20, 2003 Share Posted November 20, 2003 OOP isn't a few specific keywords or collection of syntax - it's a design philosophy. As such, any language can be approached in an object-orientated way. i.e. you CAN use OOP techniques when programming in C. And conversely, you can write in a procedural fashion in C++. (i.e. bad class structure design!) The difference being that C++ gives you the specific syntax to handle OOP development in much more effecient and effective manner. The whole point of OOP is that the resulting code is easier to work with. Because C doesn't have the OOP specific syntax, you would end up having to specifically code in the OOP structure yourself, making the code more complex and therefore defeating the point of using OOP in the first place. Well, Quake 3 and JK2 were coded in a very object-oriented sort of way so the differences should not be too big... QIII and JK2 were written SOMEWHAT in an object-orientated way - in certain areas. It's not COMPLETELY object orientated -and will never be if it's written in C... It's probably more likely than 5%. Raven did EF in C++, and they switched to straight DLLs, so you never know. ...really? wasn't aware of that. OK, I guess there's more of a chance than I think then. ...if the JKA code IS indeed in C++, I'm gonna be a happy man - modding the code will become a far quicker and easier task... Although I have a sneaking suspision that they possibly may have rushed the C -> C++ conversion process (just judging by all the other stuff they had to do in the same time as well...), which would mean the class structure may not be as good as it could be. But we'll see... Link to comment Share on other sites More sharing options...
Emon Posted November 21, 2003 Share Posted November 21, 2003 OOP's also for reliability, too. Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 21, 2003 Share Posted November 21, 2003 True. Modularity is also a plus. ...there are a whole load of advantages to using an OOP approach. The bottom line is, since I've gotten to grips with OOP design, I would never willingly take on a large software project without doing it OOP all the way -including using a proper OOP language like C++... Link to comment Share on other sites More sharing options...
alexx860 Posted November 25, 2003 Share Posted November 25, 2003 where can i found the JA SDK ?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.