Jump to content

Photo
- - - - -

Tutorial Discussion


  • Please log in to reply
96 replies to this topic

#31 Fabbrizio

Fabbrizio

    Legend

  • Members
  • Real Name:Mark

Posted 26 September 2008 - 09:35 PM

Hey, is it possible for someone to submit a general ZScript 101 tutorial? I, and many other ZC n00bs on their first real quest, will need a good guide that will tell us what we need to know, and what we need to figure out the rest.

#32 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 26 September 2008 - 09:41 PM

Yeah, I'd really like one up there, especially because we have a totally empty subforum designed for it. icon_shrug.gif Master Maniac never really got back to us on his tutorial, so I don't know where that is going, if anywhere at all.

#33 Plissken

Plissken

    What's with these homies dissing our girls?

  • Members

Posted 28 September 2008 - 09:55 AM

Just finished up one concerning setting up already created scripts for dummys. I had a hard time when learning it, so I made one up pretty fast to help newbies with it.

#34 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 28 September 2008 - 02:08 PM

Thank you muchly sir. icon_smile.gif

#35 Taco Chopper

Taco Chopper

    protector of the darn forum

  • Administrators
  • Pronouns:He / Him
  • Location:South Australia

Posted 02 October 2008 - 02:44 AM

I'd like to know if someone would feel like submitting a tutorial on the enemy editor. Abbreviations hurt my eyes, and I'm having major issues with some of the default bosses at the moment. That, and it'd be great for newbies getting into ZC as well.

#36 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 October 2008 - 01:48 PM

... Bleh.


Scripting has been around for what, a year now? Perhaps more? Dunno, don't care. (It doesn't matter. icon_razz.gif ) Look at the number of people who are trying to take up coding, but don't even know where to start.

Perhaps we should make some tutorials where skilled people write a fairly simple script, then we try to comment it up on our own? Just for practice, at first. Because there are things that the skilled people will take for granted that the casual users don't understand as outright. Kinda like a Math Teacher who can't understand how someone can't multiply fractions.

#37 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 13 October 2008 - 03:15 PM

I think a good scripting tutorial would need to be a joint effort, written by experts with lots of feedback from beginners. It might be a good idea to have two (or more) different introductory tutorials: one for people who just want to be able to do simple things, and one for people who want to go on to do advanced things like custom bosses.

#38 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 October 2008 - 03:26 PM

That's precisely what I was imagining. Just wanted to hear some comments first.

[Egotrip] Something like This (Even more fleshed out.) would be useful for starters, [/egotrip] which would also include FAQ articles, such as
QUOTE
When does a semicolon follow a line? When is it used?
QUOTE
What can be commented and what can't be? How are comments used?
QUOTE
How does ZScript differ from C++? What do those differences mean to a non-coder?
etc. It'd be a great place for people to ask the questions they couldn't even begin to ask under normal circumstances.

Then, another area for people to actually practice coding. I think that they may need to be separated, because what if someone who is learning scripting wanders into the "Practicing scripting" area, and accidentally learns a mistake before someone's had the chance to correct that mistake? They could adopt it, thinking it's right, having copied it off his/her fellow peers, and could harbor an affection of sorts for that line, mentally. Could be dangerous.

#39 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 13 October 2008 - 04:48 PM

QUOTE(ShadowTiger @ Oct 13 2008, 04:26 PM) View Post
[Egotrip] Something like This (Even more fleshed out.) would be useful for starters, [/egotrip] which would also include FAQ articles, such as [...] etc.

Yeah, that looks like a good way to go about it. Start a thread with a first draft and update it based on comments and questions, then submit it as a tutorial when it's generally agreed to be satisfactory.

QUOTE
Then, another area for people to actually practice coding. I think that they may need to be separated, because what if someone who is learning scripting wanders into the "Practicing scripting" area, and accidentally learns a mistake before someone's had the chance to correct that mistake? They could adopt it, thinking it's right, having copied it off his/her fellow peers, and could harbor an affection of sorts for that line, mentally. Could be dangerous.

Hm, like a subforum of the scripting forum, you mean? Not a bad idea.

#40 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 October 2008 - 05:57 PM

The forums have been created under the Scripting Discussion forum. Thanks! They're in your credit.

#41 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 13 October 2008 - 10:01 PM

I could actually try doing a tutorial myself. Seems like a fun challenge.

#42 Koopa

Koopa

    The child behind the turtle

  • Members
  • Location:Switzerland

Posted 15 October 2008 - 11:17 AM

What I also find useful when looking at or editing or writing code is having syntax highlighting - for instance, comments become green, keywords bold, and so on. Also, it's crucial to have the indentation correct - while computers can recognize the { } and ignore whitespace, humans tend to have a much easier time if blocks are nicely indented.

Some other forums have a special [ code ] style tag that not only does what [ code ] usually does - fixed width font - but also automatically does the colouring. Also, they don't remove spaces at the beginning of a line. We could, if it's possible with the new IPB, call it [ zscript ] or something like that.

I'm thinking - taking up the idea of commented scripts that tell you what each part does that someone proposed in the scripting forum, that colouring would make them even more accessible to newbies. (And to more experienced scripters.)

#43 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 16 October 2008 - 02:00 PM

So, I'm working on tutorials. I've got tentative outlines worked out. See what you think.

Basic tutorial:
Comments, whitespace, and coding style
Getting started
* ffc script and void run()
* Valid script names
Using built-in pointers and variables
* Changing properties of Link, Game, Screen, and this
Arithmetic
Using functions
Constants and std.zh

Intermediate tutorial:
Global and item scripts
Built-in arrays
User-defined variables
Conditional epxressions and comparisons
Loops
User-defined pointers
User-defined functions and script arguments

Advanced tutorial:
Break and continue
Bitwise operators
User-defined arrays
Scope and function overloading
Miscellaneous
Technical details


It's a bit different from the usual order of doing things. In particular, I think variables and flow control should wait until the intermediate tutorial because lots of people have trouble with them, and because it's possible to write useful (albeit simple) scripts without them. I want to get people writing functional scripts as soon as possible, putting off the more abstract and difficult concepts until later. Too many people give up because they're overwhelmed by technicalities before they're able to write anything functional.

I think it would also be a good idea to have sort of a "walkthrough" between the intermediate and advanced tutorials, showing the complete process of creating a fairly complex script.

#44 Fabbrizio

Fabbrizio

    Legend

  • Members
  • Real Name:Mark

Posted 16 October 2008 - 02:24 PM

QUOTE(ShadowTiger @ Oct 13 2008, 01:48 PM) View Post

... Bleh.
Scripting has been around for what, a year now? Perhaps more? Dunno, don't care. (It doesn't matter. icon_razz.gif ) Look at the number of people who are trying to take up coding, but don't even know where to start.

Perhaps we should make some tutorials where skilled people write a fairly simple script, then we try to comment it up on our own? Just for practice, at first. Because there are things that the skilled people will take for granted that the casual users don't understand as outright. Kinda like a Math Teacher who can't understand how someone can't multiply fractions.


If I saw a chunk of code, and saw what effect it had on the game, I would be able to comment it fairly unbiasedly using simple deduction (as I am like the math teacher who CAN'T multiply fractions icon_razz.gif But actually I can, but I'm not a math teacher)

#45 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 16 October 2008 - 06:30 PM

Looks very excellent, Saffith: I wonder if we have any room to add in the "philosophy" of coding. Y'know, the mental framework that you have to have before you can sit down at a keyboard to start writing code, much less understand what's going on. Two EXTREMELY different things. Like, me, I can certainly read code, but for some reason, I Can't write even a line of it.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users