This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Notes | |
--this project creates a simple pinball game | |
--instead of flippers, it uses a spherical controller to bounce the ball | |
--and the physics engine to manage all the collisions | |
--To run the final step, you will need all the images in this zipfile | |
--https://www.dropbox.com/s/uv3t6dawvcsh7d6/Pinball.zip | |
--You need to unzip them and copy them into the Dropbox folder you have linked to Codea, then | |
--go into Codea's dropbox library, and press the sync button tp download them |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Notes | |
--This is a simulation of an old puzzle game | |
--where you have a flat plastic surface with balls that roll around on it | |
--there are little holes you have to get the balls into by tipping the puzzle to roll the balls | |
--but there are obstacles, and if you tip too far, the balls come out again | |
--in this version, we'll start to build the puzzle, and when we add more than one ball, we'll | |
--start using physics to manage the ball collisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Notes | |
--This project shows to use some basic physics, from bouncing balls and spinning | |
--rectangles, to the basics of a very simple platform game | |
--HOW TO USE THIS PROJECT | |
--There are a number of tabs at the top. Press on a tab to see its code. | |
--Work through the tabs from left to right, to see the project develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Notes | |
--[[ | |
** What is a mesh? ** | |
A mesh is a quick way of drawing a shape. It is a set of points which create an outline (or wirefame) of an object | |
It is made up of triangles (groups of three points) | |
Triangles are used because a triangle has the smallest number of points that encloses an area | |
Each triangle corner is known as a VERTEX, and has a position and a colour | |
The colours of all the points inside the triangle are interpolated from the colours of the three corners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
--The name of the project must match your Codea project name if dependencies are used. | |
--Project: 3D Lunar Landing | |
--Version: Alpha 1.12 | |
--Comments: | |
--Main | |
states={Intro=0,Loading=1,Flying=2,Crashed=3,Landed=4,Walking=5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newmtl gate | |
Ns 10.0000 | |
Ni 1.5000 | |
d 1.0000 | |
Tr 0.0000 | |
Tf 1.0000 1.0000 1.0000 | |
illum 2 | |
Ka 0.5880 0.5880 0.5880 | |
Kd 0.5880 0.5880 0.5880 | |
Ks 0.0000 0.0000 0.0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Notes | |
--[[ | |
This is a template for creating multi-tab projects | |
That is, projects where each tab can be run independently | |
This can be used for step by step tutorials, with users able to choose which tab runs | |
It can also be used for multi-stage projects, eg games where there are several stages like | |
* start menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Three D asteroids | |
--The comments below are aimed at a wide variety of users | |
--They may be too detailed or not detailed enough, I do my best! | |
--Comments and questions to ignatz on the Codea forum | |
--There is a lot of setup work to do, but note how it's packaged into separate functions to keep tidy | |
function setup() | |
Settings() --general settings | |
ast={} --table of asteroids to show on screen | |
FPS=60 --frame rate, to check it's not too slow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
--Main | |
--This code manages which Code tab is run | |
--it remembers your last choice, and if you select a different one, it runs that instead | |
--This has nothing to do with 3D lighting and you can ignore it completely | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
--Dungeon ver 1.0 | |
--navigation | |
--touch left 1/3 of screen to turn left, right 1/3 of screen to turn right | |
--touch top 1/3 of screen to move forward, bottom 1/3 of screen to go backwards | |
--touch centre of screen to stop | |
--touching multiple times speeds up |
NewerOlder