Skip to content

Commit

Permalink
final release changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbro committed May 8, 2012
1 parent 4cb122a commit 65a82b7
Show file tree
Hide file tree
Showing 17 changed files with 435 additions and 150 deletions.
Binary file added bin/data/Default@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/Default~ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/Icon-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/data/Icon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/UNVERSE_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/UNVERSE_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/UNVERSE_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/data/UNVERSE_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ofxiphone-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1</string>
<string>3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationExitsOnSuspend</key>
Expand Down
8 changes: 5 additions & 3 deletions src/Dot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ void Dot::update(float timeMultiplier){
pos += timeVel;
}
void Dot::draw(ofxShapeBatchRenderer *shapes){
ofSetColor(255, 255, 255);
shapes->addLine(last_pos*screenMult, pos*screenMult);
wrapToScreen();
if(drawing){
ofSetColor(255, 255, 255);
shapes->addLine(last_pos*screenMult, pos*screenMult);
wrapToScreen();
}
}
void Dot::wrapToScreen(){
if(pos.x>wrapWidth){
Expand Down
9 changes: 5 additions & 4 deletions src/Dot.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ class Dot{
public:
Dot(int x, int y){
maxSpeed = 10;
friction = 0.992;
friction = 0.985;
pos.set(x, y);
vel.set((ofRandom(maxSpeed)-maxSpeed)*0.5, (ofRandom(maxSpeed)-maxSpeed)*0.5);
vel.set(0,0);
wrapWidth = 320;
wrapHeight = 480;
screenMult.set(ofGetWidth()/(float)wrapWidth, ofGetHeight()/(float)wrapHeight);
cout << "screen width: " << ofGetWidth() << endl;
drawing = false;
};
void update(float timeMultiplier);
void draw(ofxShapeBatchRenderer *shapes);
void slowDown();
void wrapToScreen();
ofVec2f pos, last_pos, vel, timeVel, screenMult;
ofPoint pos, last_pos, vel, timeVel, screenMult;
int wrapWidth, wrapHeight;
bool drawing;
float maxSpeed, friction;
};
197 changes: 197 additions & 0 deletions src/TitleScreen.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
#include "TitleScreen.h"

TitleScreen::TitleScreen()
{

float wrapWidth = 320;
float wrapHeight = 480;
screenDrawMult.set(ofGetWidth()/(float)wrapWidth, ofGetHeight()/(float)wrapHeight);

offset = ofPoint(82.65, 82.65);
screenMult = ofPoint(154, 154);

offsetTap = ofPoint(84.1, 366.9);
screenMultTap = ofPoint(19.45, 19.45);

// u
vector<ofPoint*> a0;
a0.push_back(new ofPoint(0,0));
a0.push_back(new ofPoint(0,0.5092084006462035));
a0.push_back(new ofPoint(0.1308562197092084,0.6449111470113086));
a0.push_back(new ofPoint(0.2319870759289176,0.6449111470113086));
a0.push_back(new ofPoint(0.3602584814216478,0.5092084006462035));
a0.push_back(new ofPoint(0.3602584814216478,0));
letters.push_back(a0);

// n
vector<ofPoint*> a1;
a1.push_back(new ofPoint(0.48109854604200325,0.6449111470113086));
a1.push_back(new ofPoint(0.48109854604200325,0));
a1.push_back(new ofPoint(0.9951534733441034,0.6449111470113086));
a1.push_back(new ofPoint(0.9951534733441034,0));
letters.push_back(a1);

// v
vector<ofPoint*> a2;
a2.push_back(new ofPoint(0.007431340872374797,0.7489499192245558));
a2.push_back(new ofPoint(0.09693053311793215,1.0507269789983844));
a2.push_back(new ofPoint(0.18675282714054928,0.7489499192245558));
letters.push_back(a2);

// e
vector<ofPoint*> a3;
a3.push_back(new ofPoint(0.2558966074313409,0.7489499192245558));
a3.push_back(new ofPoint(0.39063004846526656,0.7489499192245558));
a3.push_back(new ofPoint(0.2558966074313409,0.7489499192245558));
a3.push_back(new ofPoint(0.2558966074313409,0.8833602584814215));
a3.push_back(new ofPoint(0.39063004846526656,0.8833602584814215));
a3.push_back(new ofPoint(0.2558966074313409,0.8833602584814215));
a3.push_back(new ofPoint(0.2558966074313409,1.0507269789983844));
a3.push_back(new ofPoint(0.39063004846526656,1.0507269789983844));
letters.push_back(a3);

// r
vector<ofPoint*> a4;
a4.push_back(new ofPoint(0.4484652665589661,1.0507269789983844));
a4.push_back(new ofPoint(0.4484652665589661,0.7489499192245558));
a4.push_back(new ofPoint(0.555735056542811,0.7489499192245558));
a4.push_back(new ofPoint(0.5932148626817447,0.7867528271405493));
a4.push_back(new ofPoint(0.5932148626817447,0.845557350565428));
a4.push_back(new ofPoint(0.555735056542811,0.8833602584814215));
a4.push_back(new ofPoint(0.4484652665589661,0.8833602584814215));
a4.push_back(new ofPoint(0.49434571890145396,0.8833602584814215));
a4.push_back(new ofPoint(0.5932148626817447,1.0507269789983844));
letters.push_back(a4);

// s
vector<ofPoint*> a5;
a5.push_back(new ofPoint(0.7964458804523424,0.7831987075928918));
a5.push_back(new ofPoint(0.7625201938610663,0.7489499192245558));
a5.push_back(new ofPoint(0.6882067851373183,0.7489499192245558));
a5.push_back(new ofPoint(0.6516962843295637,0.7854604200323102));
a5.push_back(new ofPoint(0.6516962843295637,0.8277867528271405));
a5.push_back(new ofPoint(0.812924071082391,0.9515347334410339));
a5.push_back(new ofPoint(0.812924071082391,1.0116316639741518));
a5.push_back(new ofPoint(0.7738287560581584,1.0507269789983844));
a5.push_back(new ofPoint(0.6768982229402262,1.0507269789983844));
a5.push_back(new ofPoint(0.6374798061389338,1.0116316639741518));
letters.push_back(a5);

// e
vector<ofPoint*> a6;
a6.push_back(new ofPoint(0.863004846526656,0.7489499192245558));
a6.push_back(new ofPoint(1,0.7489499192245558));
a6.push_back(new ofPoint(0.863004846526656,0.7489499192245558));
a6.push_back(new ofPoint(0.863004846526656,0.8833602584814215));
a6.push_back(new ofPoint(1,0.8833602584814215));
a6.push_back(new ofPoint(0.863004846526656,0.8833602584814215));
a6.push_back(new ofPoint(0.863004846526656,1.0507269789983844));
a6.push_back(new ofPoint(1,1.0507269789983844));
letters.push_back(a6);

// vector<ofPoint*> a8;
// a8.push_back(new ofPoint(0.12082262210796917,0));
// a8.push_back(new ofPoint(0,0.11825192802056554));
// a8.push_back(new ofPoint(0,0.8766066838046274));
// a8.push_back(new ofPoint(0.12082262210796917,0.9974293059125964));
// a8.push_back(new ofPoint(0.5501285347043702,0.07969151670951158));
// a8.push_back(new ofPoint(0.9511568123393317,0.07969151670951158));
// a8.push_back(new ofPoint(0.7506426735218509,0.07969151670951158));
// a8.push_back(new ofPoint(0.7506426735218509,0.8946015424164524));
// a8.push_back(new ofPoint(0.9408740359897173,0.8946015424164524));
// a8.push_back(new ofPoint(1.2596401028277635,0.07969151670951158));
// a8.push_back(new ofPoint(1.5604113110539848,0.8946015424164524));
// a8.push_back(new ofPoint(1.0437017994858613,0.6401028277634961));
// a8.push_back(new ofPoint(1.4678663239074552,0.6401028277634961));
// a8.push_back(new ofPoint(1.7017994858611827,0.8946015424164524));
// a8.push_back(new ofPoint(1.7017994858611827,0.07969151670951158));
// a8.push_back(new ofPoint(1.987146529562982,0.08226221079691518));
// a8.push_back(new ofPoint(2.0925449871465296,0.18766066838046272));
// a8.push_back(new ofPoint(2.0925449871465296,0.3419023136246787));
// a8.push_back(new ofPoint(1.987146529562982,0.4498714652956298));
// a8.push_back(new ofPoint(1.7017994858611827,0.4498714652956298));
// a8.push_back(new ofPoint(2.5629820051413885,0.07969151670951158));
// a8.push_back(new ofPoint(2.9640102827763495,0.07969151670951158));
// a8.push_back(new ofPoint(2.7609254498714657,0.07969151670951158));
// a8.push_back(new ofPoint(2.7609254498714657,0.8946015424164524));
// a8.push_back(new ofPoint(3.190231362467866,0.07969151670951158));
// a8.push_back(new ofPoint(3.5604113110539846,0.07969151670951158));
// a8.push_back(new ofPoint(3.7969151670951153,0.31362467866323906));
// a8.push_back(new ofPoint(3.7969151670951153,0.6478149100257069));
// a8.push_back(new ofPoint(3.55012853470437,0.8946015424164524));
// a8.push_back(new ofPoint(3.185089974293059,0.8946015424164524));
// a8.push_back(new ofPoint(2.9640102827763495,0.6709511568123394));
// a8.push_back(new ofPoint(2.9640102827763495,0.3059125964010283));
// a8.push_back(new ofPoint(4.29305912596401,0.07969151670951158));
// a8.push_back(new ofPoint(4.5681233933161955,0.07969151670951158));
// a8.push_back(new ofPoint(4.676092544987147,0.18766066838046272));
// a8.push_back(new ofPoint(4.676092544987147,0.4498714652956298));
// a8.push_back(new ofPoint(4.29305912596401,0.4498714652956298));
// a8.push_back(new ofPoint(4.29305912596401,0.8946015424164524));
// a8.push_back(new ofPoint(4.663239074550129,0.8946015424164524));
// a8.push_back(new ofPoint(4.789203084832906,0.7712082262210798));
// a8.push_back(new ofPoint(4.789203084832906,0.5629820051413882));
// a8.push_back(new ofPoint(4.969151670951157,0.07969151670951158));
// a8.push_back(new ofPoint(5.341902313624679,0.07969151670951158));
// a8.push_back(new ofPoint(4.969151670951157,0.4498714652956298));
// a8.push_back(new ofPoint(5.341902313624679,0.4498714652956298));
// a8.push_back(new ofPoint(4.969151670951157,0.8946015424164524));
// a8.push_back(new ofPoint(5.341902313624679,0.8946015424164524));
// a8.push_back(new ofPoint(6.223650385604113,0.21593830334190234));
// a8.push_back(new ofPoint(6.087403598971723,0.07969151670951158));
// a8.push_back(new ofPoint(5.714652956298201,0.07969151670951158));
// a8.push_back(new ofPoint(5.488431876606684,0.3059125964010283));
// a8.push_back(new ofPoint(5.488431876606684,0.6709511568123394));
// a8.push_back(new ofPoint(5.712082262210797,0.8946015424164524));
// a8.push_back(new ofPoint(6.074550128534705,0.8946015424164524));
// a8.push_back(new ofPoint(6.32133676092545,0.6478149100257069));
// a8.push_back(new ofPoint(6.32133676092545,0.5295629820051414));
// a8.push_back(new ofPoint(6.020565552699229,0.5295629820051414));
// a8.push_back(new ofPoint(6.4704370179948585,0.07969151670951158));
// a8.push_back(new ofPoint(6.4704370179948585,0.8946015424164524));
// a8.push_back(new ofPoint(6.624678663239075,0.8946015424164524));
// a8.push_back(new ofPoint(6.624678663239075,0.07969151670951158));
// a8.push_back(new ofPoint(7.277634961439589,0.8946015424164524));
// a8.push_back(new ofPoint(7.277634961439589,0.07969151670951158));
// a8.push_back(new ofPoint(7.763496143958869,0));
// a8.push_back(new ofPoint(7.881748071979436,0.12082262210796917));
// a8.push_back(new ofPoint(7.881748071979436,0.8817480719794344));
// a8.push_back(new ofPoint(7.763496143958869,1));
// letters.push_back(a8);


fixPoints();
}
void TitleScreen::draw(ofxShapeBatchRenderer *shapeBatch)
{
for (int i=0; i<letters.size(); i++) {
for(int j=0; j<letters[i].size()-1; j++){
shapeBatch->addLine(ofVec2f(*letters[i][j])*screenDrawMult, ofVec2f(*letters[i][j+1])*screenDrawMult);
}
}
}
bool TitleScreen::assignPoint(ofPoint *point)
{
// first make sure that there is something to assign a point to
if(letters.size() == 0 or letters[0].size() == 0){
return false;
}
point->set(*letters[0][0]);
letters[0].erase(letters[0].begin());
// if there are no more points in the current letter, then erase it
if(letters[0].size()==0){
letters.erase(letters.begin());
}
return true;
}
void TitleScreen::fixPoints()
{
for (int i=0; i<letters.size(); i++) {
for (int j=0; j<letters[i].size(); j++) {
letters[i][j]->set((*letters[i][j])*screenMult+offset);
}
}
// for (int j=0; j<letters[letters.size()-1].size(); j++) {
// letters[letters.size()-1][j]->set((*letters[letters.size()-1][j])*screenMultTap+offsetTap);
// }
}
13 changes: 13 additions & 0 deletions src/TitleScreen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once
#include <vector>
#include "ofPoint.h"
#include "ofxShapeBatchRenderer.h"
class TitleScreen{
public:
TitleScreen();
void fixPoints();
bool assignPoint(ofPoint *point);
void draw(ofxShapeBatchRenderer *shapeBatch);
vector< vector< ofPoint* > > letters;
ofPoint offset, screenMult, screenDrawMult, offsetTap, screenMultTap;
};
14 changes: 12 additions & 2 deletions src/testApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@
#include <vector>
#include "ofxUI.h"
#include "ofxShapeBatchRenderer.h"
#include "TitleScreen.h"

#define NUM_DOTS 100

enum appState{
ONTITLE,
ADDINGDOTS,
MAINSTATE
};
class testApp : public ofxiPhoneApp{

public:
void setScale(int scale);
void setup();
void update();
void draw();
void drawDots(float timeMultiplier);
void audioOut(float * output, int bufferSize, int nChannels);

void exit();
Expand All @@ -34,7 +40,8 @@ class testApp : public ofxiPhoneApp{
void deviceOrientationChanged(int newOrientation);

void guiEvent(ofxUIEventArgs &e);

TitleScreen *title;

ofFbo nonFloatingPointFbo_GL_RGBA;
Dot *dots[NUM_DOTS];
int col[NUM_DOTS*NUM_DOTS];
Expand All @@ -47,8 +54,11 @@ class testApp : public ofxiPhoneApp{
int currentScale, numDots;
float collisionDistance, mDist;
float lastTime, currentTime, timeMultiplier;
ofImage titleImg;
appState state;
ofxUICanvas *gui;
ofxShapeBatchRenderer *shapeBatch;
float addRate;
};


Loading

0 comments on commit 65a82b7

Please sign in to comment.