Jump to content

No idea what to put here


Recommended Posts

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?

Link to comment

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

JKG Developer

Link to comment

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

Link to comment

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
Link to comment

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 towers
  • A means of keeping track of life, and the current wave that you're on
  • A means to generate income, so you can create more towers
  • A pathfinding system for AI to reach its target
  • Actual 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
Link to comment

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!

Link to comment

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
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...