jiitype
Guest
|
|
« Reply #540 on: January 30, 2014, 06:19:11 AM » |
|
cubes are hard
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #541 on: January 30, 2014, 10:52:38 AM » |
|
That looks like Second Life.
|
|
|
Logged
|
|
|
|
Noogai03
Level 6
WHOOPWHOOPWHOOPWHOOP
|
|
« Reply #542 on: January 30, 2014, 12:28:23 PM » |
|
That looks like Second Life. most true sentence 2014 winner
|
|
|
Logged
|
So long and thanks for all the pi
|
|
|
Eendhoorn
Level 6
Quak
|
|
« Reply #543 on: February 01, 2014, 07:21:51 PM » |
|
I accidentally made an amazing headbalancing "AI"
|
|
|
Logged
|
|
|
|
Noogai03
Level 6
WHOOPWHOOPWHOOPWHOOP
|
|
« Reply #544 on: February 02, 2014, 05:39:34 AM » |
|
is the other (non ai) guy you? He's just like "hey you're pretty good at balancing that ball it'd be a shame if someone- BAM" *knocks ball off*
also why is it a fail? is it supposed to play basketball?
|
|
|
Logged
|
So long and thanks for all the pi
|
|
|
Eendhoorn
Level 6
Quak
|
|
« Reply #545 on: February 02, 2014, 11:06:55 AM » |
|
is the other (non ai) guy you? He's just like "hey you're pretty good at balancing that ball it'd be a shame if someone- BAM" *knocks ball off*
also why is it a fail? is it supposed to play basketball?
Yeah that was me haha. The thing at the left is a goal, it was supposed to track the ball and hit towards the goal. The hitting never happend and it just kinda sits there wit the ball.
|
|
|
Logged
|
|
|
|
vinterberg
Guest
|
|
« Reply #546 on: February 03, 2014, 06:19:31 PM » |
|
Matrices Gone Wild!
|
|
|
Logged
|
|
|
|
iforce2d
|
|
« Reply #547 on: February 08, 2014, 02:01:31 AM » |
|
|
|
|
Logged
|
|
|
|
Noogai03
Level 6
WHOOPWHOOPWHOOPWHOOP
|
|
« Reply #548 on: February 08, 2014, 05:16:50 AM » |
|
*snip*
haha man, you must practically live in the Box2D testbed with all the stuff you use it for :D
|
|
|
Logged
|
So long and thanks for all the pi
|
|
|
OniWorld
|
|
« Reply #549 on: February 08, 2014, 05:06:36 PM » |
|
Working on converting the old lighting engine into a deferred lighting engine with AGAL... not sure what happened here...
|
|
|
Logged
|
|
|
|
Eendhoorn
Level 6
Quak
|
|
« Reply #550 on: February 15, 2014, 01:34:20 PM » |
|
I'm trying to create an animated wave using math.sin. I don't really get it yet and this came out of it. Looks like a string of DNA being rotated.
|
|
|
Logged
|
|
|
|
kamac
|
|
« Reply #551 on: February 16, 2014, 06:03:40 AM » |
|
I'm trying to create an animated wave using math.sin. I don't really get it yet and this came out of it. Looks like a string of DNA being rotated. I guess that with this amplitude you'd want to either increase the distances between the joints, or not connect them the way you currently do. More like connect those that are below 0 and those that are above 0 with a line.
|
|
|
Logged
|
|
|
|
Lee
Level 1
|
|
« Reply #552 on: February 16, 2014, 01:57:36 PM » |
|
Why use sin at all? You aren't really doing circular motion or using a sine wave, so you could just scale them and get the same effect a lot cheaper. I was able to make this wave using no "advanced" math functions: Using this code: float iterate_wave(float &period, float max_period, float iteration_value, bool &direction) { float offset; if (direction == 0){ offset = (period*period) - (max_period*max_period); period += iteration_value; } else{ offset = -(period*period) + (max_period*max_period); period -= iteration_value; } if (period >= max_period){period = max_period; direction=1;} if (period <=-max_period){period =-max_period; direction=0;} return offset/max_period; } void draw_sinwave_approx(float &i_offset, float amplitude, float iteration_amount, bool &i_direction) { float last=i_offset; float offset = i_offset; bool direction=i_direction; float current=last; for (int n=0;n<200;n++){ current = iterate_wave(offset, amplitude, iteration_amount, direction); Draw_OGLline(n,amplitude+last,(n+1),amplitude+current,colour_white); last=current; } } based on this: EDIT (edit2 thought the gifs were too fast so I lowered the iteration amount and got new gifs): Here by spreading it out a bit and inverting every odd numbered iteration I created something like what you did using my sin free code: and drawing a line from each point to the last gets a smooth wave:
|
|
« Last Edit: February 16, 2014, 07:05:11 PM by Lee »
|
Logged
|
|
|
|
Eendhoorn
Level 6
Quak
|
|
« Reply #553 on: February 16, 2014, 02:40:57 PM » |
|
This is the first time I actually tried to understand why sin does what it does, hence the fail :p But using it in a controlled matter like that is pretty cool.
|
|
|
Logged
|
|
|
|
Lee
Level 1
|
|
« Reply #554 on: February 16, 2014, 05:59:09 PM » |
|
Tried to turn my "sine wave approximation" (if you can call it that) into a circle: For some reason I only drew one iteration of it per frame to start with. Then I got this using two different methods (rightmost is an actual circle that wasn't drawn in the application): It shows how rough of an approximation the previous code is (however for one dimensional movement -vertical or horizontal wave- it's still perfectly fine). EDIT: updated the code on the previous page, while I assume it is faster that using sine it does seem to screw up around the centreline at certain ratios of amplitude to frequency. You can see it as a little step near the middle in this gif at some points:
|
|
« Last Edit: February 16, 2014, 07:18:19 PM by Lee »
|
Logged
|
|
|
|
bonzairob
TIGBaby
|
|
« Reply #555 on: February 17, 2014, 05:59:16 AM » |
|
I'm currently building a pokemon bw style engine in opengl and pygame, here are some fun bugs I've had: Couldn't get a tileset image to draw in a wx pane: Misunderstood the difference between multitexturing and binding separate textures: And the good old fashioned got-the-vertex-buffer-length-wrong
|
|
|
Logged
|
|
|
|
piipu
|
|
« Reply #556 on: February 18, 2014, 02:14:11 AM » |
|
This is what happens when you get curl noise slightly wrong. The yellow particles are supposed to make flames instead of that weird circle thing.
|
|
|
Logged
|
|
|
|
Azure Lazuline
|
|
« Reply #557 on: February 18, 2014, 12:18:42 PM » |
|
dude, keep it!
|
|
|
Logged
|
|
|
|
OniWorld
|
|
« Reply #558 on: February 18, 2014, 12:50:34 PM » |
|
Not really beautiful, but I have no idea what's going on here...
|
|
|
Logged
|
|
|
|
|
|