Search Unity

AP Computer Science Principles taught with Unity?

Discussion in 'General Discussion' started by Autonomous_Zone, Jun 19, 2019.

  1. Autonomous_Zone

    Autonomous_Zone

    Joined:
    Jun 2, 2019
    Posts:
    4
    I'm looking at the AP Computer Science Principles course requirements and it's very open-ended. I think Unity is a great tool for teaching programing because it's engaging in a way that most introduction to programming classes can't be.

    I know Unity published a course curriculum to help educators bring unity into the classroom but doesn't quite fit the AP course. If Unity built a curriculum or set of lesson plans with the explicit goal of being an AP Computer Science Principles class it would lower the barriers to school putting Unity in the classroom and make it easier for teachers to teach without having to build a course from scratch.

    Getting the curriculum endorsed by Collage Board would be an express lane to implementing the course in thousands of schools. Right now, there is about 10 prebuilt curriculums for AP Computer Science Principles endorsed by Collage Board for it's not like there is a huge amount of competition.

    Any thoughts on this idea?
     
    danehartman likes this.
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    My wife did a module on teaching programming with Unity as part of her uni degree. It works.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I like the idea. Seeing that Unity offers classroom specific licensing already, making this something that could directly translate to increased revenue, I'm surprised Unity isn't already all over this.
     
    danehartman likes this.
  4. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,996
    "Principles" is the non-programming class -- talking about computing in general and the effects on society. The programming class is AP Computer Science "A" (which is officially in Java).
     
  5. danehartman

    danehartman

    Joined:
    May 11, 2019
    Posts:
    3
    I've been having the exact same thoughts lately. I've used the BJC Snap-based curriculum for the last few years, and I'm getting less and less thrilled with the poor performance and bugginess of SNAP. Unity is an excellent learning tool, a great marriage of code and graphics/3D environments. I'd consider building a curriculum myself but that's a huge time commitment... it would be amazing if Unity would spearhead this.
     
  6. danehartman

    danehartman

    Joined:
    May 11, 2019
    Posts:
    3
    That's not really accurate. The coding component of AP CSP is far less rigorous than AP CSA, and many curricula utilize block-based languages like SNAP or the code.org studio, but coding is nonetheless an integral part of the course. I think that Unity would be an awesome platform for AP CSP if someone were to put together a curriculum.
     
  7. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,996
    It seems to me that Unity is something one might consider for the 100% coding "A" course. Instead of Java, you're learning C#, which is pretty much the same. But Unity requires more set-up. VisualStudio/Forms with C# is easier to make games with -- it works fine for a 1st programming class (from personal experience). I have trouble justifying Unity for a regular programming class (and I have nothing against it -- my C# "book" uses Unity).

    Meanwhile "principles" is maybe 50% programming, using a drag-and-drop language. I don't call that a programming course, someone else might. But whatever it's called, they rejected Java. Too much to learn to get started, too techy-feeling. Seems like Unity is no different. How long will it take until they can start to reason about nested IF's?
     
  8. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584
    I've taught a Unity course like this in college, it focused on the engine though, and not basic programming.

    For future courses where we plan to teach the basics of code, we are going to be using p5 and Processing. The NYC schools are requiring a CS course (CS4All) and the one I am using focuses on p5 through the OpenProcessing.org site.

    The reason I would go with p5 is that it's open-source, and has curriculum already written for it. It also does not have so many bells and whistles to distract from learning code concepts. The examples and tutorials for the most part work.

    My experience teaching with Unity is that the engine is in a transition state right now, that really complicates teaching. With the multiple render pipelines and the legacy of older tutorials/assets on the web makes it quite difficult to explain how to do something, or even direct students where to go to find relevant (and working) examples or tutorials.

    With current Unity, you can sort of explain the concept of OOP. With DOTS coming down the road, I'd have to 'unexplain' OOP and teach a new data-oriented approach to programming. I'd actually like to teach that, as the performance is crazy good and teaches a bit about how the computer manages memory. Maybe a couple of years from now, things will settle down and it would be easy to teach again.
     
  9. faaizuddin

    faaizuddin

    Joined:
    Dec 6, 2019
    Posts:
    1
    If you use Unity and create a game, would it be original? Asking because doesn't Unity do some of the codings for you?
     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,130
    Some people view using a game engine as cheating, but if we're going to go with that line of reasoning why would we stop at just the game engine? If using a game engine is cheating, how about the language you use to compile your code, the text editor you use to write it, and the operating system that lets all of them run? How about the CPU, GPU, etc?

    While you consider all of that, ask yourself if you truly want to make games? Because in the span of time it would take you to learn how to make your own engine and then build it from scratch you could have already become a successful game developer with several games to your name.

    Yes, some people do make their own engine from scratch for their games, but the majority of people who make game engines are making them not because they love game development but because they love game engine development.
     
    Last edited: Dec 6, 2019
  11. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Unity doesn't make your game unoriginal, what it does is provide boundaries for self-punishment. Doesn't mean you can't turn up the dial pretty far though, if that's what you want to do :)
     
    ippdev likes this.
  12. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,996
    The high school AP Principles course (which is the topic of this thread) already uses systems that do a lot of stuff for you -- either a graphical drag and drop language, or javascript (which does a bunch for you with layouts and controls). Unity is not too dumbed-down compared to those.
     
  13. ohali

    ohali

    Joined:
    May 22, 2017
    Posts:
    3
    I think this idea need to be realized. I advise Unity to reach-out to some of us veteran teachers and prepare AP CS P curriculum using Unity. Or they could handle it from their own perspective to align it with the College Board standards.
     
  14. Sapidus3

    Sapidus3

    Joined:
    Aug 18, 2018
    Posts:
    6
    Last year I used Unity for a large part of my AP CSP course, and I thought it went fine. Unity has a lot of good learning material, but any teachers looking at it will need to be prepared to put some work into it. This year I am not running an AP CSP, but plan to use Unity again next year when we offer it.
     
  15. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    Interesting idea, but I think it would be more appropriate in the context of a course specialization (e.g. intro to game development). Unity's use of C# is of course for scripting and, as such, does not necessarily touch on all aspects of the language (nothing to stop you from using most of it but the focus is behavioral scripting). Unity also requires you to learn things that are specific to game programming (e.g. the concept of a game loop, 2 and 3D graphics, rendering, physics, etc.). I think CS students who have no interest in game development would not enjoy having to spend time to learn these things.
     
  16. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,856
    I want to present something like this to my county board of education for high schoolers. Any suggestion for an approach and a pitch for this?

    I had a hard time understanding trigonometry and why I should know it. Back in the late 60's when I took it in high school I was like.. WTH..all this for what? I am not a sailor! If I knew I could have made Spiderman and animate him using trig and vectors etc I would have held the teacher captive till midnight to learn it instead of filling my notebooks with Spiderman and SubMariner drawings during math class.. Now that i see visually the results I get it.
     
    Ryiah likes this.
  17. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,996
    Did the students know about Unity already? What was their attitude towards "now we'll use a game engine"? What parts did they push for: physics ("can we make Angry birds?"), 3D shapes and animation, 2D? Menus? Camera control? Were they disappointed they couldn't make a complete game? I'm assuming they had no real coding background?

    Any problems with UnityHub and all of the downloads, getting Visual Studio/Code to work?

    How did covering Unity basics go -- the Inspector, 3D rotations, navigating/using the scene window (transform tool, scale tool ... )? Using scenes. Importing jpegs, setting color through a material. Canvases, fonts?

    How much time with intro coding -- semicolons, identifiers, declaring, typing inside the {}'s, finding syntax errors in Unity's console, adding a script to a gameObject? Or was there some other coding in the course prior to Unity? How much trouble with x=7.3f

    How far did the coding get? If's, nested if's, abusing the Update loop, calling functions, arrays? In how much total time?

    What was the approach to "doing stuff"? for example, moving using pos+=V3, or transform.translate; or just gravity and shoving. Setting color? In general, how much "this command does X, but explaining how it works is complicated"? Did you premake scenes to get started? Use Unity-made projects and mod them?
     
  18. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,856
    Are you an MS developer?
     
  19. Sapidus3

    Sapidus3

    Joined:
    Aug 18, 2018
    Posts:
    6
    They had no coding background at the start of the year, but by the time we hit Unity they had done coding. Because AP CSP is language agnostic, I made it my goal to show them multiple languages and approaches, but also emphasize the same "Big ideas" in all of them.

    I started them off with using Khan academy (none of their lessons, but their live coding environment). The iterative loop there is very short and very visual. The end unit project really pushes them to/past their limits. At that point I wanted to pull back, but also stress the importance of variables and conditionals, so we do Twine for a while, also learning some HTML and I teach them pixel art at that point so they can incorporate it into their programs and some of the more artistic students get a chance to shine.

    Then I shift gears and we start learning to Processing. At the start, we just redo some of the class projects (pong for example), but they are greatly appreciative for the things Processing brings to the table to make their code easier to manage. Their final semester projects are more complex, and they start to feel the limitations of having to code everything from scratch (loading images into memory, coding their own collision system etc). I create a large number of optional readings and videos that basically serve as a mini-tutorial. I then fill the last week of the semester before the holidays with a bit of fun robotics where we learn about physical computing.

    We start the 2nd semester with Blender so they can get used to the idea of manipulating things in a 3D environment and they understand where the visuals come from, THEN we go into Unity. So by the point, we get there, they have already covered a lot.

    By the time we hit Unity, there is no resentment from them over the idea of using an engine, and they are excited about the concept of something abstracting some of their work. I show them examples of past student projects as well as professionally done Unity games. This year I'm not doing AP CSP, but I do have an explicit game design course, and they are all itching to get to Unity based on what the other kids said about it last year apparently.

    The biggest challenge with teaching it is that they all push for different things. I use some of the Unity Learn the material as resources and as starting points for some of their independent work (after we are done with the foundational "learning" they pitch me a project, and I find a tutorial for it that I know is at their level, OR tell them their scope is too large for the time period). But sometimes they want to spin off in interesting but unexpected directions, so it is hard for me to cover all the bases.

    Everyone ends up really proud of what they produce in their final project, I gave them significantly more time than required by College Board for their portfolio work (basically the final quarter of the year, with the odd days spent on test prep or other random topics), so their isn't a whole lot of disappointment over it not being a complete game. Most of them realize that with more time and polish they could have something that, while not being the next AAA hit, someone might be willing to pay money for.

    A million times yes. We are a 1-to-1 school, but all application installs happen through some framework our IT department uses. So the fact that Unity Hub does the installation is problematic, as does the way Unity ties in license keys for our IT department. The size of the installation also ends up crashing our application framework half the time and then most of them end up with issues with Visual Studio not being properly tied in. Eventually, we get it to work, but last year I just had to have my students book appointments with IT to have it manually installed with their administrator passwords.

    Pretty well for the most point. I focus on what they seem to want to use. For example, I'm not sure if I've ever covered fonts as a class. The scene manager I cover with students individually when they ask questions such as, "how to I create a separate starting menu," or "how do I go to a new level when they win."

    I think I covered this pretty well above, BUT... I do a lot of assignments about checking for errors and reading compiler lines to try and spot where the mistake can be. The biggest issue I have is some of them compulsively untab EVERYTHING, even if the editor is automatically indenting things. This makes visually identifying missing { } so much harder, I've considered using python or something similar to force them to develop good indentation habit.

    Most of the time when they have a problem and call me over, I ask them what is wrong, and before they are halfway done explaining, they trail off and say "never mind, I see what I did wrong now." Its the whole rubber duck thing.

    It varies a bit by the student. They all learn how to do ifs, loops, arrays, functions, nested ifs, etc. The more advanced students internalize some of the "data" and "refactoring" lessons better and actively use these elements in problem-solving. The weaker students can understand code using these factors (baring it's not too complicated), but struggle a bit when it comes to arrays, loops, and creating their own functions for things (instead doing a lot of copy-pasting).

    So using the example of moving, I try to show them as many different ways as doing it as possible.

    So initially (day 1 of Unity, I try not to spend a day explaining the editor as they get it pretty quickly from use) we do a pos+= and transform.translate example, shifting a box around. We play around by mapping the inputs to different axes, see what Time.deltaTime does, and try scaling the inputs by different amounts (which introduces them to modifying public variables in the inspector).

    Then I introduce the translate.Rotate command, after we have played around with manually rotating via the inspector so that they understand the basic idea of 3D rotation. We spend awhile mapping horizontal and vertical input to different combinations of rotating and translating along different axes, as well as using the mouse button inputs to trigger rotations or translations as well as having some rotations / translations happen every frame.

    The focus is on the idea of the input and position/rotation being different pieces of data, and having the one act on the other. I screen share some of what they do, so the others can see some of the massive variety of movement patterns you can get.

    Because Processing has its own version of Start and Update, they get that concept very easily.

    Day two I introduce them to the idea of using if's to do wrap-around, constrain speed and position, and some other minor things. Then we introduce rigid bodies (though I think last year we might have hit this on day 1 as well).

    As we go along, I demonstrate a character control player and a rigid body driven player, showing them the difference. In this initial unit for Unity I am using Unity Learn as homework assignments to reinforce the concepts (for example, the day one/two lesson's are nicely reinforced by the Learn through Code lesson with the truck and the boxes.

    If you are a teacher and are comfortable using Unity, I encourage you to consider using it. I will say I did consider using Game Maker Studio (I actually originally learned programing by messing around with an earlier version of it way back in the days), but it costs money. I could also see using Godot as well. The install would certainly be easier. For many students Game Dev is an engaging lense (though it is important to recognize that not all are interested in games, and have alternative slants in mind. Last year I had one student focus on making an infectious disease simulation when we first went distant learning, for example).

    You will need to put in a lot of work preparing material though. For example, the Unity Learn recommended hours are WAY blown out of proportion (though perhaps that is just from the 1st-semester work that I have my students do).

    Let me know if you have any more questions. I love talking shop.
     
  20. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,996
    I've been trying to pull out some threads from that:

    #1: It's a year long class?! The official list of topics seems very thin for a year. High school classes are supposed to be 1/2 the speed of college, but AP means Advanced Placement, right? And the list is thin for even a semester. I'm getting the impression that it's either taught very slowly (lots of free time to write papers, or free-coding?) or instructors always add things they find interesting to fill out the other 1/2 of the year.

    #2: blender before Unity is pretty much perfect. It's accessable -- you can relatively quickly make balls, cubes, and start extruding. And you learn transforms, xyz rotations, local vs. global, scaling on x/y/z, navigating in a 3D area, using the red/green/blue axises, getting lost in space, context-sensitive panels based on object selection.

    #3: item #2 almost proves what a commitment Unity is, time-wise. Blender then Unity, or else take a few weeks(?) to learn general Unity editor basics.

    #4 That class runs the same year-after-year and students hear about it. I totally forgot that! Of course a huge plus using Unity, or any game engine, is having nice-looking projects, and incoming students being aware of and excited about the class. A sort of inter-year momentum is a bonus when using any "fun" tech.