Programming

Since I’m gonna help out ToastMasterM…

I’ve been thinking maybe I should just do a short condensed book (very condensed) on beginning programming (with Unity examples). And maybe put them on the Unify wiki? Would anyone else be interested in such a resource?

Will work for art! :smile:

Any tutorials about programming with Unity specific examples will be VERY useful to the community. Definitely post something nice up on the wiki. :slight_smile:

I almost did this a while back with a space invaders tutorial, but… got tired out from posting on this thread:
http://forum.unity3d.com/viewtopic.php?t=1005&highlight=javascript+help+tutorial
Yes, I feel the need to bump up that thread after the hours and hours people spent struggling with responses to get things across to brucegregory. Wonder what happened to him. :slight_smile:

It occurs to me (from the language thread) that a useful thing would be “how Unity’s implementation of JavaScript differs from ECMAScript and JavaScript in general” since this seems to crop up a lot. Just a thought.

Good luck on the book :slight_smile:

To help you, here’s my first draft of Unity3D for Dummies.

Page 1.

It looks really cool and easy to use, and for a game dev tool it really is! But if you’re a dummy go play “World of Warcraft”.

The End.

That’s a nice bit of explaining there, I understand the desire to bump it. :smile:

Ok, I’ll try my hand at it. I like teaching, it’s just… always working for free doesn’t get me anywhere I’d like to be (teaching full time, musician, or game developer/designer) :?

I like your book. It’s concise and to the point. It’s also a very easy read!

Well… I started it.

I’ve pre-ordered my copy on Amazon! :lol:

“Customers who bought this book also bought: World of Warcraft”

Lucas-Great Start on the wiki man-Thank you
AC

hey lucas, awesome! check out cplusplus.com. they’ve got a tut on there that’s really well done imo. not saying you should go into that much detail but it’s a good approach to explaining things. obviously it’s about c++ but it has points that apply. the overall style is fairly easy to read for noobs.

can’t say as i’ve got a lot of time right now (and i can’t really commit to a project) but throw out what you’re looking for art-wise. i might be able to squeeze out a model here or there. near term probably not so much but in a few weeks.

now i’m off to buy wow… er, i mean… :smile:

You’re welcome! I hope it’s useful and not too boring :smile:

Thanks! And thanks for the reference to cplusplus.com, it looks a lot easier to understand than other language tutorials I’ve found. Maybe I’ll get some ideas looking at how they lay things out.

Artists/Modellers:
Well… I need some art/models in the area of elements (Earth, Fire, Air, Water). I have two designs for them, one for a card game (Yu-Gi-Oh, Pokemon style), and the other for an Rpg similar to Pokemon with a different battle style and educational. The art/models I need, well this is just a short few: Fireball, Tornado, Tidal Wave, Earthquake. The style I’m thinking is something cartoony (Mario style), and the element has an expressive face (smiley like, with eyes and mouth).

Everyone
If there is anything in particular that I missed (of what I’ve covered) or didn’t explain well enough let me know. Also if there is anything that really confuses you about programming, let me know too so I can make sure to cover it. And finally, if you get any error message that you don’t understand let me know as I may do a little section on error messages and how to figure out what it’s saying.

Types, Variables, and Scope added:
http://www.unifycommunity.com/wiki/index.php?title=Programming_Chapter_1

Wow, thanks. Keep up the good work.

d.

Thanks!

More updates to Chapter 1:

  • Fixed some definitions and content (scope, comment, statement, variable)
  • Added constant section
  • Added recap section

Began work on Chapter 2

Great work! If you finish it, this could be really be helpful ressource. I always said that a documentation on how to code in unity is completely missing. Not even links for references are given in the official documentation…

If I may make one criticism – the examples are all abstract.

I’d get the person into coding something they can see as quickly as possible. You can teach C to someone running UNIX from a command line as an abstract process, but Unity is completely visual.

I’d provide a simple example of a piece of code that does something (e.g. spins a cube) and then break it down and explain how each bit works.

The problem with teaching a language the way you’re doing is it’s not like BASIC on an Apple II – you can’t type:

X = 3
PRINT X

And see a result.

Also – show them what happens when they mess up so that when they mess up they won’t be completely flummoxed.

No-one learns Unity to do arithmetic. So tie the code to the environment as quickly as possible, then get into the fundamentals.

Sure! OK, point taken. I had thought about doing something a little more elaborate, but I didn’t have Unity around while making the pages.

However, I still don’t want to introduce too much all at once as it may present too many questions. And I may lose the readers attention as they now try to add keyboard movement to the cube and want to zoom in and out.

I’ll work on making it more visual and hands on…

But without doing any arithmetic games would be very boring… :stuck_out_tongue:

And you can do:

x = 3;
print (x);

And see a result. In fact I’d say it’s a good idea to be familiar with the console…as long as that’s not all you do (obviously). :slight_smile:

–Eric

So I’ve been out of commission, working with no time to update this… until yesterday. So the past two days I spent adding a little more to the Programming tutorials

Chapter 1 has been updated and now contains an example Hello World program at the end of the chapter.

Chapter 2 has been finished covering functions, arrays, operators, and objects… and for the example there is a full game! Rocks, Paper, Scissors! Which I must say was quite interesting to code as I was trying to stay away from conditional statements (that will be the next chapter).

Well most of you are probably experts by now and don’t need this, but if there are any beginners left out there… :smile:

Looks nice, except as I have commented on the discussion pages, you mention JScript a couple of places. The Unity implementation of JavaScript is not JScript, and linking to the JScript reference or calling it JScript is just going to confuse the reader. Especially if he’s a novice Unity user.

Another issue I have is that you try to introduce the syntax of JavaScript and C# at the same time. Even though it is very similiar in places, I think it would be better to put each into its own page.

:? … oh, I had always thought that Unity used the Mono implementation Redirecting…. So if Unity implements a custom JavaScript, is there any documentation for it? It implements more than ECMA-262 3rd Edition (JavaScript 1.5) since there is classes, static typing, etc. So is it some sort of implementation of ECMA-262 4th Edition (JavaScript 2.0)? Also the use of a semicolon to end statements is more JScript like… so I’m curious as to what the Unity implementation really is.

Hmm, I’ll have to think about that. I could see how it might be possible to get the syntax mixed up and might seem like too much at once. But the nice thing was to be able to show an example of things such as static and dynamic typing. An example seems much easier to follow. Also I didn’t want to duplicate the exact same tutorial…