• What are you working on? v19
    6,590 replies, posted
Anybody up for a game of "Survival" ?
Learning GLSL. Obligatory mandelbrot shader: [img][URL="http://anyhub.net/file/3qg9-mandelbrot.png"][/URL]http://anyhub.net/file/3qg9-mandelbrot.png[/img] [cpp]#version 110 varying vec2 texcoord; void main() { float za = 0.0; float zb = 0.0; float zatemp; int i = 0; while(++i <= 100 && za * za + zb * zb <= 4) { zatemp = za * za - zb * zb + texcoord.x; zb = 2.0 * za * zb + texcoord.y; za = zatemp; } gl_FragColor = vec4(vec3(1 - i / 100.0), 1.0); }[/cpp] [editline]5th July 2011[/editline] This is kinda fun.
So I finally got a job, and part of what I'm doing is programming a report generator through the Crystal Reports API, parsing through some information on a SQL database. But I have about nil experience with the Crystal Reports API, not sure I'll need help learning it, but any tips or links would be nice from people who have had experience programming through the API. Why the funny
I'm fooling around with .obj files before proceeding to the SuperBible texture chapter. Original: [img]http://dl.dropbox.com/u/23989104/obj_3dsmax.png[/img] Mine :v: [img]http://dl.dropbox.com/u/23989104/objloader.png[/img] But it loads surprisingly fast, after I made it process lines as they are read, and not until the whole file is read into the buffer.
[QUOTE=DeadKiller987;30918391]Link to the comic? :D[/QUOTE] It's on my website, which is down, but backed up, on my other computer, which is 400 miles away in my apartment. Sounds like I'm avoiding the question, but it's true :\
[QUOTE=WeltEnSTurm;30921051][img]http://dl.dropbox.com/u/23989104/objloader.png[/img][/QUOTE] Nailed it.
[img]http://dl.dropbox.com/u/23989104/objloader_working.png[/img] How the hell'd I do that
Finished. I can now host and join a server with a player entity for each client, which they can move around and the positions and animations update for the other clients in real time.
[QUOTE=ruarai;30912751]How did the clients get their ID?[/QUOTE] Clients send a packet asking for an ID and the server sends one back.
[QUOTE=WeltEnSTurm;30922766][img]http://dl.dropbox.com/u/23989104/objloader_working.png[/img] How the hell'd I do that[/QUOTE] Haha nice, was it something silly like an off by 1 or wrong primitive type? :P
[QUOTE=Bladezor;30927951]Haha nice, was it something silly like an off by 1 or wrong primitive type? :P[/QUOTE] Obj files use 1-?? as index, and I forgot to substract one after rewriting the loader. And for faces with more than 3 vertices: I add the last 2 vertices again for a "triangle strip" like behavior, but instead of ccw I added them clockwise.
Obj files can also have negative indices, but you don't really have to support that. Anyways, I've been playing some more with OpenCL and of course I wrote a Mandelbrot demo. [quote][img]http://images.overvprojects.nl/Mandelbrot_-_CPU_Single_Thread_-_9_FPS-2011-07-06_02.34.24.png[/img] [img]http://images.overvprojects.nl/Mandelbrot_-_CPU_Multithreaded_-_38_FPS-2011-07-06_02.34.48.png[/img] [img]http://images.overvprojects.nl/Mandelbrot_-_GPU_-_115_FPS-2011-07-06_02.35.04.png[/img][/quote] The cool thing is that all of the three modes use the exact same code, save for a few technical details and OpenCL takes care of the scaling on multi-core processors or compute units on your graphics card. For the two modes that run on the CPU, there is a huge difference between the framerate when zoomed in and when completely zoomed out that doesn't exist when calculating on the GPU. The program uses OpenGL, but only for its glDrawPixels function. (Yes, that function is deprecated.) [url=http://codepad.org/wAJ5DLEA][img]http://images.overvprojects.nl/page_white_code.png[/img] Source code[/url] [url=http://hosting.overvprojects.nl/Mandelbrot.zip][img]http://images.overvprojects.nl/application_xp_terminal.png[/img] Executable[/url]
Overv is king
Off topic: The Boston Globe article on MIT - "[...] But Dorrance, armed with a bachelor's from MIT and a doctorate from University of Gottingen in Germany, found that using less water in the soup gave it a more concentrated flavor." Who would have thought that using [i][b]less water[/b][/i] would result in [i][b]more flavor[/b][/i]? :tinfoil: [editline]6th July 2011[/editline] Certainly not anyone without a bachelor's and a doctorate!
So I was inspired by that guy a few pages back who wrote a program to parse a fp thread for its ratings, and I decided to blatantly copy him, except I would make it better. Have a nice list of each user who posted, how many times they posted, average posts per page, total ratings, total x rating, average x rating per page etc. I hit a little snag because htmlagilitythinger wants me to use XPath, which I have no idea how to use. Could someone write me an xpath query that selects all <li> tags who's class value contains the string 'postcontainer'? The class value is longer than that, so it has to contain it, not be equal to it. I tried this, but it said it was null (I guess that means it didn't find any matches.) [code] li[contains(@class, "postcontainer")] [/code]
I was thinking of picking up C++ ( I am a C# programmer currently ) and I don't really know much about it. The only thing that I do ( maybe ) know is that C++ is a lot more complicated in terms of memory management. Is that kind of stuff hard to pick up coming from a C# programmer?
It's not really that hard to pick up, you just have to keep in mind that when you allocate memory for your objects, you also need to free that memory when you delete the object or exit the program. There are also other stuff, but that sums up the basic part.
i don't really suggest switching over to C++ unless you have a really specific reason, just become an expert with C# :)
[QUOTE=icantread49;30930322]i don't really suggest switching over to C++ unless you have a really specific reason, just become an expert with C# :)[/QUOTE] Well C++ runs natively on Windows ( right? ).
Yep, just like any other OS who have a C++ compiler
[QUOTE=TheCloak;30930473]Well C++ runs natively on Windows ( right? ).[/QUOTE] well now i'm switching to C++
[media]http://www.youtube.com/watch?v=XuTO7PJapsI[/media] Haven't added walking animations yet :3
Actually... scratch what I said earlier. Apperantly if i'm logged out fp won't let me get threads etc. Fuck. Now I need to figure out how to cookies and all that shit.
[QUOTE=thisBrad;30931014][media]http://www.youtube.com/watch?v=XuTO7PJapsI[/media] Haven't added walking animations yet :3[/QUOTE] Very Maplestorish. Good job, though. Where are you going with this project? Got any website?
[QUOTE=TheCloak;30930473]Well C++ runs natively on Windows ( right? ).[/QUOTE] wat C++ doesn't run natively, you'll need the runtime distributable (unless you don't use any of the standard library which is even less of a reason to switch) [editline]6th July 2011[/editline] and the runtime distributable is about as commonly installed as the .NET runtime nowadays (i pulled this out of my ass before anyone asks) so it doesn't even make a difference
[QUOTE=icantread49;30930322]i don't really suggest switching over to C++ unless you have a really specific reason, just become an expert with C# :)[/QUOTE] Broadening one's experience is never a bad idea.
[QUOTE=Wyzard;30932364]Broadening one's experience is never a bad idea.[/QUOTE] jack of all trades, master of none ?
True, I shouldn't say "never" a bad idea because one's available time for learning is finite. But I'd claim that an "expert" who only knows one programming language is not really an expert, because there's such a diverse range of programming concepts out there that if you're only familiar with the ones your chosen language puts in front of you, your problem-solving will be narrow-minded as a result. It's valuable to be able to draw on ideas from a variety of languages, so you can think from different angles to find the best approach to solve a problem. It's also valuable to have some understanding of how the things in a high-level language are typically implemented at a lower level, so that you can make informed decisions about tradeoffs like speed vs. memory. Going from C# to C++ will help with that.
[QUOTE=efeX;30930735]well now i'm switching to C++[/QUOTE] Well I don't know which is why I'm asking
All the OO concepts are the same in C# and C++. The main differences are in resource management: C++ doesn't have garbage collection, and well-written code typically uses [url=http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization]RAII[/url], which is similar to what you get with IDisposable and the "using" keyword in C#, but the way it's done with destructors in C++ is more transparent and (IMO) convenient.
Sorry, you need to Log In to post a reply to this thread.