This document provides details about the BUCC Toy Project called "Angry Jolly Birds in 3D". It is a 3D version of the Angry Birds game being developed by students at BRAC University under the guidance of a mentor. The project aims to create boxes and spheres to represent the game elements initially while developing the ability to create the actual game characters later. It discusses setting goals for the project, adding textures and modifying properties like the size and location of boxes to represent different game elements. Spheres are also introduced to fill the game space until actual 3D game characters can be created. The document emphasizes setting clear goals and regularly comparing the current progress to the goals.
This book is intended for education and fun. Python is an amazing, text-based coding language, perfectly suited for children older than the age of 10. The Standard Python library has a module called Turtle which is a popular way to introduce programming to kids. This library enables children to create pictures and shapes by providing them with a virtual canvas. With the Python Turtle library, you can create nice animation projects using images that are taken from the internet, scaled-down stored as a gif-files download to the projects. The book includes 19 basic lessons with examples that introduce to the Python codes through Turtle library which is convenient to the school students of 10+years old. The book has also a lot of projects that show how to make different animations with Turtle graphics: games, applications to math, physics, and science.
This book is intended for education and fun. Python is an amazing, text-based coding language, perfectly suited for children older than the age of 10. The Standard Python library has a module called Turtle which is a popular way to introduce programming to kids. This library enables children to create pictures and shapes by providing them with a virtual canvas. With the Python Turtle library, you can create nice animation projects using images that are taken from the internet, scaled-down stored as a gif-files download to the projects. The book includes 19 basic lessons with examples that introduce to the Python codes through Turtle library which is convenient to the school students of 10+years old. The book has also a lot of projects that show how to make different animations with Turtle graphics: games, applications to math, physics, and science.
Through the design process, TK innovators worked for three weeks to research, empathize, define, prototype, receive feedback, revise and build a final TOY for their parents. They all really did an amazing job!
asmt7/~$sc_210_-_assignment_7_fall_15.doc
asmt7/cosc_210_-_assignment_7_fall_15.doc
COSC 210 - Object Oriented Programming
Assignment 7
The objectives of this assignment are to:
1) Gain further understanding and experience with inheritance.
2) Gain understanding and experience with polymorphism.
3) Gain further understanding and experience with interfaces.
4) Gain understanding and experience with low level graphics.
5) Modify an existing program to meet new requirements applying concepts of objectives 1 through 4.
6) Gain experience with medium-size Java program.
7) Continue to practice good programming techniques.
AFTER YOU HAVE COMPLETED, create a zip file named [your name]Assignment7.zip containing your entire project. Upload the .zip file to Moodle. Printout all source files you created or modified. Include a screen shot of the editor with boxes, ellipses, lines and images shown in the editor. Turn-in all printouts.
COSC 210 – Fundamentals of Computer Science
Assignment 7 Problem Statement
Updated
On the tomcat drive in folder cosc210 you will find file named PainterStartup.zip. This file contains the source code for the start of a Painter program. In its current state, Painter can create boxes and text objects at given locations. Both boxes and text objects can be repositioned and resized using a mouse. The task is to add to the program the implementation for an ellipse, line, image, and group objects.
Instructions:
1) Add an ellipse object. An ellipse is very similar in implementation as the box, except it renders an oval instead of a rectangle. The ellipse can be repositioned by dragging the object to a new location. The ellipse can be resized by first clicking over the ellipse to display grab handles and then dragging a grab handle to a new position. The grab handles are to be rendered at the same positions as the box. Likewise, clicking anywhere in the smallest rectangle that encloses the ellipse performs selection.
2) Add a Line object. A Line is to be created by selecting a Line tool and then click and drag over the canvas. The line is rendered from the point of the initial click to the mouse pointer. On releasing the mouse the construction of the line object is completed. Have the Line object inherit from PtrDrawAbstractAreaObject. Thus it will have only two grab handles.
A Line is selected by clicking anywhere over the line. Right now if you click anywhere in the rectangular region hold the line, then the line is selected. To accomplish this task, override the isOver method in PtrDrawAbstractAreaObject.
Given below is a partial solution to determine if a mouse click position (the x and y parameters to the isOver method) is over a line:
double ratio = (double) getWidth() / (double) getHeight();
if (Math.abs((x - getX()) * ratio) - (y - getY()) <= 1) {
return true;
}
You need to modify this code when the y to x ratio is less than -1 or greater than 1. (Hint: Inverse the r ...
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
This tutor shows the train and test set split with binary classifying, clustering and 3D plots and discuss a probability density function in scikit-learn on synthetic datasets. The dataset is very simple as a reference of understanding.
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : NotesSubhajit Sahu
Highlighted notes of:
CUDA First Programs
Course: Computer Architecture CSE448 (2010)
Instructor: Dr. Kenrick Mock
University of Alaska Anchorage
Kenrick Mock is a Professor of Computer Science and chair of the Department of Computer Science and Engineering. Kenrick has taught over 20 courses and conducts research in artificial intelligence, complex systems, computer security, eye tracking, systems modeling, and computer science education. He has over 20 years of programming experience and has co-authored several books on computer programming. He is the past chair of the Task Force for Undergraduate Research, a committee that seeks to promote research experiences for undergraduates through grants, student activities, curriculum, and faculty development.
Very quick introduction to the language R. It talks about basic data structures, data manipulation steps, plots, control structures etc. Enough material to get you started in R.
Through the design process, TK innovators worked for three weeks to research, empathize, define, prototype, receive feedback, revise and build a final TOY for their parents. They all really did an amazing job!
asmt7/~$sc_210_-_assignment_7_fall_15.doc
asmt7/cosc_210_-_assignment_7_fall_15.doc
COSC 210 - Object Oriented Programming
Assignment 7
The objectives of this assignment are to:
1) Gain further understanding and experience with inheritance.
2) Gain understanding and experience with polymorphism.
3) Gain further understanding and experience with interfaces.
4) Gain understanding and experience with low level graphics.
5) Modify an existing program to meet new requirements applying concepts of objectives 1 through 4.
6) Gain experience with medium-size Java program.
7) Continue to practice good programming techniques.
AFTER YOU HAVE COMPLETED, create a zip file named [your name]Assignment7.zip containing your entire project. Upload the .zip file to Moodle. Printout all source files you created or modified. Include a screen shot of the editor with boxes, ellipses, lines and images shown in the editor. Turn-in all printouts.
COSC 210 – Fundamentals of Computer Science
Assignment 7 Problem Statement
Updated
On the tomcat drive in folder cosc210 you will find file named PainterStartup.zip. This file contains the source code for the start of a Painter program. In its current state, Painter can create boxes and text objects at given locations. Both boxes and text objects can be repositioned and resized using a mouse. The task is to add to the program the implementation for an ellipse, line, image, and group objects.
Instructions:
1) Add an ellipse object. An ellipse is very similar in implementation as the box, except it renders an oval instead of a rectangle. The ellipse can be repositioned by dragging the object to a new location. The ellipse can be resized by first clicking over the ellipse to display grab handles and then dragging a grab handle to a new position. The grab handles are to be rendered at the same positions as the box. Likewise, clicking anywhere in the smallest rectangle that encloses the ellipse performs selection.
2) Add a Line object. A Line is to be created by selecting a Line tool and then click and drag over the canvas. The line is rendered from the point of the initial click to the mouse pointer. On releasing the mouse the construction of the line object is completed. Have the Line object inherit from PtrDrawAbstractAreaObject. Thus it will have only two grab handles.
A Line is selected by clicking anywhere over the line. Right now if you click anywhere in the rectangular region hold the line, then the line is selected. To accomplish this task, override the isOver method in PtrDrawAbstractAreaObject.
Given below is a partial solution to determine if a mouse click position (the x and y parameters to the isOver method) is over a line:
double ratio = (double) getWidth() / (double) getHeight();
if (Math.abs((x - getX()) * ratio) - (y - getY()) <= 1) {
return true;
}
You need to modify this code when the y to x ratio is less than -1 or greater than 1. (Hint: Inverse the r ...
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
This tutor shows the train and test set split with binary classifying, clustering and 3D plots and discuss a probability density function in scikit-learn on synthetic datasets. The dataset is very simple as a reference of understanding.
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : NotesSubhajit Sahu
Highlighted notes of:
CUDA First Programs
Course: Computer Architecture CSE448 (2010)
Instructor: Dr. Kenrick Mock
University of Alaska Anchorage
Kenrick Mock is a Professor of Computer Science and chair of the Department of Computer Science and Engineering. Kenrick has taught over 20 courses and conducts research in artificial intelligence, complex systems, computer security, eye tracking, systems modeling, and computer science education. He has over 20 years of programming experience and has co-authored several books on computer programming. He is the past chair of the Task Force for Undergraduate Research, a committee that seeks to promote research experiences for undergraduates through grants, student activities, curriculum, and faculty development.
Very quick introduction to the language R. It talks about basic data structures, data manipulation steps, plots, control structures etc. Enough material to get you started in R.
Welcome to the Program Your Destiny course. In this course, we will be learning the technology of personal transformation, neuroassociative conditioning (NAC) as pioneered by Tony Robbins. NAC is used to deprogram negative neuroassociations that are causing approach avoidance and instead reprogram yourself with positive neuroassociations that lead to being approach automatic. In doing so, you change your destiny, moving towards unlocking the hypersocial self within, the true self free from fear and operating from a place of personal power and love.
Bucc Toy Project: Learn programming through Game Development
1. BUCC Toy Project:
Angry Jolly Birds
in 3D (3D game)
Day II
with
MD. SADAF NOOR (sadaf2605)
www.sadafnoor.tk
2. PROJECT DETAILS
This is the Desktop 3D version of the game
Angry Birds. The complete work of this project
is and will be done under the flagship of BRAC
University Computer Club by a team
comprising of bunch of first semester students
and a mentor of BRAC University and BRAC
University Computer Club.
Repository:https://github.com/sadaf2605/Angry
JollyBirds3D
3. Want to be a part of the
journey? Welcome aboard!
If you are following this series of tutorial and
want to contribute, then we would also love to
work with you. If you are a new coder like other
contributor of this project, then you are
welcoming you more coordinately.
You can either contact with me
(sadaf2605@gmail.com) with your code or you
can directly send pull request to our github
repository mentioned in the previous page.
4. Re-cap
# We are familiar with methods
# We know little bit about inheritance
# We know how to instantiate
# We have created a box using our JME3
5. Re-cap
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.ColorRGBA;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args){
HelloJME3 app = new HelloJME3();
app.start(); // start the game
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 1, 1); // create cube shape at the origin
Geometry geom = new Geometry("Box", b); // create cube geometry from the shape
Material mat = new Material(assetManager,
"Common/MatDefs/Misc/Unshaded.j3md"); // create a simple material
mat.setColor("Color", ColorRGBA.Blue); // set color of material to blue
geom.setMaterial(mat); // set the cube's material
rootNode.attachChild(geom); // make the cube appear in the scene
}
}
6. Why are we so interested
about boxes?
Simple answer! Not only because it is so simple
to create but also because our Angry and
Jolly Birds will love to hit them more often.
7. Why are we so interested
about boxes?
How many boxes
are there?
Ahh.. Don’t waste
your valuable time
counting boxes…
Not less than 86
boxes there is.
8. But our boxes are not cool!
So lets make it cool first!
How can we make them look cool?
Changing material color to yellow?
mat.setColor("Color", ColorRGBA.Yellow);
But it is not enough cool for us, or is it? NO, IT
SIMPLY DOES NOT!
9. Assets
So as you can see there is a “Project Assets” in
each JME3 project by default.
To make our box beautiful we will add textures
and as you can see there is a Texture folder
in the assets directory. We will keep all the
beautiful things in this directory.
11. Setting today's goal
Mumit Sir always taught us to keep our goal
and our current state together side by side so
that we never get misleaded.
In fact:
“You can’t reach your goal unless you have
one”
13. Texture
Lets draw an image file similar to their box,
box.jpeg and put in the Texture directory.
14. Texture
There is no magic I said earlier, so it won’t
appear like this, we need to modify our code
to make it happen.
We need to get the assets and then add it with
the materials. So 2 steps:
i)Getting texture asset
ii)Adding texture to the material
15. Texture
i)Get the asset:
Texture t =
assetManager.loadTexture("Textures/BrickWa
ll.jpg");
ii) Adding it:
mat.setTexture("ColorMap",t);
16. Texture
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.ColorRGBA;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args){
HelloJME3 app = new HelloJME3();
app.start(); // start the game
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 1, 1); // create cube shape at the origin
Geometry geom = new Geometry("Box", b); // create cube geometry from the shape
Material mat = new Material(assetManager,
"Common/MatDefs/Misc/Unshaded.j3md"); // create a simple material
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue); // set color of material to blue
geom.setMaterial(mat); // set the cube's material
rootNode.attachChild(geom); // make the cube appear in the scene
}
}
17.
18. Size
Now resize our box to make it even better!
We are using this code to create a box:
Box b = new Box(Vector3f.ZERO, 1, 1, 1);
// create cube shape at the origin
Vector3f.ZERO is the location of its origin
And rest of the 1,1,1 are its size in x,y,z
coordinate. Lets resize it 3ce in y
coordinate.
19. Size
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.ColorRGBA;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args){
HelloJME3 app = new HelloJME3();
app.start(); // start the game
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 3, 1); // create cube shape at the origin
Geometry geom = new Geometry("Box", b); // create cube geometry from the shape
Material mat = new Material(assetManager,
"Common/MatDefs/Misc/Unshaded.j3md"); // create a simple material
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue); // set color of material to blue
geom.setMaterial(mat); // set the cube's material
rootNode.attachChild(geom); // make the cube appear in the scene
}
}
20. Size
Lets copy our code and give them different
variable names as otherwise it won’t work
since we already know how to change size
lets apply our knowledge. Make its width 3
times bigger in width rather than in height.
Box b = new Box(Vector3f.ZERO, 3, 1, 1);
// create cube shape at the origin
21. Size
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args) {
HelloJME3 app = new HelloJME3();
app.start();
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 3, 1);
Geometry geom = new Geometry("Box", b);
Box b2 = new Box(Vector3f.ZERO, 3, 1, 1);
Geometry geom2 = new Geometry("Box", b2);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
geom2.setMaterial(mat);
rootNode.attachChild(geom2);
rootNode.attachChild(geom);
}
}
23. Location
Vector3f.ZERO are nothing but the short
hand of writing (0,0,0) as a origin.
If we would have written instead of
Vector3f.ZERO then the origin would not
have been the same:
new Vector3f(x,y,z)
Box b2 = new Box(new Vector3f(4,4,0), 4, 1, 1);
24. Location
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args) {
HelloJME3 app = new HelloJME3();
app.start();
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 3, 1);
Geometry geom = new Geometry("Box", b);
Box b2 = new Box(new Vector3f(4,4,0), 4, 1, 1);
Geometry geom2 = new Geometry("Box", b2);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
geom2.setMaterial(mat);
rootNode.attachChild(geom2);
rootNode.attachChild(geom);
}
}
25. Location
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args) {
HelloJME3 app = new HelloJME3();
app.start();
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 3, 1);
Geometry geom = new Geometry("Box", b);
Box b2 = new Box(new Vector3f(4,4,0), 4, 1, 1);
Geometry geom2 = new Geometry("Box", b2);
Box b3 = new Box(new Vector3f(8,0,0), 1, 3, 1);
Geometry geom3 = new Geometry("Box", b3);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
geom2.setMaterial(mat);
geom3.setMaterial(mat);
rootNode.attachChild(geom3);
rootNode.attachChild(geom2);
26. It is said that:
“if you can’t make it, Fake it.”
At this moment we can’t create beautiful pigs in
the screen, we will create 3D object next time
but lets fill it with something. Maybe a sphere?
27. Adding Sphere
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.texture.Texture;
public class HelloJME3 extends SimpleApplication {
public static void main(String[] args) {
HelloJME3 app = new HelloJME3();
app.start();
}
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 3, 1);
Geometry geom = new Geometry("Box", b);
Box b2 = new Box(new Vector3f(4,4,0), 4, 1, 1);
Geometry geom2 = new Geometry("Box", b2);
Box b3 = new Box(new Vector3f(8,0,0), 1, 3, 1);
Geometry geom3 = new Geometry("Box", b3);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Texture t = assetManager.loadTexture("Textures/box.jpg");
mat.setTexture("ColorMap",t);
//mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
geom2.setMaterial(mat);
geom3.setMaterial(mat);
Material pig_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
pig_mat.setColor("Color", ColorRGBA.Green);
pig_geo.setMaterial(pig_mat);
rootNode.attachChild(pig_geo);
pig_geo.setLocalTranslation(new Vector3f(2,6,0));
rootNode.attachChild(geom3);
rootNode.attachChild(geom2);
rootNode.attachChild(geom);
}
}