RGSS exercises

All good learn-to-program books come with relevant exercises as the reader goes to drill in the core programming concepts.

Some prefer to go straight into a completed project and make edits, while others prefer to know how something works before experimenting with a live system (which I think is better).

But in case some people really don't like just randomly playing around with code, it might be more useful to just implement rgss extensions directly.

So we should compile a list of "RGSS exercises" which are essentially programming exercises, except related to RPG Maker. Exercises should cover a variety of topics, and touch on different programming concepts like the use of variables, different data types, loops, conditions, classes, etc.

An exercise may come up with background information so that the user will know what to actually do. Of course, all of this information is available if they do a simple search, but giving brief descriptions probably wouldn't cause too much problems. And then refer to some in-depth articles.

Problem is that you can't really do things like



Code:
Q: Assign 3 to a variable x
A: x = 3
And then run tests to tell the user that the variable x was assigned a value 3.

The goal of each exercise is to change the system somehow, no matter how trivial.

Something like



Code:
Change the critical damage multiplier from 3 to 2
or



Code:
Assign a value to variable 1 and then use that as the crit dmg multiplier
Where I'm referring to $game_variables[1].

Maybe have some wiki articles so that people can add something whenever they come up with an exercise that they think would be instructive.

In the end, the point is to have someone go through the code themselves with some guidance, have them read and understand how things work on their own, and write code knowing exactly what they're doing and what to expect.
A debugger or a code only test would be very handy for RGSS (gets tedious when you have to run the game every time you want to test your code). I have experimented with the RGSS for quite some time before I was able to make a working script that can help prevent people from overwriting a save slot they don't want to overwrite. One of the things that I can reccommend with the current coding system is to read over the pre-built code use the help and attempt to understand it. (alot of times I have found the help to be less than helpfull). Another way is to build a dummy game i.e single map and try to code your own scripts for it using the pre-built scripts as referance points. The last thing I can say is to keep at those how to code books you will be surprised how much they can help after a few years of use.
The help is really more like documentation than a tutorial -- and I like it that way, personally. What I'd like to know about this, though, is if the exercises should be specifically for RGSS itself rather than Ruby in general. You mentioned that it would be "RPG Maker specific," but would go into such things as iteration and variable assignment, which would be going over essential Ruby, for example.

I guess I'm just a little bit confused about what the actual focus would be. At the moment, it sounds like... both?
It is more like, familiarizing yourself with what RGSS provides.

I mean sure everything is ruby, but just knowing ruby won't be enough to create new sprite classes for example.
So yes, both Ruby and RGSS -- that makes sense. I was just getting a little bit confused over your wording of it.
I think it's a great concept (I'm reminded of when Knuth's volume IV finally came out and he criticized the 'community' for not doing his exercises).

It's the execution that gets dicey. Are you going to give answers? or leave them to the user to figure out on his own? Personally I'm fine with the not providing answers approach (Knuth never did as far as I'm aware, unless maybe to his students). I do think they should focus more on RGSS than on Ruby. There's plenty of stuff already available for Ruby. It's learning what's there and not there in RGSSx that's the trick. Especially in this setting, RGSS makes a whole lot more sense to me than exercises on general Ruby.

I'm still slogging through learning Ruby (about 3/4 through first book). I'm also looking at some scripts for RGSS to get an idea of how things work: Yanfly's scripts are like a textbook in themselves if you understand how to learn by reading code.
I think it's a great concept (I'm reminded of when Knuth's volume IV finally came out and he criticized the 'community' for not doing his exercises).
😀 Comparing Knuth's Art of Computer Programming to RGSS exercises
😀 Comparing Knuth's Art of Computer Programming to RGSS exercises
I just checked - you can get the four volume boxed set on Amazon, so for anyone who hasn't had the pleasure of reading them, there you go.

I can guarantee you that once you've read and understand semi-numeric algorithms, balancing damage stats for your game will come a whole lot easier.
I just checked - you can get the four volume boxed set on Amazon, so for anyone who hasn't had the pleasure of reading them, there you go.

I can guarantee you that once you've read and understand semi-numeric algorithms, balancing damage stats for your game will come a whole lot easier.
Yeah, I own them, have read them all... can't claim to have solved every problem though. Some day.... perhaps.

Original thread: https://forums.rpgmakerweb.com/threads/rgss-exercises.2885/