The task of making 3d models for games can feel daunting. In 2022, we have many tools to rapidly creating 3d models using scanning methods. I’m amazed how this robust computer science and computer vision technology has become accessible to makers and creatives. Let’s say you need to create a 3d model of a statue and 3d print a copy. In our post today, I wanted to connect our readers to a wonderful app called Trnio and a few others. For IPhone and Ipad users that have ARKit, maker can create impressive 3d models by recording a scan of their target objects or capturing pictures. The following video outlines the process for Trnio.
Under the hood, 3d scanning works by exploring each frame and computing the estimated camera position of the device. Using the camera position and feature points extracted from the frame, the system can do analysis of the movement of feature points over time. Using algorithms that extract 3d structure from motion, the app can estimate a model of the 3d object. Really cool stuff.
When testing this application with my kitchen table and few other car parts, I found the app easy to use with notable results. You can inspect some of the results of scans on SketchFab.
In the more recent editions of iOS devices, users have access to LIDAR scanners on these devices. The LIDAR sensor provides depth information more robustly to algorithms increasing 3d model quality. Fernado Herrera does a nice review of a few other scanning options that leverage LIDAR. He mentioned that the LIDAR scans worked best on large structures. I appreciated his comments on Qlone which focuses on scanning smaller items using a QR code template. The reviews looked a bit mixed on the app stores though.
We love to hear from our readers. If there’s another tool that you love for 3d scanning, please share in the comments. If you make something cool, please share that with us too!!
As I have time for small project experiments for myself, I decided to explore new developments with Phaser JS. In general, Phaser JS seems like a fun framework to enable novice game makers to build fun 2D games. The javascript language has become a popular choice since the language exists in every web browser.
In this blog post, we walk through building a small space shooter game.
As you start Phaser JS development, many tutorials walk you through some process to setup a web server to serve html and javascript content. Unfortunately, plain JavaScript alone does not guide makers to create well formed code. In plain Javascript, coders need to create stuff in baby steps. In this process, you should test stuff at each step. If you use a tool like Visual Studio code, the tool provides awesome guidance and autocomplete for devs. It would be nice if tools could improve to help you find more code faults and common syntax mistakes.
The TypeScript language invented by Anders Hejlsberg comes to the rescue. The TypeScript language and related coding tools provides robust feedback to the coder while constructing code. The JavaScript language does not support ideas like class structures or interfaces. Classes enable makers to describe a consistent template for making objects, their related methods, and properties. In a similar way, interfaces enable coders to describe the properties and methods connected to an object, but does not define implementations of methods. It turns out these ideas provide an increased structure and guidance to professional developers to create large applications using JavaScript. When your tools help you find mistakes faster, you feel like you move faster. This provides great support for early stage devs. TypeScript borrows patterns and ideas from C#, another popular language for game developers and business developers.
I found a pretty nice starter kit that integrates TypeScript, a working web server, and Phaser 3 JS together. Here’s the general steps for setting up your Phaser 3 development environment.
Install Visual Studio Code
This is my favorite code editor for web development.
NodeJs enables coders to create JavaScript tools outside of the browser.
npm – When you build software in modern times, tools that you build will depend upon other lego blocks. Those lego blocks may depend upon others. The node package manager makes it easy to install NodeJs tools and their related dependences.
Use the following blog post to install NodeJs and NPM
Your web browser should download the phaser3-rollup-typescript starter kit.
When the download is finished, unzip the master.zip file to a working folder.
On my environment, I have unziped the files to /home/michaelprosario/phaser3-rollup-typescript-master.
Finish the setup and run
cd /home/michaelprosario/phaser3-rollup-typescript-master
yarn install
yarn dev
At this point, you should see that the system has started a web server using vite. Open your browser to http://localhost:3000. You should see a bouncing Phaser logo.
Open up Visual Studio Code and start hacking
Type CTRL+C in the terminal to stop the web server.
In the terminal, type ‘code .’ to load Visual Studio Code for the current folder.
Once Visual Studio Code loads, select “Terminal > New Terminal”
In the terminal, execute ‘yarn dev’
This will run your development web server and provide feedback to the coder on syntax errors every time a file gets saved.
If everything compiles, the web server serves your game at http://localhost:3000
TypeScript Sample Code
Open src/scenes/Game.ts using Visual Studio Code. If you’ve done Java or some C#, the code style should feel more familiar.
import Phaser from 'phaser';
// Creates a scene called demo as a class
export default class Demo extends Phaser.Scene {
constructor() {
super('GameScene');
}
preload() {
// preload image asset into memory
this.load.image('logo', 'assets/phaser3-logo.png');
}
create() {
// add image to scene
const logo = this.add.image(400, 70, 'logo');
// bounce the logo using a tween
this.tweens.add({
targets: logo,
y: 350,
duration: 1500,
ease: 'Sine.inOut',
yoyo: true,
repeat: -1
});
}
}
Like many parents, my wife and I seek out activities that have a fun factor while we learn small lessons about math, science, art, or crafting. It’s fun to find activities that help avoid the default desire for screen time. I started putting together a plan for our kids over the next few weeks. Like many makers, I enjoy checking out new projects ideas on Instructables.com. If you haven’t checked out Instructables, I am certain that you can find a project for you there! I thought I’d share seven projects that looked cool.
In our house, the kids really enjoy building forts. I really like the idea of using PVC to frame the structure of the fort. It looks like a pretty cheap build. Honestly, building forts with cardboard works just fine too. Big box forts can keep our kids playing for hours!
Lego Crossbow:
Sometimes, kids enjoy being little warriors. This looked like a fun build for fans of Lego technics. The build reminds me of the activities from the book “Weapons of Mini-Destruction.”
Lego chess:
In general, I think we might start exploring the idea of building board games using Legos. I got this concept after seeing this simple chess set. It has been fun starting to teach chess to the kids too.
DIY Cardboard Lamp:
This just looks very cool. It might be fun to do a 3D printing twist on twist on this project too!
DIY Board Game:
Speaking of board games again, I really appreciated this post on building board games that teach. Besides that, the author had very practical tips to prototype board game layouts with common objects and simple computer tools like power point. Thanks YourClassRoomHelper.com for the awesome ideas.
Duct Tape Bird House:
With the family staying in the house more, we have started enjoying bird watching more. This hack with boxes and Duct tape got the attention of one of my little ones.
In this blog post series, I want to unpack building a 2D shooter game using Phaser3.js. Phaser3 provides a robust and fast game framework for early-stage JavaScript developers. In this tutorial, we will work to add aliens to the scene, give them some basic movement, and blowing them up. Sound like a plan? Here’s what we will build.
Please make sure to check out Tutorial 1 to get started with this project. You’ll need to build upon the code and ideas from the previous blog posts. (post 1, post 2)
To see the code in a completed state, feel free to visit this link. Let’s start by making some modifications to the scene class to preload an enemy sprite graphic. The PNG file will represent how the alien should be drawn to screen. We associate the name ‘enemy1’ with our PNG file.
In the Phaser game framework, we associate moving game entities with sprites. To define a sprite, we build out an enemy class. When we put a sprite into our scene(as the class is constructed), a special function will be called the constructor. We’ve designed the constructor so that we can set the enemy location at a point (x,y) coordinate and connect it to the scene.
In the constructor, we accomplish the following work. We set the texture of the sprite to ‘enemy1’ and set it the position. Next, we connect this sprite to the physics engine of the scene. We’ll use the physics engine to detect when the enemy gets hit by lasers. We also initialize the deltaX factor to 3. It’s not super exciting, but the aliens will shiver from side to side randomly. This, however, is good enough for a simple lesson. After to complete this tutorial, I encourage you to go crazy with making the aliens move any way you want!
So, we’re ready to start moving some aliens. Let’s do this! We’re going to write three simple methods on the Enemy1 class. Following the pattern of all Photon sprites, the update method will be called every game tick. It’s your job to tell the sprite how to move. Keep in mind, we’re going to do a simple “side to side” behavior randomly. In the update method, we start by picking a number between 0 and 3. If k is 2, we make the sprite move left using the “this.moveLeft()” function. Otherwise, we make it move to the right using “this.moveRight()”
update() {
let k = Math.random() * 4;
k = Math.round(k);
if (k == 2) {
this.moveLeft();
}
else if (k == 3) {
this.moveRight();
}
}
moveLeft() {
if (this.x > 0) {
this.x -= this.deltaX;
}
}
moveRight() {
if (this.x < SCREEN_WIDTH) {
this.x += this.deltaX;
}
}
Make lots of aliens
At this point, you want to see lots of moving aliens. Let’s add the code to the scene class to construct the aliens. In the scene class, the “create” method will be used to construct all objects. This includes our ship and the aliens. Firstly, we create a special collection object called enemies. We’ll use this collection to track the enemies with the physics system. (this.enemies = this.physics.add.group()) On the next line, we create an Array so that we have a simple way to track our enemies that need updating. In the loop, we’re creating 21 aliens, placing them in random locations, and adding them to our collections. (enemies and enemies2)
class Scene1 extends Phaser.Scene {
...
create() {
this.cursors = this.input.keyboard.createCursorKeys();
this.myShip = new Ship(this, 400, 500);
this.add.existing(this.myShip);
// ======= adding enemies ============
this.enemies = this.physics.add.group();
this.enemies2 = new Array();
let k = 0;
for (k = 0; k < 21; k++) {
let x = Math.random() * 800;
let y = Math.random() * 400;
this.enemy = new Enemy1(this, x, y);
this.add.existing(this.enemy);
this.enemies.add(this.enemy);
this.enemies2.push(this.enemy);
}
}
In order to invoke our update code for all enemies, we need to make one more edit to the scene class. In the “update” method, we need to add a loop to call “update” on all enemies
update() {
// there's more code related to the ship here
let j = 0;
for (j = 0; j < this.enemies2.length; j++) {
let enemy = this.enemies2[j];
enemy.update();
}
}
At this point, we should see our aliens wiggling on the screen. And there’s much rejoicing!
Aliens go boom! Let’s do collision detection
In the laser class that we built in the last post, we need to make a few edits. Check out the code below. In the constructor of the ShipLaser, we set the texture, position, speed, and store the parent scene in “this.scene.” We connect the laser instance to the physics engine using “scene.physics.world.enable.” In the next line, we tell the game framework to check for collisions between this laser and the enemies. When a collision happens, we handle the hit using the “handleHit” function.
In the handle hit function, you’ll notice that the laserSprite and enemySprite have been passed as parameters to the method. In Phaser, you can receive these references so that we can define behaviors associated with both sprites. In this case, we’re just going to destroy the objects.
In our classes for young makers, we discuss how digital fabrication technology will be a game-changer. In future work, more jobs will involve converting digital content into physical things through technologies like 3D printing, CNC, and other similar technologies. Students love playing video games and enjoy the opportunity to learn how to make their own game worlds. At the Museum of Aviation in Warner Robins, GA, I had the opportunity to teach a workshop on building amazing game worlds in Minecraft using TinkerCAD.com. It’s so much fun to share these lessons with students! After guiding the students through some of the basic operations of TinkerCAD.com, we encourage the students to play and build projects that they care about. It was cool to see their finished work in Minecraft. While the students think about “playing and building,” they are actually exposed to many engineering and math skills too. The students learned how to displace objects in 3D space, rotate objects, scale objects, perform measurement, and many other mathematical ideas.
Some of the students attempted to build a Minecraft roller coaster structure. In a secondary step, we added Minecraft train tracks and red stone power rails to power our Minecarts. It turned out great!
One of our students decided to build a huge Minecraft creeper! A friend of mine from Ampersand Arts in MaconMacon, helped build the huge snow man shown below.
You can see a car, tie fighter, and rockets built by the students.
Very proud of the focus and work of our students. I’m also thankful to my friend Jake who helped coach the class with me.
To support parents, students, and teachers, I wanted to share a few tips to enable you to build stuff like this in Minecraft.
What’s a schematic file?
A schematic file contains 3D model data to transfer content into Minecraft. You can find schematic data files on web sites like http://www.minecraft-schematics.com/ . You can also create 3D models and convert them to schematic files using TinkerCAD.com .
How do you import schematic files into Minecraft?
I wanted to share a quick tutorial video on using MCEdit to import schematic content into Minecraft. Before doing the steps mentioned in this video, make sure to install Minecraft on your computer and create at least one world.
Steps:
1. Open your web browser and navigate to http://www.mcedit.net/ .
2. Click the “Download” menu option at the top.
3. You will want to download the latest version appropriate for your operating system. In this tutorial, we will download version 2 beta 6 for Windows. (64 bit version)
4. After the install program has been downloaded, execute the program and specify a location to store “mcedit.” For this demo, we will store MCEdit in “c:\games\mcedit.” Using our file explorer, we will navigate to the MCEdit folder.
5. Open the “mcedit2-win64-2.0.0-beta6” folder.
6. Run MCEdit
7. In the panel on the left, MCEdit lists the minecraft game worlds saved by your current user account. For this demo, we’ll open the world called “demo.”
8. Select “demo”.
9. Click the button “edit.”
10. You can move around this gameworld using “WASD” navigation style.
11. You can change the direction the player is looking by holding the “right” mouse button and dragging the mouse.
12. To import a schematic file, click the “Import/Export > Import”
13. The system will open a file box enabling you to select a schematic. For this demo, we’ll select a small car created by one my students.
14. The XYZ numbers here enable you to adjust the location of the schematic content. In my case, I’ll edit the “y” coordinate to make sure to car connects to the ground.
15. Click the “confirm” button to accept the schematic content into the world.
16. Keep in mind, you’re not done yet. You need to save the session by clicking the “MCEdit” menu followed by “save world.”
17. You’re all done. Close MCEdit.
18. Open up Minecraft to test that your schematic file shows up correctly in your world!
Robotics: Building upon the programming skills introduced early in the program, students will have the opportunity to build robots from scratch using the mBot kit. Students will love customizing their mBot using puzzle based programming and the easy to assemble construction experience. Students take home their mbot to continue the tinkering fun at home.
Student registration includes a complete mBot robotics kit from Makeblock.cc.
All ages and experience levels are welcome and the workshops are a great activity for the entire family. Parents and kids can also both attend under the same registration fee!
We had a great time during our 3D modeling workshop at SparkMacon yesterday. This workshop, the second class in our Summer Maker skills series, helps makers learn how to build 3D stuff for games, art and 3D printing. The skills used in this workshop can apply to many topic areas: medical applications, engineering, game design, and digital fabrication.
In teaching this workshop, I hope we can inspire and foster the next Easton LaChappelle. He’s an amazing young man who has launched his own company to produce functional and affordable prosthetics. He started this work at the age of 14. Check out his story in the video below. I enjoy starting our workshops with this story since it helps the students think about the potential impact and change they can make with these skills. These are powerful ideas.
As we have taught this workshop, I have especially enjoyed changing the challenge problem or prompts that I give the students. In this post, I wanted to share a few insights and ideas for the benefit of other teachers. In this last workshop, I wanted to give the students the ability to play with 3D scanning. I think the students really enjoyed this.
During our workshop, we committed ourselves to build parts of a small game world. My son and two middle school students helped build this world. We did parts of the game world in TinkerCAD.com. At the end of the workshop, I imported their work into a game using the Unity game engine. The work of each student has a different model color. I think the students appreciated getting to see the Unity game engine since it gave them a maker perspective of building games. By the end of the class, we had combined our work together so that we could publish using the Unity web player and a Google Cardboard format.
Very proud of the students and their work. It was fun seeing the students helping each other.
Teaching this class is so much fun! We had a great time building this game world together. Looking forward to serving many new students and sharing the joy of making.
Join us for our next Maker Skills workshops!
Month 3: July 16 – Laser cutting: Makers will learn the basics of designing for the laser cutter by creating beautiful bookmarks, key chains, or jewelry. Makers will learn techniques for editing scalable vector graphics for laser cutting jobs using InkScape, a free graphics design tool. We will also introduce ways to design 3-dimensional work using various tools and cutting patterns.
Month 4: August 20 – Robotics: Building upon the programming skills introduced early in the program, students will have the opportunity to build robots from scratch using the mBot kit. Students will love customizing their mBot using puzzle based programming and the easy to assemble construction experience. Students take home their mbot to continue the tinkering fun at home.
This series will be tons of fun. Looking forward to seeing you there!
Building paper stomp rockets can be a fun way to engage students and your kids in learning about experimentation, designing by iteration, and aerodynamics. Let me put extra emphasis on fun!! My kids have really loved this build. In anticipation for a local arts, technology, and maker festival in Macon, GA, I wanted prepare a small project that would help engage my kids and other young makers. We first discovered building paper stomp rockets at the Atlanta Mini Maker Faire. We were instantly hooked!! As an added benefit, it’s pretty inexpensive and easy to build.
We can’t wait to share this project with our friends . If you’re in the Macon, GA area, make sure to join us at the Make End festival.
Middle Georgia Makers and Georgia makerspaces will be exhibiting their projects, art, and crafts on November 14th to 15th at Tattnall Square Park in Macon, GA. The festival seeks to inspire the next generation of creative tech professionals, creative artists and showcase the economic strengths of the region.
Thanks to programs like Scratch, MIT App Inventor, Hopscotch and others, students and novice programmers are getting introduced to ideas like sequencing, planning, simple logic, and loops. Instead of creating lines of code, students are introduced to the concepts of computer programming through the metaphor of puzzle pieces. In Scratch, students create amazing games and media experiences by snapping together puzzle pieces.
When I saw this for the first time, I wanted to include these puzzle-based coding interfaces into web apps that I create. Here’s the GREAT news. Using the open source JavaScript library entitled Blockly, you can build your own block programming interfaces in YOUR software. Meet Neil Fraser, the talented software engineer from Google, who created Blockly. Blockly was designed to help engage students in learning more about computer programming. When students start to learn to program, they are fighting problems of logic and problems of syntax. By using the puzzle metaphor, students can now focus on learning sequencing, logic, and iteration.
Samples from Blockly website:
Puzzle – Learn how blocks work while solving this simple country quiz.
Here’s the code for the sample. You’ll notice that this small application runs completely in the browser using HTML, SVG, and JavaScript.
Blockly Demo #1
Puzzle:
Code from Puzzle:
In the header of your HTML file, include the following JavaScript files.
In the body of your HTML document, enter the following code. The “blocklyDiv” DIV defines the size of the space that will contain your blockly experience.
The xml document with the “id” of “toolbox” defines the types of blocks that will be available in your design space. To keep things simple,
I have only included a few programming blocks for “if” statements, printing to the web browser, and loops to get your imagination going.
The final JavaScript method(i.e. Blockly.inject) links your toolbox selections to your design surface.
Puzzle:
As a developer, you would want to capture computer program represented by the blocks and actually run it.
The Blockly framework supports code output in JavaScript, Python, XML, and Dart . In the following code, we capture the puzzle space in JavaScript code.
We place the JavaScript code into a TEXTAREA so the user can review the code. With a little extra effort, you can execute the program.
function getCodeFromPuzzle()
{
var code = Blockly.JavaScript.workspaceToCode();
var txtCode = document.getElementById("txtCode");
txtCode.value = code;
}
So… how do you create your own blocks? How do I do additional customizations? Check out the Blockly Wiki for those details.
Check out other helpful resources from InspiredToEducate.NET
Some research and development requires big and expensive equipment, resources, and sensors. It’s awesome when innovators make cool technology more affordable, accessible and available to young students and hackers. As a student at Carnegie Mellon University (CMU), Johnny Lee explored ways to use the remote control devices of a Nintendo WII in his human computer interaction(HCI) research. (Check out his cool blog here.) It isn’t commonly known that WII remote controls or “WIIMotes” can be connected to computers/Android devices through Bluetooth. By sharing his Wiimote experiments using video and social media in 2008, Johnny Lee spawned a movement of experimentation and software tinkering. Mr. Lee has provided a brief introduction to his work on the following TED talk.
In contrast to other programmable sensor devices, a WIIMote probably costs you $40. It provides accelerometers, gyroscopes, an infrared camera, and common game controller features. You may have a Wiimote already in your house. Brian Peek has published a wonderful open source library to empower .NET developers to use WIIMote sensors in their applications. The various aspects of the WiiMote are exposed using C# events. The code to get started is very simple. The community experimentation based on Johnny Lee’s work has been delightful. Check out some of the cool hacks and experiments created by the Johnny Lee, Brian Peek and the community.
In honor of the Global Game Jam 2014, I collected a few tools and resources to help you or your students get started in learning game programming using various technologies. The Global Game Jam is a world wide hackathon and online festival for game developers and designers. Check out the hashtag #ggj14 on Twitter and Google+ for updates and check out game inspiration in action. It’s amazing to see what you can build in one weekend. 🙂
Invent with Python by Al Sweigart: The book provides a gentle introduction to programming and using Python for simple 2D games. The book uses PyGame for the game framework.
Designing Games with Kodu Game Lab: Kodu is an amazing visual programming environment for games by Microsoft research. This guide helps prepare teachers and mentors to teach the game development environment.
Dive into HTML5 : This book provides an introduction to advanced features of the browser like HTML5 and Canvas tag . Drawing in the browser is very fun. This book helps those interesting in making HTML5 games.
Easy GML by Drew Bach:Game Maker is a great tool to introduce 2D game programming. This free guide helps introduce the core concepts and the script language. (GML)
Unity3dStudent.com : Unity is a big player in the professional game developer market. It enables you to create cross platform video games. This site provides free teaching introducing the tools and concepts.
OpenGameArt.org : This site provides a collection of open game art, music, and sound that can support your game development.