Search Unity

Teaching kids programming and Unity

Discussion in 'General Discussion' started by Vanz, Feb 4, 2016.

  1. Mwsc

    Mwsc

    Joined:
    Aug 26, 2012
    Posts:
    189
    When I first started programming, the first task towards making any graphical application was to write some inline assembly code to enable graphics 320x240x8bit color mode. The second step is to initialize the palette, and the third step is to learn how to write pixel values to the framebuffer. From there you learn to draw lines, sprites, triangles, etc. This was natural because the VGA hardware supported pixels, and not much else.

    Nowadays things are different. Others have mentioned that Unity makes setting pixels difficult, as you have to go through textures and so forth. What nobody has mentioned yet is that it isn't just Unity, it is the hardware itself that has changed. We aren't on VGA cards anymore. We are using GPUs with windowing systems that always run in 3d-accelerated mode. Every window is drawn into a texture and composited with alpha blending.

    My point is that the most fundamental thing that the hardware can render is the triangle. Setting pixels is roundabout and confusing because it is a bizarre thing to do. You could render OpenGL point primitives, each set to be 1 pixel in size. Sometimes this gets implemented as two triangles with a texture of a point, but you don't have to tell the kids that at first :)
     
    GarBenjamin likes this.
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Any language may become obsolete which is why you focus on teaching the concepts of programming rather than focusing on the language itself. I don't know how many people are aware of it now but BASIC was actually designed specifically for the purpose of teaching programming concepts. It's popularity outside of teaching wasn't intended.

    By the way BASIC and Pascal are both present in the real world. They just aren't always called by those names.

    Yet as a programmer you will often find yourself working with hardware and software black boxes. You'll be forced to create solutions without necessarily understanding what is happening under the hood.
     
    Last edited: Feb 5, 2016
  3. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    obviously, but that is a horrible way to teach...
     
  4. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    And yet you want to use Unity?
     
  5. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    For 3d applications I would agree but for every game I have programmed in 2d I am very away of what some pixels are doing. When I create objects I zoom way in to manipulate pixels to create crisp images and when doing collision detection I try to make boundaries close to the outer pixel shape (i.e. asteroid collisions), so the screen resolution, the pixel shape and sizes of my sprites and the pixel boundaries of my sprites come up all the time... I won't be going into the details about "how" to set the pixels more about, see what happens if you execute SetPixel (100,100,(255,0,0)); ... then as I said before we'll move into actual sprites and away from dots...

    I think most people have made some valid points that I am thinking more about and that is if I start getting to technical or detailed and the kids start getting bored I'll have a backup plan in place to show more interesting stuff... :)
     
  6. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    Just as an interface, will not be teaching them how to use the actual Unity program...
     
  7. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Try SCRATCH. Or Alice. Or Kodu by Microsoft. Those were all designed to teach programming to youth.
    Gigi
     
    Ryiah likes this.
  8. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Indeed. I get paid to use VBA in my day job. Which is for all intents and purposes a BASIC language.
     
  9. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    This explains your obsession with drawing pixels...
    And I'm pretty sure your efforts were in vain since as soon as you change the resolution the boundaries of all your elements would no longer be aligned with pixel edges.

    I'd encourage you to fight back your urge to teach your kids how to draw pixels and such technical stuff, since this knowledge would be for them sa was for you when:

    And I believe you're probably the only one who though Ryiah made a bad anology (with the car and driving being like game engine and game dev).
     
    Eric-Darkomen likes this.
  10. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    Worked fine at multiple resolutions...

    Lol, okay then... so sensitive, it's just an opinion...

    Also, I apologize to anyone if I offended them by calling a language they use or like useless...
     
  11. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    @Vanz Sorry about my reaction, I get grumpy when I don't get my morning coffee...
     
  12. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    GLUT combined with old style Immediate mode OpenGL (glBegin/glEnd/glVertex2f, etc) would be awesome for learning and drawing stuff with wireframe graphics.

    Then again, I'm not sure if that would be fun for kids.

    In that case unity would be a bad choice.

    Speaking of pixels - you DON'T work with individual pixels on modern hardware, because it is horribly slow. You create sprite, upload it to GPU memory, and then let hardware draw the sprite where you need it. The only exception is when you want to write software rasterizer for some reason.
     
  13. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Bad idea, scratch or python.
     
  14. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    That's why I support images instead of pixels. It'll be easier to implement and probably hold their interest more.
     
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Or basically a more complex LOGO? :p

    Unnecessary complexity, especially for pre-teens, brings a risk they will lose interest. If presented well it may have some interest for those of us who have similar likes to the OP (future computer geeks of our generation) but most kids are likely to find it boring.
     
    Last edited: Feb 6, 2016
    Nateply likes this.
  16. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Ugh! No. Teach them set theory and discreet mathematics. If they are any good then teach them programming if they are interested.
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Except there are those of us who are terrible at mathematics but still largely capable of game development.
     
  18. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I game-dev better than I test. Math classes are never enjoyable.
     
  19. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    My six year old has just gotten started in Unity. She is getting a kick out of using the terrain tools. So far she has a beach with a bunch of palm trees.

    We will probably hold off on programming until she has a more solid handle on reading and writing. But for the moment she is enjoying herself.
     
    Tomnnn likes this.
  20. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    Presenting the engine as a game is probably the best way to get kids interested in it.
     
    Kiwasi likes this.
  21. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    That's pretty much how she treats it. At the moment she knows Daddy spends time making games, so she wants in.

    As a side note I would love if the selection of princess models on the asset store was expanded. :)
     
    Trexug likes this.
  22. Mich_9

    Mich_9

    Joined:
    Oct 22, 2014
    Posts:
    119
    Just like my 6 years old nephew, I tried to teaching code first but that was too much for him to handle. So he prefers to design instead to write code, in fact he models his own characters in blender, just put a bunch of shapes together and his mobs are ready to be imported in unity.
     
  23. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    You should totally sneak some code into the project, so one day she opens it and notices that one of the trees is spinning! Or it wiggles randomly. Something that would fill a child with fear and wonder.
     
    Kiwasi likes this.
  24. Yash987654321

    Yash987654321

    Joined:
    Oct 22, 2014
    Posts:
    729
    How can everyone say unity is a bad choice :mad::mad:. I didn't knew anything more than declaring a variable when I started using unity. I hardly knew anything. But the first time I opened unity I played with the particle system and from there to terrains to animations to programming. I didn't knew anything about C# but knew the 'var' keyword of action script so I chooses JS after using it for 3 months I switched to C# and it was the best choice ever (and easy too). Though it may be because of boredom and tons of time (I didn't studied and because of having an awful computer I hardly had anything to play and no social life :p) but I found it soon fun to move cubes here and there. I never lost interest.
    But if your child has no interest in computers, there is hardly anything that can make him interested in it.
     
    Tomnnn likes this.
  25. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    You get that New Vegas head spin in there, or put a legit herobrine in... This could be awesome.
     
    Tomnnn likes this.
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Vanz, as a mother of four who homeschooled all of them, whatever that is worth, I can tell you that starting with something visual like Scratch is a great idea.

    Kids develop at different rates and sometimes their brains are just not ready for what we want to teach them. This is why some kids fail at math early and then are convince they are not good at it. We tend to push them, especially in things we like and not intentionally.

    My daughter started learning Java by modding Minecraft at about age 12. We tried to get her to learn to program in Unity, but she had no interest. She is, however teaching herself XML at 15. She is extremely artistic so my guess is she is going to go in that direction although I do suggest 3d modeling for her and that falls on deaf ears. lol

    I get why you think it is important to start with Unity but Unity is rather complex, a lot of different parts and things to think about. Using a visual representation of programming helps to organize one's thoughts, see the logic behind it. It is the best way to start kids to understand the structure and why it works.

    Jumping to the middle of the pyramid is confusing and if they can't get it, it will be frustrating for all of you.

    I am a prime example. I took a computer class way back as an undergrad in college, but I didn't get any of it. I found it dry and boring. To this day, I think that way about code, even as I am gradually learning to understand what it does. My son makes flow charts to help understand what he is doing for our game. I have begun to make my own. I doubt I will ever code...mostly because I have enough to do learning everything else.

    But..had that computer class many years ago started with flow charts rather than reams of computer paper with lots of stuff on it that I didn't get, maybe I would have continued..maybe not. Who knows. I might have stayed with geology, but at least I would have been able to use the programming with my field. Many years later, I worked with engineers to clean up contaminated sites and we did a lot of computer simulation. I helped but couldn't really do anything with the code.
     
    Ryiah likes this.
  27. Bhanshee00

    Bhanshee00

    Joined:
    Jan 2, 2014
    Posts:
    35
    One thing many of you might be forgetting; almost all 12 year old children have already experienced playing a computer game, be it on their parent's PC, on a console (PS3/4 XBOX), or even their phones. Most 12 year olds are not going to be particularly excited by learning the theory of how computer screens work and then making a pixel on a screen appear.

    Tell the kids they're going to start learning how to make a video GAME and watch many of the kids' eyes light up (probably the boys in particular). Sure start with something simple like a 3D pacman clone or something (hell even a modern pong).

    I say start them using Unity. You might be surprised and find one or more of them already know and have used Unity or even another game engine. Ignite their imaginations first before teaching them all the boring theory. At their age their brains are like sponges; if you get them excited and enthusiastic about the possibilities of what they can make they'll take to learning Unity faster than we ever could as adults. They don't need to understand how a screen works in order to feel that rush of excitement when they have learned how to move that rolling ball over a coin and collected it and increased the score by one.

    That's my 2 cents anyway. :)
     
    Kiwasi and Ryiah like this.
  28. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Lots of girls out there whose eyes would light up! As the parent of daughters, I can tell you they play as much or more games than my son. ;) Be careful of stereotypes!
     
    Bhanshee00, Ryiah and TonyLi like this.
  29. Eric-Darkomen

    Eric-Darkomen

    Joined:
    Jul 18, 2015
    Posts:
    99
    OMG loved Logo!

    My recommendation is to find something simple - a complete project that they are attracted to and start changing it. You get to illustrate the concept and they get immediate gratification. They are also likely to rationalise what has happened and try to apply the same approach in a similar scenario. Hey presto, learning and potentially, engagement.

    Template projects will get you there faster than extensive lessons on binary, exponentiation, algebra, trigonometry and pixels (which are usually triads of light filters rather than 'single points of colour'. i.e. why do we have to input an RGB value to get blue.) to name a few and are less likely to send their math teacher postal.

    Also, nothing as soul destroying as having to read a big book of math and understand it in order to change a pixel while your mates are building cities in minecraft. If you just have to change a variable to walk through walls on the other hand, I wonder what else we can change...
     
    Ryiah and Teila like this.
  30. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Are stereotypes the reason that my highschool computer classes and college computer classes maxed out at 1-2 females ever? That's 3 high school courses and more than 20 college courses worth of stats. I think there was 1 class that had 3 girls in it, actually. But when I think about it... that was actually just a SIG for game design.
     
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Don't know. I do know that when I was in school, girls couldn't do math. So most girls didn't like math and very few went into science or tech fields. Today, most educators are sensitive to this so more girls like math and more girls are going into science and tech.

    Makes sense to me that if we tell girls that they are less likely to get excited about programming because they are girls, that less will go into programming.

    In my geology classes, I actually had professors say out loud that girls should not go into geology.It was not even hidden. Out of 65 of us who went to undergraduate field studies, 11 were girls. Today, more women are entering geology and environmental science programs. In my husband's engineering classes, there might have been 1 girl or none at all.

    On the other hand, very few nurses are men, although it is getting better. Stereotypes do hurt.
     
    Ryiah likes this.
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I bit my tongue on @Bhanshee00's offhand comment, although I otherwise completely agree with the main point about cultivating enthusiasm. I'm glad @Teila spoke up.

    I completed math- and theory-heavy programs. Women comprised about 25% of the class, and this was way back in the 1990s. Interestingly, women make up about 25% of the game development workforce (see here for slightly outdated numbers). And it's about time. Not only does it better serve the demographics of the gaming population -- which is split about 50/50 among men and women (see here) -- but it also lends more perspectives to make a greater variety of games. The youngest successful indie game developer might even be a girl. (I link that because I think the dad took a neat approach to getting her into making games, so it's relevant to the OP.)
     
    Bhanshee00, Ryiah and Teila like this.
  33. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    I would try it wirh plygame from the assetstore. The visual scripting part blox1 is quiete easy to understand and also nice colorfull for children
     
  34. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    @Teila it really is strange. The few girls that attended did seem to enjoy it.
     
  35. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    If it makes you feel any better, there were quite a few women/girls at the Unity Roadshow I attended last year. :) A lot of those were minorities, too!

    Although, my friend up north says there was only 2 women. lol
     
  36. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I don't really care about male or female when it comes to this field, because the future is being neither. The future is being machine people!

    Did they have a good time?
     
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I have no idea, but since they voluntarily went to the Roadshow, I suspect so, and probably not because they were in a roomful of guys. :rolleyes:
     
    Tomnnn likes this.
  38. SamSpain

    SamSpain

    Joined:
    Oct 31, 2014
    Posts:
    13
    It's fantastic to hear that someone wants to teach their kids important skills like computer programming and I think learning through making games is one of the most fun ways to do so. There's not much hope for them learning anything if they don't have fun.

    My personal experience of teaching programming depends on age groups:

    • <13: Scratch
    • 13-16: Python
    • >16: Unity

    But this is in school with much less time to work with and that's way more of a limiting factor than ability. If I had 30 minutes to a whole hour each day to dedicate towards dedicated teaching material and 1-1 sessions then I think anything is possible if approached in the right way.

    If you feel like you are capable of teaching C# and Unity and are willing to put the effort into preparation then I think it's absolutely possible. Whether it's necessary to use Unity is up for debate and I think including Unity creates a lot of problems. A more likely appropriate choice is Python and PyGame.

    Personally I would start with Scratch and see how quickly they pick it up. If they're limited by Scratch I'd quickly ditch it and assess if they are capable of Python/PyGame or C#/Unity and go from there. The worst thing I think that can happen is them being turned off to programming because they see no way to get a grasp of it, like I did trying to self-teach until I got it with first year of university.