Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (800)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Teaching Java Game Programming to Children  (Read 8759 times)
0 Members and 1 Guest are viewing this topic.
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Posted 2014-06-15 18:33:49 »

I just got a job about a week ago that will involve me teaching children how to program games this summer.  The juniors are going to be learning MicroWorlds, which is a very basic game making software aimed at children about 7-9 years old.  The seniors I'll be teaching are about 11-12.  They will be learning Java.  I have a reasonable amount of game-making experience using Java, but I've never come across a library that allows making 2D games to be particularly easy for a newbie.  Slick2D is incredibly easy from the perspective of an adult programmer, and LibGDX is alright once you get the hang of it.  Still, I'd like these kids to be able to use something simpler.  Something that already has defined what a game object is, preferably.

I may be underestimating these kids, since I've heard that many of the seniors are quite bright.  I am planning on teaching them how to make basic 2D games using Java2D since I think it would be a hassle to install an external library on each of their machines.  Still, I WANT to define what a game object is for them, and WANT to have those game objects easily attachable to a world.  I also WANT to be able to have those game objects communicate with each other easily.  I might write something like this so that they can access all game objects of a certain type.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public <T> List<T> getAll(Class<T> c)
{
    List<T> list = new ArrayList<>();
    for(GameObject go : gameObjects)
    {
        if(c.isAssignableFrom(go.getClass()))
            list.add((T)c);
    }
    return list;
}


Using this method would be as simple as this...
1  
2  
3  
4  
5  
6  
7  
8  
9  
List<Wall> walls = world.getAll(Wall.class);
List<Collidable> collidables = world.getAll(Collidable.class);
for(Wall w : walls)
{
    for(Collidable c : collidables)
    {
        w.enforceCollision(c);
    }
}


This should make it much easier to get their ideas implemented as quickly as possible.  Since they're young, I'm not expecting them to create anything too cpu-intensive, so such an ugly design would be perfectly suitable and simple for these novices.  Nevertheless, I will expect them to write their own game object implementations.  They will have to write the code for their spaceship, or they will have to write the code for their jumping player.  The basic library I'm writing won't take long to make, and mostly just handles rendering for them as well as attaching game objects to a world.  It also simplifies game object communication.

If anyone has any experience in teaching game programming to children 11-12, or just programming in general, could you tell me if I am I overreacting in assuming that these children will have a hard time understanding Java2D?  Am I making it too easy for them by making this library?  I know another programming counselor is teaching Python to his students using PyGame, although I've never actually used it myself.  I'm assuming that it's much simpler to use for making basic games than making a game straight from Java2D.

Did you know that 90% of statistics are wrong?
Offline trollwarrior1
« Reply #1 - Posted 2014-06-15 19:22:33 »

Is this going to be a school for kids who already know java, and want to make games, or just a general school where kids will make games using java? If its the latter, you should drop the idea of using generics. Besides, there is a huge difference between roles in game development. One might be artist, musician, sound designer, level designer, story writer, lead designer, programmer and probably a lot more.

So what are they learning exactly? Programming? Or game making?
Offline GoToLoop

Junior Devvie


Medals: 2
Exp: 1 year



« Reply #2 - Posted 2014-06-15 19:37:41 »

http://www.GreenFoot.org
https://www.KhanAcademy.org/cs
http://Hello.Processing.org
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #3 - Posted 2014-06-15 19:39:12 »

Is this going to be a school for kids who already know java, and want to make games, or just a general school where kids will make games using java? If its the latter, you should drop the idea of using generics. Besides, there is a huge difference between roles in game development. One might be artist, musician, sound designer, level designer, story writer, lead designer, programmer and probably a lot more.

So what are they learning exactly? Programming? Or game making?

Most of these kids don't know Java yet, but many specifically asked to be taught Java.  This school is an athletics/tech summer camp, and my group is learning game programming.  Other groups are doing digital arts and music making.  We are not collaborating, necessarily.

I don't think utilizing generics should be too difficult.  I'm not teaching them to MAKE generic classes, after all.  Any beginning Java programmer should be able to understand how to use an ArrayList<SomeType> which I will teach them to do before I get to any actual game programming.  The first block of code I wrote will not be something I expect them to write.  I will be writing it.  They just use it, like in the second block.

I think they should be able to set up a JFrame, and create an instance of my GamePanel, which extends JPanel and provides basic management for game objects and rendering.

Did you know that 90% of statistics are wrong?
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #4 - Posted 2014-06-15 19:45:49 »

Dont underestimate these children, not "I may be, I may not", because children can be quite bright people. I am no puppy games or notch making $$$ off of indie games, but I sir, am I a child; and I have made a halfway decent, but still unfinished, prototype of a game called Project NAH. It may not be the coolest thing ever but it shows that kids can do a thing or two; [showoff] however- I scored 10% higher percentile on average than the average student that goes to one of the hardest prep schools in Illinois and my mommy was so proud Cheesy [/showoff]

As far as teaching them, I seriously think if its possible you should teach them more low level stuff, if they are really serious about it they will enjoy it, they will benefit more from it, and they will have a greater sense of "omg i made something" by the end of everything.


I'm guessing that you are a fan of Minecraft.  I have heard that the majority of the kids I will be teaching are also a fan of that game.  Well, I am as well, of course xD.  So addicting!  Anyway, your post interested me because I used to be a child programmer as well.  Started when I was 11.  I began my programming career making basic games in Flash using ActionScript 2.0.  I never had to deal with low level rendering because everything in flash was a scene graph.  I would always be confounded by advanced programmer's code, even though I considered myself to be a veteran coder.  I didn't know what I was talking about, of course.  These kids likely have no experience at programming in Java, and cramming low level Java2D over the course of one summer might be a little daunting.

Did you know that 90% of statistics are wrong?
Offline trollwarrior1
« Reply #5 - Posted 2014-06-15 19:56:25 »

You won't be able to teach them a whole lot.

If these kids have literally NO programming experience, there is no way they can make a game. You would need to start with complete basics such as variables, methods, classes, variable types and all the other basic things.

Once they have some knowledge of how programming works, you should probably teach them how to draw graphics onto the screen. Then, some inputs, and make a very very basic pong game or something.
Offline JVallius
« Reply #6 - Posted 2014-06-15 20:16:46 »

Depends on how much you have time and how experienced your audience is. For beginners, forget too complicated systems and games. Teach them variables, if-else, loops and how to grab input and how to display outcome. Then show how to make a simple text based game. Like questions and player must answer A, B or C.

That's for programming, for teaching how to make games I guess it could be better to use programs like Game Maker. Or Flash like I did.

Offline The Lion King
« Reply #7 - Posted 2014-06-15 20:24:41 »

You could also make a very simple framework for them to play with. Kinda applet like, sort of like processing. They could do a lot with this and its Java. Make it very simple, readable, and to the point.

Ex:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
public class Game
{

   public void init()
   {
       createWindow(320,424,242,13, "title");
       Circle circ = new Circle(40, 40, 40);
    }
    public void draw()
   {
      draw(circ);
     
   }

   public void logic()
   {
      circ.move(4, 3);
      checkCollisions(circ);
   }
}

"You have to want it more than you want to breath, then you will be successful"
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #8 - Posted 2014-06-15 22:42:15 »

Depends on how much you have time and how experienced your audience is. For beginners, forget too complicated systems and games. Teach them variables, if-else, loops and how to grab input and how to display outcome. Then show how to make a simple text based game. Like questions and player must answer A, B or C.

That's for programming, for teaching how to make games I guess it could be better to use programs like Game Maker. Or Flash like I did.


Teach them how to write their own programs for their multiple choice quizes as part of the course. Then challenge them to make a fair quiz to give to their other students, let them use any programming related questions they want and low-ball the total value of their quiz as part of their final assignment grade.

That way they can "give" their classmates extra credit by giving them easy questions, but forces them to think outside the box and write a very simple actually-useful application. Make the majority of the total grade (100%) for the project the actual program they wrote and +10% extra credit the quiz points they get from taking *other* people's quizes with *their* programs.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 288
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #9 - Posted 2014-06-16 18:18:35 »

I highly recommend checking out Processing: http://processing.org/

Processing is written on top of Java, but makes it extremely easy to get something visual up and running, without worrying about Swing or Java2D or classpath or libraries or deployment. How much time do you have with them?

(Shameless self-promotion: I also have Processing tutorials for novices at the link in my signature to Static Void Games)

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #10 - Posted 2014-06-16 22:53:14 »

Depends on how much you have time and how experienced your audience is. For beginners, forget too complicated systems and games. Teach them variables, if-else, loops and how to grab input and how to display outcome. Then show how to make a simple text based game. Like questions and player must answer A, B or C.

That's for programming, for teaching how to make games I guess it could be better to use programs like Game Maker. Or Flash like I did.


I just got back from my first day.  It's funny.  I came to the same conclusion today.  I had enough trouble explaining what if-else statements did.  Most of them are not ready to be learning loops and lists.  Still, I feel that know-it-all of my group is.  He already has some experience in programming in other languages, so he's not to hard to work with.  It's the ones that have little experience and motivation to learn Java that make this job tricky.  One of the less experienced ones felt the need to write down every little thing.  That shows that he has a great work ethic, but it takes a while for him to write it down.  I'm glad that he's willing to learn and is patient, though.  I think that I will write a lesson plan that explains all of the basics before I get to any of the harder stuff.  There is another Java counselor that is new like me, so this could benefit both of us.  My goal now is to create as many examples demonstrating the basics of Java as possible all while heavily documenting every line to explain what is happening.  I believe that I can at least create a basic text-based game by the end of next week.

Did you know that 90% of statistics are wrong?
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #11 - Posted 2014-06-16 23:00:05 »

Depends on how much you have time and how experienced your audience is. For beginners, forget too complicated systems and games. Teach them variables, if-else, loops and how to grab input and how to display outcome. Then show how to make a simple text based game. Like questions and player must answer A, B or C.

That's for programming, for teaching how to make games I guess it could be better to use programs like Game Maker. Or Flash like I did.


Teach them how to write their own programs for their multiple choice quizes as part of the course. Then challenge them to make a fair quiz to give to their other students, let them use any programming related questions they want and low-ball the total value of their quiz as part of their final assignment grade.

That way they can "give" their classmates extra credit by giving them easy questions, but forces them to think outside the box and write a very simple actually-useful application. Make the majority of the total grade (100%) for the project the actual program they wrote and +10% extra credit the quiz points they get from taking *other* people's quizes with *their* programs.

Ah, sneaky sneaky!  Make them write a quiz for me, and call it a "text based game"!  Hah, well, these kids aren't really graded on their performance.  It's just a summer camp that both advocates physical activity, and tech literacy.  There is no REAL pressure on the students or counselors.  I'm still considering making a basic API that allows game creation to be that much less painful.  I think I can do this.  I just have to figure out what to do with the less-willing students.  I've know that after a few years of programming that you don't have to be a super genius to become a programmer.  A moron can become an elegant coder if he/she is motivated.  Which I am xD  It's all about dedication, and I have to figure out how to get the less motivated students to get into programming.

Did you know that 90% of statistics are wrong?
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 288
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #12 - Posted 2014-06-17 13:29:30 »

I had enough trouble explaining what if-else statements did.  Most of them are not ready to be learning loops and lists.

You should not be talking about if statements, loops, or lists on your first day.

First day: explain what programming is, how the basics work, how the computer follows commands. Get them up and running in a basic IDE (which is included in Processing). Show them a very basic hello world. Get them to make a change to it.

Second day: Talk about functions. Processing has built in functions like ellipse() or rect() that they can experiment with. Have them pass in hard-coded values to show different things on screen.

Third day: Talk about variables. Start them off with the pre-existing variables that Processing includes, like mouseX and mouseY. Show them how to pass in variables like they passed in hard-coded numbers. Show them how to create their own variables. Show them how to create a moving ball using variables like x, y, speedX, and speedY.

Fourth day: Talk about if statements. Show them how you can use variables and inequalities to do something like create a bouncing ball using the ball variables from the third day.

Fifth day: By now they know enough to create pong. If you have longer you can get into data structures, loops, objects, etc.

All of this relies on Processing, which IMHO is exactly what you should be using.

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Offline Endos
« Reply #13 - Posted 2014-06-17 20:53:42 »

You can go to Amazon and look at the table of contents of any of the Java for beginners books, for example this. They need to know at least the basics before trying to make any game.

SUPERBLAM! - Super Mario type game for Android [iOS coming]
MINDTRIS - Most addictive puzzle ever for Android/iOS
Retroships - Space Shooter for Android
Offline SimonH
« Reply #14 - Posted 2014-06-17 23:58:14 »

I have to figure out how to get the less motivated students to get into programming.
How about Logo? Online here.
It was specifically designed to get less involved students doing some programming without realising it.
They immediately get something to show for their work. Even if it is just a square, they did it!

People make games and games make people
Offline KevinWorkman

« JGO Plugged Duke »


Medals: 288
Projects: 12
Exp: 12 years


HappyCoding.io - Coding Tutorials!


« Reply #15 - Posted 2014-06-18 00:13:46 »

Similarly, you might also check out Light Bot: http://light-bot.com/hocflash.html

More generally, you can check out the Hour of Code tutorials that are designed to be a little more fun than old-school teaching: http://csedweek.org/learn

It seems to me that the OP simply was not prepared to teach this class. It's not too late to turn it around, OP!

I'd also be curious to hear how you got this gig. Where are you located? I'd love to do something similar, so I'd love any detail you can give us.

HappyCoding.io - Coding Tutorials!
Happy Coding forum - Come say hello!
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #16 - Posted 2014-07-04 20:53:59 »

I have to figure out how to get the less motivated students to get into programming.
How about Logo? Online here.
It was specifically designed to get less involved students doing some programming without realising it.
They immediately get something to show for their work. Even if it is just a square, they did it!


We actually use Microworlds EX which uses Logo.  It's SUPPOSED to be for the juniors who are 7 - 9.  Our seniors are 11 and up, and the ones I had last session would have probably benefited from learning Microworlds instead of Java.  They were not really that interested in it.  This session is better.  They would rather learn about file processing and console-based programming than making visual games.  They want to know how programming works.  By the way, a session is two weeks for our camp.  One more week with these seniors.

Did you know that 90% of statistics are wrong?
Offline DrewLols

Senior Devvie


Medals: 4
Projects: 1


Noob going through metamorphosis...


« Reply #17 - Posted 2014-07-04 21:11:14 »

Similarly, you might also check out Light Bot: http://light-bot.com/hocflash.html

More generally, you can check out the Hour of Code tutorials that are designed to be a little more fun than old-school teaching: http://csedweek.org/learn

It seems to me that the OP simply was not prepared to teach this class. It's not too late to turn it around, OP!

I'd also be curious to hear how you got this gig. Where are you located? I'd love to do something similar, so I'd love any detail you can give us.

To answer your question, I got this job because my roommate worked there last summer, and his employer asked him if he could find other programmers willing to teach.  He was on the athletics side of teaching, but he knew that I was an avid-ish programmer.  Getting the job was pretty easy after that because of the demand for them.

I currently work at ONE of the three TIC sites.  I've learned that I need to remember what it was like picking up programming for the first time, because I keep forgetting to explain what every little piece of syntax means.  Also, when I write example code on the board, even my smarter seniors have trouble realizing that the code I gave them was just an EXAMPLE!  Far too often, they'll complain that they copied everything I wrote, and it still wouldn't run!  Uuuuuggggghhh......  I'm not trying to raise a bunch of code monkeys here!

If you find kids that are just not interested in programming, I recommend that you don't try to teach them Java.  We have a choice in deciding what language we teach, and I recommend that the less motivated students learn Microworlds.  It still warms my heart when I hear the kids say that they WANT to learn Java.

Another thing I've learned is that you don't have your student's attention unless they're looking at you or the board.  Even today, one of my campers kept telling me that he was paying attention, but the exact instant that I continued writing on the board was the instant that he looked at the floor again.  I asked him if he could explain what I just said.  Of course, he couldn't xD.  I'm still talking about my smarties, by the way.  They're geniuses, for sure, but still have their bad days.  I've learned to stay away from visual programming with swing components, because I am just not capable of teaching them something like that within the span of two weeks.

So, yeah.  Creating a main method, basic data types, object types, loops, recursion, and classes are what I am trying to restrict myself too.  This first week, they've almost completed the framework for their grid-based console adventure in which the grid is made out of ascii characters.  I just hope we have enough time next week to finish something up.  It's taking a while to teach abstraction, which is going to be necessary for their game, but they're getting it.

Did you know that 90% of statistics are wrong?
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (346 views)
2019-09-04 15:33:17

hadezbladez (5128 views)
2018-11-16 13:46:03

hadezbladez (2011 views)
2018-11-16 13:41:33

hadezbladez (5397 views)
2018-11-16 13:35:35

hadezbladez (1119 views)
2018-11-16 13:32:03

EgonOlsen (4537 views)
2018-06-10 19:43:48

EgonOlsen (5394 views)
2018-06-10 19:43:44

EgonOlsen (3082 views)
2018-06-10 19:43:20

DesertCoockie (3976 views)
2018-05-13 18:23:11

nelsongames (4526 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!