Jump to content

No idea what to put here


Recommended Posts

Posted

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?

Posted

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
Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

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
Posted

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
Posted

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!

Posted

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

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...