• What are you working on? V2
    2,001 replies, posted
WTF, we're talking about a usable GUI here. [editline]10:18AM[/editline] [img]http://imgkk.com/i/awpl_D.png[/img] Well, mouse events seem to be half-working. Still trying to figure out how Qt wants keyboard events :/
Working on a lighting shader based on a tutorial. Unfortunately the tutorial gives me a flashlight like lighting instead of a 'sun' like light that emits from a position. Anyone has any idea? Code: [code] // Lighting VS_OUTPUT VS(float3 Pos : POSITION, float3 Norm : NORMAL, float2 Tex : TEXCOORD0) { VS_OUTPUT Out = (VS_OUTPUT)0; float3 L = -lightDir; float4x4 WorldView = mul(World, View); float3 P = mul(float4(Pos, 1), (float4x3)WorldView); // position (view space) float3 N = normalize(mul(Norm, (float3x3)WorldView)); // normal (view space) float3 R = normalize(2 * dot(N, L) * N - L); // reflection vector (view space) float3 V = -normalize(P); // view direction (view space) Out.Pos = mul(float4(P, 1), Projection); // position (projected) Out.Diff = I_a * k_a + I_d * k_d * max(0, dot(N, L)); // diffuse + ambient Out.Spec = I_s * k_s * pow(max(0, dot(R, V)), n/4); // specular Out.Tex = Tex; return Out; } [/code] Result: [media]http://www.youtube.com/watch?v=dH0tk_kkqKM[/media]
[img]http://imgkk.com/i/1GghBt.png[/img] Stupid Qt event injection is giving me trouble...
[QUOTE=nullsquared;16306249][img]http://imgkk.com/i/1GghBt.png[/img] Stupid Qt event injection is giving me trouble...[/QUOTE] So basically just putting in a text box doesn't let you type in it? You have to figure out what keys are being pressed and print a character to the screen? The sucks. :v:
Just a question, though, how's the theming done? I doubt you have access to a theming engine (Qt does that for the Aqua/Luna look (context)), is this a built-in theme?
[QUOTE=PvtCupcakes;16306298]So basically just putting in a text box doesn't let you type in it? You have to figure out what keys are being pressed and print a character to the screen? The sucks. :v:[/QUOTE] No. Qt wants to be your all-in-one solution. If you want to use Qt as a GUI, Qt will want to be your window manager as well as input manager. However, I don't want that. I want to use the Qt GUI as a stand-alone thing, using my own input system/windowing system/etc. Therefore, not only do I need to render Qt to a texture, but I need to inject "fake" events manually (for example, when my input system seems a key press, I need to simulate this for Qt so the text box works). [editline]12:33PM[/editline] [QUOTE=HubmaN;16306371]Just a question, though, how's the theming done? I doubt you have access to a theming engine (Qt does that for the Aqua/Luna look), is this a built-in theme?[/QUOTE] Qt, by default, renders via whatever theme you're currently using. Here's what happens when I switch to Luna: [img]http://imgkk.com/i/qy_VVx.png[/img]
[QUOTE=Overv;16301866]Yes, I'm using Box2D. It's easy to use, fast and it has pretty much all the features of Havok, but in 2D as far as I can tell. Now, yesterday I coded sliders and a GUI which can actually do something: [url=http://hosting.overvprojects.nl/download.php]Here[/url]'s a link for you to try out.[/QUOTE] Wow that's awesome. Can't wait until it's done. :0
[QUOTE=Klownox;16296863]I'm working on a calculator, currently it's only in console: I'm going to start to adapt a GUI tomorrow. [url]http://www.2shared.com/file/6861733/24fc0e49/EZ-calc.html?[/url] There's a download if anyone wants to check it out(c/c welcome) Here's the source: [/QUOTE] I think you could add some floats in division part.
[QUOTE=Siduron;16305371]Working on a lighting shader based on a tutorial. Unfortunately the tutorial gives me a flashlight like lighting instead of a 'sun' like light that emits from a position. Anyone has any idea? Code: [code] // Lighting VS_OUTPUT VS(float3 Pos : POSITION, float3 Norm : NORMAL, float2 Tex : TEXCOORD0) { VS_OUTPUT Out = (VS_OUTPUT)0; float3 L = -lightDir; float4x4 WorldView = mul(World, View); float3 P = mul(float4(Pos, 1), (float4x3)WorldView); // position (view space) float3 N = normalize(mul(Norm, (float3x3)WorldView)); // normal (view space) float3 R = normalize(2 * dot(N, L) * N - L); // reflection vector (view space) float3 V = -normalize(P); // view direction (view space) Out.Pos = mul(float4(P, 1), Projection); // position (projected) Out.Diff = I_a * k_a + I_d * k_d * max(0, dot(N, L)); // diffuse + ambient Out.Spec = I_s * k_s * pow(max(0, dot(R, V)), n/4); // specular Out.Tex = Tex; return Out; } [/code] Result: [media]http://www.youtube.com/watch?v=dH0tk_kkqKM[/media][/QUOTE] If you're just going to light terrain, you could do a similar thing to what [url=http://www.shamusyoung.com/twentysidedtale/?p=146]this guy is doing[/url]
[QUOTE=Guru-guru;16297866]Wow haha.. Do I know you or did you guess the link? EDIT: Can you make a gif of the explosion and the woman drowning. Here is the link so anyone can play it [url]http://davidjokinen.com/test.php[/url][/QUOTE] 2 thumbs up [URL=http://img21.imageshack.us/i/2thumbs.png/][IMG]http://img21.imageshack.us/img21/2223/2thumbs.png[/IMG][/URL]
[QUOTE=HubmaN;16306371]Just a question, though, how's the theming done? I doubt you have access to a theming engine (Qt does that for the Aqua/Luna look (context)), is this a built-in theme?[/QUOTE] Actually it seems I [b]do[/b] have access to a theming engine. [img]http://imgkk.com/i/gFhrBZ.png[/img] [code] qtApp.setStyle(new QPlastiqueStyle); [/code]
Plastique's a theme from KDE.
[QUOTE=HubmaN;16309276]Plastique's a theme from KDE.[/QUOTE] Yeah, and Qt is rendering it in my Windows-classic window.
I'm working on my own Webcam motion detection program. It tracks coloured markers on the camera input, and I'm going to make it into a server-like program which communicates with local sockets - sending queued events to any connected clients via TCP. I'm planning on doing a GMod client-end for it, meaning I can use real props to do shit in GMod... I like that idea :D Right now I'm working on the maths, and figuring out how I can speed it up. Right now it tracks red and blue markers, although it can have some difficulty wirh this when the room is dark or the camera's colour balance is fucked. However, it seems to do the following quite well: - Track red and blue markers (but only one of each right now for testing purposes) - Measure the distance/size of said markers (closer to the screen/bigger in size means higher 'distance' integer values) - Measure the angle between a red & blue marker, if one of each appears on screen - allowing for simple gestures etc. - except the math is fucked for that so it only measures up to 45 degrees in any direction, and right now 'straight up' is not 0/360 degrees. I've worked on it a total of about 2 days, so I'm quite pleased with the progress I've made with it. I barely use Python, so to hack up the program I have so far is satisfying. I have no screens or sourcecode right now because I'm on holiday, and aren't even working on it right now. Just felt like mentioning it ;p
I'm trying to include [b]cross-platform[/b] console-clearing in my calculator. here's my code: [cpp] #include <iostream> #include <cstdlib> #include <windows.h> void clearConsole() { #ifdef _WIN32 COORD coordScreen = { 0, 0 }; DWORD cCharsWritten; DWORD dwConSize; HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(hCon, &csbi); dwConSize = csbi.dwSize.X * csbi.dwSize.Y; FillConsoleOutputCharacterA(hCon, cast(TCHAR)' ', dwConSize, coordScreen, &cCharsWritten); GetConsoleScreenBufferInfo(hCon, &csbi); FillConsoleOutputAttribute(hCon, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten); SetConsoleCursorPosition(hCon, coordScreen); #else cout << "\033[2J"; #endif } [/cpp] Here are the errors: [code] C:\Documents and Settings\Skeletor\My Documents\EZcalc\clear.h||In function `void clearConsole()':| C:\Documents and Settings\Skeletor\My Documents\EZcalc\clear.h|17|error: expected primary-expression before ')' token| C:\Documents and Settings\Skeletor\My Documents\EZcalc\clear.h|17|error: `cast' was not declared in this scope| C:\Documents and Settings\Skeletor\My Documents\EZcalc\clear.h|17|warning: unused variable 'cast'| ||=== Build finished: 2 errors, 1 warnings ===| [/code] How would I fix this? I would like some help from ja_cop, if possible(seeing as he wrote the script)
Sorry, remove the "cast" on that line. I had originally written the snippet in D, which requires the cast keyword for C style casts. The rest should be compatible.
Thanks, it works.
Also you forgot std::cout.
ah, good eye gparent.
Well, after working on web based probramming all this time, I've decided to start on some Win32 programming, working on some kind of STALKER clone, albeit in console, since I'm just getting into C++. I got suits working :D That's it.
[QUOTE=TehDoomCat;16310340]- Measure the angle between a red & blue marker, if one of each appears on screen - allowing for simple gestures etc. - except the math is fucked for that so it only measures up to 45 degrees in any direction, and right now 'straight up' is not 0/360 degrees.[/QUOTE] Atan2 will give you the angle between (0,0) and a point, so Atan2(x1-x2,y1-y2) will give the angle between the two points between -Pi and Pi radians. Atan2(1,1) and Atan2(-1,1) both return Pi/4 but Atan2(-1,-1) will return (-3/4)Pi. You could modify this output to suit your needs, depending on whether you want the ouput to be from 0 to 2Pi clockwise or the smallest angle regardless of direction or sign. If x is 0, the function will return an error but take the answer as Pi.
[IMG]http://i31.tinypic.com/wit2t3.jpg[/IMG] My zombie shooter without zombies. But it has guns (and GORE) which you can't really see from the pic. Go ahead and play around with what I have so far: [B][url=http://www.mediafire.com/?x33mogcujmz]Download[/url][/B] Use WASD to move and mouse to shoot. Press 1 for machine gun, 2 for shotgun.
A simple program that saves My temps from HWmonitor every hour (or what ever interval i set it to) It probably exists already, and is easy as hell, but it's a learning experience, and i need it, because my computer has been overheating a bit lately
[QUOTE=proboardslol;16316405]A simple program that saves My temps from HWmonitor every hour (or what ever interval i set it to) It probably exists already, and is easy as hell, but it's a learning experience, and i need it, because my computer has been overheating a bit lately[/QUOTE] How did you capture the values from HWMonitor?
Randomness [IMG]http://i26.tinypic.com/2hds3uu.jpg[/IMG]
[QUOTE=bigdoggie;16316768]How did you capture the values from HWMonitor?[/QUOTE] It has a built in function that lets you save your temps as a txt crtl S [editline]09:36PM[/editline] [QUOTE=Spartan117;16317714]Randomness [IMG]http://i26.tinypic.com/2hds3uu.jpg[/IMG][/QUOTE] Did you add the ability to die? because if so, that could be a pretty cool version of geometry wars
[QUOTE=Overv;16301866]A learning experience, something to show what I can do and a fun 2d physics sandbox with multiplayer and scripting possibilities. Yes, I'm using Box2D. It's easy to use, fast and it has pretty much all the features of Havok, but in 2D as far as I can tell. Now, yesterday I coded sliders and a GUI which can actually do something: [img]http://i28.tinypic.com/2diewl1.jpg[/img] [url=http://hosting.overvprojects.nl/download.php]Here[/url]'s a link for you to try out.[/QUOTE] "the program can't start because d3dx9_39.dll is missing from your computer. try reinstalling the program to fix this problem" googled and couldn't find anywhere to fix this. not gonna download some random .dll What' going on with this?
[QUOTE=proboardslol;16318119]It has a built in function that lets you save your temps as a txt crtl S [editline]09:36PM[/editline] Did you add the ability to die? because if so, that could be a pretty cool version of geometry wars[/QUOTE] Not yet, I'm not totally sure how I want the gameplay to be like yet.
[QUOTE=Spartan117;16318179]Not yet, I'm not totally sure how I want the gameplay to be like yet.[/QUOTE] Well, it's lookin good so far!
[QUOTE=Benji;16318169]"the program can't start because d3dx9_39.dll is missing from your computer. try reinstalling the program to fix this problem" googled and couldn't find anywhere to fix this. not gonna download some random .dll What' going on with this?[/QUOTE] I think you need the DirectX redist
Sorry, you need to Log In to post a reply to this thread.