Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - rain_storm

Pages: 1 2 [3] 4 5 6 7 8 9 10 ... 69
General chat / Re: Art Engine 2012
« on: December 06, 2011 »
? I clicked it and I got this...

Microsoft Internet Explorer limits the potential of the world wide web for its commerial interests. Sorry, but this page will not support it. Please download an alternative browser.

So why not write a website thats compatible with all browsers? It aint that hard. Limiting your user base is a bad idea no matter what the reason.

General chat / Forum Politics
« on: November 23, 2011 »
Thank God this place doesn't dabble in politics.

By politics I mean all that BS that goes with the elitist mentality. You know what I mean, a few popular members with lots of bandwagon supporters. I'm a member of two forums and was unaware of the bitter feud between the two that has been going on for years. At first both forums were the same community but two popular members had a falling out and it caused a huge rift in the community. Now both sides claim the others are jerks. While I'm lurking there and thinking you're both as bad as each other. Bunch of Elitist noobie bashers.

Anyway's I recently befriended two of the popular guys, one from each side. This has stirred up all those bitter feelings once again. Now I have each of them trying to convince me that the other guy can't be trusted. I'm trying my best to stay out of it but it ain't that easy. So now I'm thinking of just walking away from the whole situation.

That got me thinking of this place. There's never been any kind of issues like that here. The Admins and the Moderators have done a bang up job of keeping this community together. I look back at all the years I've been here and I think I can only remember 1 instance of trolling which lasted all of 1 post before it was kicked to the curb.

General chat / Re: Gold stars above people's names
« on: November 16, 2011 »
I remember asking this before
Seems like things have changed a little since then, The admins used to have silver stars back in the day.

General chat / Re: Thank you to Raizor
« on: October 31, 2011 »
Congratulations, Raizor. Great choice indeed!

General chat / Re: Happy Birthday Shockwave!
« on: October 31, 2011 »
Happy Happy Birthday, Shock. Have one for me  :cheers:

General chat / Re: Cool video to voxel HTML demo
« on: October 27, 2011 »
I was using Internet Explorer, seems like Microsoft have no plans to support WebGL, WTF?

Projects / Re: Shaders and Supershapes
« on: October 27, 2011 »
This is very interesting stuff. I am fascinated by supershapes, such a powerful tool to know how to use.

General chat / Re: Cool video to voxel HTML demo
« on: October 27, 2011 »
Could it be that my system doesn't support HTML5? I get similar results as dizphunkt. Here is the error.

Code: [Select]
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET
CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 27 Oct 2011 12:19:07 UTC

Message: Object doesn't support this property or method
Line: 2
Char: 38
Code: 0

C / C++ /C# / Re: Drawing directly to a console
« on: October 20, 2011 »
Very strange. Also this doesn't seem to work when I try it in FASM. I wonder why that is

C / C++ /C# / Drawing directly to a console
« on: October 20, 2011 »
Here's a neat trick I found that allows you to draw directly to a console window (Only tested under XP). This gives you access to a window using only kernel32 and gdi32 no need to link to user32 at all. The trick is to set the console title to a unique string and then get the HWND to the console using FindWindow. I'm interested in seeing if this works on windows7 because win7 requires you to pump the message queue which adds extra function calls.

Code: [Select]
#pragma comment(lib, "kernel32.lib")
#pragma comment(lib, "gdi32.lib")
#undef UNICODE
#undef _UNICODE
#include <windows.h>

const int resx = 256;
const int resy = 256;
int   pixel[resx*resy];
int   t;
HWND  hwnd;
HDC   hdc;
RECT  rc;

void mainCRTStartup(void)
static BITMAPINFO bmi = { sizeof(BITMAPINFOHEADER),0,0,1,32 };
hwnd = FindWindow(NULL, "io");
if (!hwnd) return;
hdc = GetDC(hwnd);
if (!hdc) return;
32,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,PFD_MAIN_PLANE,0,0,0,0 };
static int fmt = ChoosePixelFormat(hdc,&pfd);
if (!fmt) return;
if (!SetPixelFormat(hdc,fmt,&pfd)) return;
while (!GetAsyncKeyState(VK_ESCAPE)) {
for (int y = 0; y < resy; y++) {
for (int x = 0; x < resx; x++) {
pixel[x+y*resx] = (x^y)+t;
GetClientRect(hwnd, &rc);
bmi.bmiHeader.biWidth  = resx;
bmi.bmiHeader.biHeight = resy;

-edit my bad FindWindow requires user32 thought NODEFAULTLIBS was suppose to exclude it apparently it doesn't

Sweet, I'll be giving this a try

Very interesting project. I cant seem to find the assembler or a disassembler, do we have to roll our own?

General chat / Reversing the 6502
« on: October 19, 2011 »
reverse engineering 6502, its illegal opcodes and emulating it at the transistor level,
geek pr0n


Challenges & Competitions / Re: PHENOMENA CHALLENGE
« on: October 15, 2011 »
Brilliant idea for a compo! I'm gonna try my hand at this one :D

General chat / Re: Birthday thread...
« on: October 14, 2011 »
Happy BDay Benny, and a belated one to all those that I missed up there

General chat / Re: at last im now challenging DB.
« on: October 14, 2011 »
Hi inc, and welcome to the board. I'm looking forward to seeing what you can do on the PC.

I think I know what the good doctor is trying to achieve, I've come across similor loss of freedom before. You've solved gimbal lock by forcing all axis to be perpendicular to each other by rotating by an angle then correcting the other axis by applying the crossproduct then normalizing. But now you can no longer rotate one axis freely without it effecting all three? If this is correct then you have not taken maticulous care with exactly which axis you need to correct using the crossproduct.

If you need to rotate only the oriented x axis, it will effect the oriented yz plane. the x axis remains unaffected. so you rotate the y axis conventionally then correct the z axis using crossproduct, finally you normalize z to remove rounding errors. Here is my working code it allows free rotation in yaw, pitch, roll seperately but there is a cost in that you have now lost your euler representation and are working directly in vectors...

Code: [Select]
// the rotation matrix...
float  xx = 1.0f, xy = 0.0f, xz = 0.0f;
float  yx = 0.0f, yy = 1.0f, yz = 0.0f;
float  zx = 0.0f, zy = 0.0f, zz = 1.0f;

// the rotation routine...
bool CameraTransform(float x, float y, float z)
    float cx = cos(x), sx = sin(x);
    float cy = cos(y), sy = sin(y);
    float cz = cos(z), sz = sin(z);
    float pn;
    // rotate x (affects yz) transform y conventionally, normalize, correct z using crossproduct
    yx = yx*cx + zx*sx;
    yy = yy*cx + zy*sx;
    yz = yz*cx + zz*sx;
    pn = 1.0f / sqrt(yx*yx + yy*yy + yz*yz);
    yx *= pn;
    yy *= pn;
    yz *= pn;
    zx = xy*yz - xz*yy;
    zy = xz*yx - xx*yz;
    zz = xx*yy - xy*yx;
    // rotate y (affects zx) transform z conventionally, normalize, correct x using crossproduct
    zx = zx*cy + xx*sy;
    zy = zy*cy + xy*sy;
    zz = zz*cy + xz*sy;
    pn = 1.0f / sqrt(zx*zx + zy*zy + zz*zz);
    zx *= pn;
    zy *= pn;
    zz *= pn;
    xx = yy*zz - yz*zy;
    xy = yz*zx - yx*zz;
    xz = yx*zy - yy*zx;
    // rotate z (affects xy) transform x conventionally, normalize, correct y using crossproduct
    xx = xx*cz + yx*sz;
    xy = xy*cz + yy*sz;
    xz = xz*cz + yz*sz;
    pn = 1.0f / sqrt(xx*xx + xy*xy + xz*xz);
    xx *= pn;
    xy *= pn;
    xz *= pn;
    yx = zy*xz - zz*xy;
    yy = zz*xx - zx*xz;
    yz = zx*xy - zy*xx;
    // to rotate a vertex using this matrix reduces to the following...
    //newx = xx*posx + yx*posy + zx*posz;
    //newy = xy*posx + yy*posy + zy*posz;
    //newz = xz*posx + yz*posy + zz*posz;
    return true;

General coding questions / Re: Sphere deformation
« on: September 26, 2011 »
ALso you should look into Super Shapes created using the Super Formula its very robust and easy to understand

Yabasic / Re: Freecell
« on: September 12, 2011 »
I know Free Cell. it was awesome. a great one to try out after this would be stonemonkeys formula 1 game the listing is available on this forum somewhere.

Yabasic / WireWorld in 13 lines of code
« on: August 17, 2011 »
WireWorld is a cellular automaton that can simulate electronic components such as Logic Gates. And since Logic Gates are the building blocks of CPU's it's no wonder that some geeks have already built a CPU in WireWorld.

Here is a WireWorld simulator written in 13 lines of ps2yabasic source code. With the limitation that every single line of code should fit within the default size of the emulators editor display, colons are allowed to separate statements within a single line. The horizontal scroll bar remains inactive so I don't make use of that final column either. There isn't much wasted space at the end of the lines so you'd be hard pressed to shave off some lines of code.

up,down,left,right = move the cursor
cross = toggle state of the selected cell (from void to wire to tail to head)
triangle,circle,square = run the simulator

Code: [Select]
open window 1,1:data 64,51,10,16,32,64,128,4096,8192,16384,32768
data 255,255,0,0,0,127,127,127,255:dim C(641,513),R(3),G(3),B(3)
read W,H,S,U,R,D,L,T,O,C,Q:for i=1 to 3 read R(i),G(i),B(i) next
0:setdispbuf B:B=1-B:setdrawbuf B:for y=1 to H for x=1 to W     
c=C(x,y):setrgb 1,R(c),G(c),B(c):fill box x*S,y*S,x*S-S,y*S-S   
next next:setrgb 1,99,0,0:box X*S,Y*S,X*S-S,Y*S-S:P=peek("port1")
if(and(P,F)=0)goto 0:dim T(W,H):for y=1 to H for x=1 to W:N=0:   
for v=y-1 to y+1 for u=x-1 to x+1 if(C(u,v)=3)N=N+1 next next:   
T(x,y)=1:if(C(x,y)=0)then T(x,y)=0 elsif(C(x,y)=2)then T(x,y)=1 
elsif(C(x,y)=3)then T(x,y)=2 elsif(N=1 or N=2)then T(x,y)=3 fi   
next next:for y=0 to H for x=0 to W C(x,y)=T(x,y)next next:goto 0

Pages: 1 2 [3] 4 5 6 7 8 9 10 ... 69