return to tranceaddict TranceAddict Forums Archive > Main Forums > Chill Out Room

Pages: 1 2 [3] 4 
Calling out programmers (pg. 3)
View this Thread in Original format
Gauss
I know all that and I'm done with it already, but thanks. :p
T-Soma
According to some stats Java is the most commonly used language right now but weather that's true or not C, C++ and Java are all up there.

Iv spent plenty of time coding AS3 project (some flex) and compared to C++ I find that its somewhat of a fun language, because things usually just work.
No need to worry about tricky compilers or managing memory.

Could we maybe get a list of the best places (forums, libraries) for programming?

My fav Action Script places...
http://www.kirupa.com << Average tutorials but good forums
http://www.gotoandlearn.com << Great tutorials and the community is also alright
http://lab.andre-michelle.com << Cool projects (such as the flash tr 909)
http://www.quasimondo.com << Blog, has some useful code
http://www.flashdevelop.org/community << Really good IDE for writing AS, infinitely better than Adobe Flash CS3 for code based projects.
jupiterone
import processing.opengl.*;
import processing.video.*;

Capture video;
int count;
boolean cheatScreen = true;

static final float BOX_SIZE = 0.75;
static final float CONE_HEIGHT = 1.2;
static final float MAX_RADIUS = 10;
static final float ROT_INCREMENT = 3.0;
static final float TRANS_INCREMENT = 1;
static final float STEP_AMOUNT = 0.1;

Tuple[] farbe;
Tuple[] trans;

float[] hsb = new float[3];

float leftRightAngle;
float upDownAngle;
float fwdBackTrans;
float upDownTrans;
float leftRightTrans;
boolean motion;

boolean blobby = false;


void setup() {
size(640, 480, P3D);
//size(screen.width, screen.height, OPENGL);

video = new Capture(this, 40, 30, 15);
count = video.width * video.height;

sphereDetail(60);

upDownTrans = 0;
leftRightTrans = 0;
motion = false;

leftRightAngle = 101.501297;
upDownAngle = -180.098694;
fwdBackTrans = 14.800003;

farbe = new Tuple[count];
trans = new Tuple[count];
for (int i = 0; i < count; i++) {
farbe[i] = new Tuple();
trans[i] = new Tuple();
}
}


void draw() {
background(0);

if (!blobby) lights();

pushMatrix();
translate(width/2, height/2);
scale(min(width, height) / 10.0);

translate(0, 0, -20 + fwdBackTrans);
rotateY(radians(36 + leftRightAngle)); //, 0, 1, 0);
rotateX(radians(-228 + upDownAngle)); //, 1, 0, 0);

if (blobby) {
stroke(0.35, 0.35, 0.25, 0.15);
wireCone(MAX_RADIUS, MAX_RADIUS * CONE_HEIGHT, 18, 18);
}
else {
stroke(0.35, 0.35, 0.25, 0.25);
wireCone(MAX_RADIUS, MAX_RADIUS * CONE_HEIGHT, 180, 18);
}

noStroke();
for (int i = 0; i < count; i++) {
int pixelColor = video.pixels[i];
int r = (pixelColor >> 16) & 0xff;
int g = (pixelColor >> 8) & 0xff;
int b = pixelColor & 0xff;
Color.RGBtoHSB(r, g, b, hsb);

float radius = hsb[1] * hsb[2];
float angle = hsb[0] * 360.0 * DEG_TO_RAD;
float nx = MAX_RADIUS * radius * cos(angle);
float ny = MAX_RADIUS * radius * sin(angle);
float nz = hsb[2] * MAX_RADIUS * CONE_HEIGHT;

trans[i].set(trans[i].x - (trans[i].x - nx)*STEP_AMOUNT,
trans[i].y - (trans[i].y - ny)*STEP_AMOUNT,
trans[i].z - (trans[i].z - nz)*STEP_AMOUNT);

farbe[i].set(farbe[i].x - (farbe[i].x - r)*STEP_AMOUNT,
farbe[i].y - (farbe[i].y - g)*STEP_AMOUNT,
farbe[i].z - (farbe[i].z - b)*STEP_AMOUNT);

pushMatrix();
farbe[i].phil();
trans[i].tran();

rotate(radians(45), 1, 1, 0);
if (blobby) {
sphere(BOX_SIZE * 2); //, 20, 20);
} else {
box(BOX_SIZE);
}

popMatrix();
}
popMatrix();

if (motion) {
upDownAngle--;
leftRightAngle--;
}

if (cheatScreen) {
image(video, 0, height - video.height);
}
}


void captureEvent(Capture c) {
c.read();
c.loadPixels();
}


void keyPressed() {
switch (key) {
case 'g':
saveFrame();
break;
case 'c':
cheatScreen = !cheatScreen;
break;

case 'm':
motion = !motion;
break;
case '=':
fwdBackTrans += TRANS_INCREMENT;
break;
case '-':
fwdBackTrans -= TRANS_INCREMENT;
break;
case 'b':
blobby = !blobby;
break;
}
}


void mouseDragged() {
float dX, dY;

switch (mouseButton) {
case LEFT: // left right up down
dX = pmouseX - mouseX;
dY = pmouseY - mouseY;
leftRightAngle -= dX * 0.2;
upDownAngle += dY * 0.4;
break;

case CENTER:
dX = pmouseX - mouseX;
dY = pmouseY - mouseY;
leftRightTrans -= TRANS_INCREMENT * dX;
upDownTrans -= TRANS_INCREMENT * dY;
break;

case RIGHT: // in and out
dY = (float) (pmouseY - mouseY);
fwdBackTrans -= TRANS_INCREMENT * dY;
break;
}
}


void wireCone(float radius, float height, int stepX, int stepY) {
int steps = 10;
stroke(40);
for (int i = 0; i < steps; i++) {
float angle = map(i, 0, steps, 0, TWO_PI);
float x = radius * cos(angle);
float y = radius * sin(angle);
line(x, y, height, 0, 0, 0);
}
noFill();
pushMatrix();
translate(0, 0, height);
ellipseMode(CENTER_RADIUS);
ellipse(0, 0, radius, radius);
popMatrix();
}



// Simple vector class that holds an x,y,z position.

class Tuple {
float x, y, z;

Tuple() { }

Tuple(float x, float y, float z) {
set(x, y, z);
}

void set(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}

void target(Tuple another, float amount) {
float amount1 = 1.0 - amount;
x = x*amount1 + another.x*amount;
y = y*amount1 + another.y*amount;
z = z*amount1 + another.z*amount;
}

void phil() {
fill(x, y, z);
}

void tran() {
translate(x, y, z);
}
}
Scottaculous
lol @ action script being compared to C++

languages worth learning are python, java, c#, c++.
ziptnf
quote:
Originally posted by jupiterone
all that

What the hell is this? Sorry, but OpenGL graphical tests != algorithms.
WhatTF
quote:
Originally posted by Moongoose
If you're just making stuff up along the way you are just wasting the coders time.


I agree, floating specs = fail.

quote:
Originally posted by Moongoose
If you're still feel like taking this on good for you, but forget about delphi and learn either c++ or c#, those are the languages that most of the serious stuff is written in.


I disagree, Delphi is a powerful language. Also when it comes to languages each has their pros and cons and it comes down to personal preference.
tubby
reading all that crap makes me so glad I work in rpg. it really is baby talk as far as languages go, but so nice and simple.
Dervish
Try doing a fixed point infinite impulse digital filter. You'll get some good basic challenges from that.
Joss Weatherby
quote:
Originally posted by T-Soma

Iv spent plenty of time coding AS3 project (some flex) and compared to C++ I find that its somewhat of a fun language, because things usually just work.
No need to worry about tricky compilers or managing memory.


You really need to re-think your mentality on that last bit.

AS3, especially when using the Flex Framework leaks memory like CRAZY.

The garbage collector in FP9 and FP10 is really ty due to the event model in AS3. Even worse Flex implements listeners in a constantly strong situation and uses them with abandon.

Just using their components you can create situations where the event listeners will never be out of scope and the GC will never clean them up. This will cause all of the things tied to it to remain in scope (current targets, etc) and all of their things to remain in scope as well.

If you are not really careful you can have an application that never releases any of its memory!

Beyond that, I agree, AS3 is pretty nice, I actually like most ECMAScript based languages, they are really fun to program with most of the time.

Its just that Flash Player sucks. If AS3 (ECMAScript 3 basically) replaced Javascript I would be happy camper... because it seems like the browser devs, most of them, know how to handle memory in a scripting environment.
T-Soma
I almost forgot about those memory leaks (I don't use flex/components that often) but its all just a matter of removing all references to an object. Which really just means keeping track of all your events in most cases. None the less, I agree with you GC in AS is a problem.
Has anyone noticed that Flash player for IE uses much less memory than Flash player for FF?

Also, I wasn't putting AS3 and C++ directly side by side, I was really just stating the obvious; which is that for some instant gratification higher level languages can be fun.

LeopoldStotch
as much as i like higher level languages, i tend to be more comfortable with lower level languages like C because I feel more comfortable of being responsible of the resource management, compared to having dependence on the PL doing it for me.
Joss Weatherby
quote:
Originally posted by LeopoldStotch
as much as i like higher level languages, i tend to be more comfortable with lower level languages like C because I feel more comfortable of being responsible of the resource management, compared to having dependence on the PL doing it for me.



Same here.

If you are writing pure AS3 with no framework components or any of the halo skinned controls in Flash then its easy to keep track of stuff, but a lot more work to create full fledged applications.

Flex lets you do a lot of common desktop paradigms in Flash, but their code is so piss poor that it just creates a giant cluster- of event listeners.

Even so, there are even low-level Flash internal listeners created by super low level objects like Sprites that you can never get rid of because they are created by the player themselves for internal use.

If you have access to a profiler like in Flex builder its amazing how little code you have to write to get it to start leaking.

The application I am working on suffers in that it never should have been a Flash/Flex app in the first place. The flash player is horribly slow at a lot of common data operations, they even advise that you DONT use arrays! :wtf:
CLICK TO RETURN TO TOP OF PAGE
Pages: 1 2 [3] 4 
Privacy Statement