Greenfoot Beginner Game Programming - Full Course - Java Tutorial (Maze, Flappy Bird, Snake, Piano);
Автор: AP CS Exam Prep
Загружено: 2019-06-02
Просмотров: 29403
Описание:
https://www.APCSExamPrep.com - Book a tutoring session here!
Greenfoot Game Development Tutorial - This is a Java game development course for absolute beginners. We will not only create games but discuss vocabulary, notes, and have full explanations throughout. This is a fun way to cover beginner Java programming concepts. We will create a Maze, FlappyBird, Snake, Piano, and Frogger game. The feedback my students have given me about this programming tutorial series has been about the how fun and engaging it is for "newbie" programmers learning Java. Please feel free to leave any feedback in the comments below!
Common MISTAKES and FIXES at bottom of page!
We will cover these Java Programming concepts...
Classes and Objects
Methods
If-Statements
Variables and Data Types
Java Operators (Assignment, Relational, Arithmetic, Logical)
Void and non-Void Return Types
Constructor Method and Fields
Passing Parameters
Greenfoot and Java API Libraries
Inheritance
Loops
Arrays
IMAGES, PIANO, and POWERPOINT!
Here are the images for the FlappyBird and Piano, a zipped Starting Piano file (Download unzip and start from this spot on Piano), and PowerPoint Slides.
https://drive.google.com/drive/folder...
6 Common MISTAKES and FIXES for the Maze Game video!!!
1. The MyWorld and ShipPlayer classes are not needed if you are just doing the Maze Game!!! I skipped "how to install Greenfoot" and "basic intro" that I did for the 6 hour FULL COURSE on YouTube. • Greenfoot Beginner Game Programming - Full...
2. If your MazeBlocks are lining up vertically on the left side after you multiply by 50, you need to go back and multiply the x - value by 50 as well.
3. If your MazeBlocks are lining up at the bottom left and bottom right, you need to go back and make
super(12, 12, 50); and change it to super(600, 600, 1);
4. If it bothers you that everything gets shifted up and to the left 25 pixels after you design it.
You can +25 to the x and y (unlikely you will want to do that), shrink the map 25 pixes to 575 x 575 connecting the bottom and right side, or just add a couple blocks in to fill in the spaces and save the world.
5. Moving issues - Simply double check the Movers class has all the different move methods. Make sure MazeRunner extends Movers (is it's subclass). Make sure the move method you are chosing is in the act method. Otherwise it is probably something simple in your if-statement. Other problems feel free to leave a detailed comment below (preferably with your code).
6. Walks through walls problems. Double check your move method. The only move method I had that interacted with the wall was the slideAround(). Make sure your code only has the method that you want and that method has interaction with walls. Here is an EDITED moveAndTurn method should look something like this.
public void moveAndTurn()
{
if (Greenfoot.isKeyDown("d"))
{
setRotation(0);
setLocation(getX() + 4, getY());
if( hitWall() )
{
setLocation(getX() - 4, getY())
}
}
}
// And keep doing that for each direction. The move(int) method doesn't work well with wall interaction.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: