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
for x in range (1,101): | |
if (x % 5 == 0) & (x % 3 == 0): | |
print(str(x) + " = crackle pop") | |
elif x % 3 == 0: | |
print(str(x) + " = crackle") | |
elif x % 5 == 0: | |
print(str(x) + " = pop") | |
else: | |
continue |
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
displayMode(FULLSCREEN) | |
supportedOrientations(PORTRAIT) | |
function setup() | |
rectMode(CENTER) | |
w1,h1=230,300 -- starting positions for the coins | |
w2,h2=630,400 | |
w3,h3=530,800 | |
w4,h4=130,700 | |
tab={} |
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
function setup() | |
LoadImages() --do this first, on its own | |
sprite(); | |
end | |
function LoadImages() | |
imageStatus='Ready' --tells draw it's ok to draw the scene (will be turned off if we have to download images) | |
output.clear() |
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
function setup() | |
LoadImages() --do this first, on its own | |
sprite(); | |
end | |
function setup2() | |
print("setup2"); | |
end | |
function LoadImages() |
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
function setup() | |
LoadImages() --do this first, on its own | |
end | |
function LoadImages() | |
imageStatus='Ready' --tells draw it's ok to draw the scene (will be turned off if we have to download images) | |
output.clear() | |
--pass through Codea name of image and internet url | |
--not in Codea, will be downloaded and saved | |
img1=LoadImage('Dropbox:3D-tree', |
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
function setup() | |
supportedOrientations(LANDSCAPE_ANY) | |
-- displayMode(FULLSCREEN_NO_BUTTONS) | |
top = physics.body(EDGE, vec2(0, HEIGHT), vec2(WIDTH, HEIGHT)) | |
top.type = STATIC | |
top.restitution = 0 | |
bottom = physics.body(EDGE, vec2(0, 0), vec2(WIDTH, 0)) | |
bottom.type = STATIC |
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
displayMode(FULLSCREEN) | |
function setup() | |
sx,sy=WIDTH/2,HEIGHT/2 | |
j,m={},{} | |
end | |
function draw() | |
background(40, 40, 50) | |
for a,b in pairs(j) do |
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
--# 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 | |
local tabs = {} | |
local fnames = {"setup","draw","touched","collide","orientationChanged","close","restart","keyboard","cleanup"} | |
local fns = {} |
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 | |
-- Noob Lander | |
-- by West | |
-- This is a very simple example lunar lander game. It is intended for use as an introduction into creating your first game in codea and is aimed at absolute beginners. | |
--ONLY THE FURTHEST RIGHT HAND TAB WILL BE EXECUTED. DRAG THE TAB FOR THE STEP YOU WISH TO RUN TO THE FAR RIGHT THEN PRESS RUN | |
--The game was built using the following steps. Each step is provided in its own tab and builds upon the previous one. For each tab only comments related to that particular step are provided but a fully commented version is provided below. | |
--1. Place the ship sprite on the screen at a pre-defined position (use one of the pre-loaded sprite packs) |
NewerOlder