Maui Posted November 13, 2016 Posted November 13, 2016 So, I've been thinking lately about learning to code and make my own mod for jka. But there's only one problem... there is no sufficient knowledge on jkhub or google at all. I don't know where to begin, and how to get further. Anybody care to help out me and probably many others?
mrwonko Posted November 13, 2016 Posted November 13, 2016 You'll want to learn to code first. Maybe go with The C++ Programming Language by Bjarne Stroustrup, ideally the latest edition if you want to learn all the fun stuff, although you won't really see much modern C++ in Jedi Academy. eezstreet likes this
Xycaleth Posted November 13, 2016 Posted November 13, 2016 Learn to code first. Maybe you can read through some parts of the JKA code as you learn so you get a better understanding of the code base as you go, and to give yourself concrete examples of how the different constructs are used.
Maui Posted November 13, 2016 Author Posted November 13, 2016 Well, I got myself a book from the library to learn C coding.
Maui Posted November 13, 2016 Author Posted November 13, 2016 Also, I'm a bad reader. And I'm totally new to coding. The reason I want to learn to code is because I want to make a Turret Defense game/mod for jka.
Maui Posted November 14, 2016 Author Posted November 14, 2016 If i would get a book to learn C, from what year should it be? The latest edition? Should i learn C, C++ or C#? @@Xycaleth @@mrwonko
mrwonko Posted November 14, 2016 Posted November 14, 2016 If you want to mod Jedi Academy SP/Engine, learn C++. If you only want to mod MP, C will do as well. C# is unrelated. Maui and Smoo like this
Futuza Posted November 14, 2016 Posted November 14, 2016 If you want a C++ book, I like this one, but a book is not necessary. This is a pretty good generic tutorial for C++. C and C++ are so interrelated that it's hard to learn just one without learning the other nowadays. eezstreet has created some C/C++ tutorials here on JKHub as well that are probably going to be pretty useful. You might want to check out first the primer, then the compiling lesson, then the debugging lesson. After doing those, there are a bunch of other ones, various people have written specific to doing things in JKA (such as adding a new weapon). You can also hop on the discord to ask other modders questions if you get stuck (I would try and at least get your head wrapped around the basic stuff I mentioned earlier first though before bugging everyone there). Good luck and welcome to the wonderful world of programming. Maui likes this
Maui Posted November 14, 2016 Author Posted November 14, 2016 If you want a C++ book, I like this one, but a book is not necessary. This is a pretty good generic tutorial for C++. C and C++ are so interrelated that it's hard to learn just one without learning the other nowadays. eezstreet has created some C/C++ tutorials here on JKHub as well that are probably going to be pretty useful. You might want to check out first the primer, then the compiling lesson, then the debugging lesson. After doing those, there are a bunch of other ones, various people have written specific to doing things in JKA (such as adding a new weapon). You can also hop on the discord to ask other modders questions if you get stuck (I would try and at least get your head wrapped around the basic stuff I mentioned earlier first though before bugging everyone there). Good luck and welcome to the wonderful world of programming.The problem is that the tutorials other than eezstreet's are just copy/paste ones. I can't learn a thing from that. Eezstreet shows you pieces of code and explains everything. Other people don't do that. What do you suggest me to do then? What do I need to learn? C and C++?If I want to make a Turret Defense gamemode/mod for jka, what parts do I need to edit? Do you got lots of spare time? If you do, do you mind to help me out? Steam: {JoF}Maui
mrwonko Posted November 14, 2016 Posted November 14, 2016 There's people who spend all their time teaching this stuff, it's called university. A good book is more likely to help you self-teach than some random tutorial.
Maui Posted November 14, 2016 Author Posted November 14, 2016 There's people who spend all their time teaching this stuff, it's called university. A good book is more likely to help you self-teach than some random tutorial. People who have lots of spare money, can go to a university. I don't want to learn coding for a job. I want to learn it just for jka. And perhaps in the future for new Jedi Knight games. TheWhitePhoenix likes this
eezstreet Posted November 14, 2016 Posted November 14, 2016 I don't think that throwing the book at people is the right approach on how to teach people. I think the best option when it comes to learning how to program is really look at the code and dive in. In your case, you want to make a tower defense, right? Here's a shortlist of everything that you'll need to do to make that happen:Commands to place, sell, and move towersA means of keeping track of life, and the current wave that you're onA means to generate income, so you can create more towersA pathfinding system for AI to reach its targetActual tower entities, and behavior functions for them (beam towers shoot a trace beam, laser towers could shoot a laser, etc)It's a lot of stuff, and I don't have the answers for everything involved there (especially #2, I've never worked with actual pathfinding), but it's certainly an interesting project. I'd start with the first three. Commands are done on the server in g_cmds.c/pp. Maybe start by figuring out how to give yourself credits/cash as a command. Smoo likes this
Boothand Posted November 14, 2016 Posted November 14, 2016 I'd start by just opening the code and using CTRL F to search for keywords, try to change simple things, see how things change when you switch out things in the code. Copy, paste, use CTRL F to find all references in the code to certain variables and structures, try to get a feel for how it works, or at least see some similarities. Try some practical learning, like CodeCademy. Maybe the Java course is a good start, since it will teach you about data types, variables and functions. You won't learn about memory management and pointer magic through Java or C#, but it's a good start if you're new I guess! TheWhitePhoenix, Futuza, eezstreet and 2 others like this
Smoo Posted November 14, 2016 Posted November 14, 2016 There's people who spend all their time teaching this stuff, it's called university. A good book is more likely to help you self-teach than some random tutorial.Most the time those that write text books don't really know programming. My lecturer keep finding errors in the text book we were meant to use. Lol Merek and eezstreet like this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now