• What are you working on? May 2012
    2,222 replies, posted
[QUOTE=sarge997;35991617]Hey what are your guys thoughts on Unity 3D?[/QUOTE] Unity 3D is wonderful.
[QUOTE=sarge997;35991617]Hey what are your guys thoughts on Unity 3D?[/QUOTE] I've been using it for a few weeks and it's been great and hasn't given me any issues so far. It's very easy to get started with it and get a simple game up and running quickly. It's what my current project is running on.
This abomination called bootcamp should be banned from earth. Tried to do some Windows coding on the fly today, and guess what? My physics engine couldn't even run 128 boxes on one worker while at home I could easily run like 32k without lag. When in Mac OSX everything does run faster.
I've suffered from an insurmountable programmer's block for the past 5 months, only occasionally programming some mathematical snippets. HELP. I want to develop a game.
[QUOTE=ThePuska;35992267]I've suffered from an insurmountable programmer's block for the past 5 months, only occasionally programming some mathematical snippets. HELP. I want to develop a game.[/QUOTE]do a pong game
[QUOTE=dije;35992260]This abomination called bootcamp should be banned from earth. Tried to do some Windows coding on the fly today, and guess what? My physics engine couldn't even run 128 boxes on one worker while at home I could easily run like 32k without lag. When in Mac OSX everything does run faster.[/QUOTE] bootcamp does not cause performance issues, the problem is somewhere else
Ugly XNA SpriteFont: [IMG]http://i.imgur.com/5PQ9k.png[/IMG] Pretty Nuclex SpriteFont: [IMG]http://i.imgur.com/tccaT.png[/IMG] Nuclex with different settings: [IMG]http://i.imgur.com/nCSOc.png[/IMG] Vote which is better please, [IMG]http://www.facepunch.com/fp/ratings/funny2.png[/IMG] for number 1, [IMG]http://www.facepunch.com/fp/ratings/winner.png[/IMG] for number 2, [IMG]http://www.facepunch.com/fp/ratings/zing.png[/IMG] for number 3.
[QUOTE=dije;35992260]This abomination called bootcamp should be banned from earth. Tried to do some Windows coding on the fly today, and guess what? My physics engine couldn't even run 128 boxes on one worker while at home I could easily run like 32k without lag. When in Mac OSX everything does run faster.[/QUOTE] Did you install the correct, up-to-date drivers? What version of Windows are you using? I have a friend who runs Win7 x64 on Bootcamp and he has no performance issues.
[QUOTE=calzoneman;35992621]Did you install the correct, up-to-date drivers? What version of Windows are you using? I have a friend who runs Win7 x64 on Bootcamp and he has no performance issues.[/QUOTE]The latest from June 2011 when I installed it, have installed graphics drivers later on. Win7 x64 Home Premium also. [editline]17th May 2012[/editline] The graphics is running extremely fine, but the cpu calculations are not. This is C# .NET with OpenTK btw
is it possible to retreive the camera's position and view rotation/direction from just the view matrix? Or would it be easier to just keep track of the position and view direction and just pass that?
[QUOTE=Richy19;35992961]is it possible to retreive the camera's position and view rotation/direction from just the view matrix? Or would it be easier to just keep track of the position and view direction and just pass that?[/QUOTE] Im not sure can you retrieve the direction and the rotation from the view matrix, i would go for keeping track of the position and view direction.
So I learned that the C++ "new" operator is pretty slow. A professor of mine informed me that many game engines write their own memory management system. Naturally, I decided to try to write my own. And C++ being as awesome as it is, you can overwrite the "new" and "delete" operators for your own custom classes. So I made an "Int" class that uses my own memory management and tested it against C++'s "int" using the default memory management. [cpp]float start, stop; Int* X; int* x; start = getCounter(); for (int i = 0; i < BUFFER_SIZE / 4; i++) { X = new Int; if (i % 5 == 0) { delete X; } } for (int i = 0; i < BUFFER_SIZE / (4 * 5); i++) { new Int; } stop = getCounter(); cout << stop - start << endl; start = getCounter(); for (int i = 0; i < BUFFER_SIZE / 4; i++) { x = new int; if (i % 5 == 0) { delete x; } } for (int i = 0; i < BUFFER_SIZE / (4 * 5); i++) { new int; } stop = getCounter(); cout << stop - start << endl;[/cpp] BUFFER_SIZE is defined as 1024 * 1024 * 50, so I'm creating 50MB of int's in both cases. The results: Mine: 0.302s Default: 1.518s The downside to my system is that I'm using more memory than the CPU alone would (speed over memory). Also I have to allocate so much memory right off the bat, and I may allocate more than I need, or not enough (in which case I just need to allocate more in bulk). I might paste the whole source once I verify that it works. Also going to try and do some memory alignment so that it always registers multiples of 4. That way I won't use as much memory as it's using now, and if I understand the CPU properly it might be able to work with the memory a little quicker.
[QUOTE=Richy19;35992961]is it possible to retreive the camera's position and view rotation/direction from just the view matrix? Or would it be easier to just keep track of the position and view direction and just pass that?[/QUOTE] It's better to keep track but you can get the matrix origin by doing something like this: vec3(MV[3][0],MV[3][1],MV[3][2])
Awesome, only took half an hour! [img]http://puu.sh/vfkS[/img] [img]http://puu.sh/vfkx[/img]
Mind sharing?
[QUOTE=HiredK;35993449]It's better to keep track but you can get the matrix origin by doing something like this: vec3(MV[3][0],MV[3][1],MV[3][2])[/QUOTE] You can get the camera's direction axes directly from the view matrix, they're arranged like this (assuming you're using DirectX): [url]http://msdn.microsoft.com/en-us/library/windows/desktop/bb205342%28v=vs.85%29.aspx[/url] However to get the camera position, you'd invert that matrix and [i]then[/i] get the lowest row.
[QUOTE=DarKSunrise;35993520]Mind sharing?[/QUOTE] I posted about it earlier. It's trawling though .cpp and .h files, then it's looking at each #include and making sure the caps on the filename matches the caps of the include.
[QUOTE=Eric95;35991911]Unity 3D is wonderful.[/QUOTE] Only if you have Pro. Free misses out some key features such as render targets and post processing. I wish Pro was free for non-commercial but it isn't.
[QUOTE=garry;35993542]I posted about it earlier. It's trawling though .cpp and .h files, then it's looking at each #include and making sure the caps on the filename matches the caps of the include.[/QUOTE] I think he meant the code.
I aligned the data so that you can only allocate multiples of 4. I also fixed some bugs I hadn't noticed before. Creating 50MB of ints, deleting 10MB and re-allocating that 10MB using mine is about .1309s and all on the CPU is about 1.4s. ief104, what are you disagreeing with exactly? I'd like to know if I'm doing/assuming something incorrectly.
[quote]Obama: Afghanistan Afghanistan Clooney's LA home Reno Hollande: Turkey Elysee Merkel's office[/quote] Scraped this info from Google News, it's pretty simple. Now I'm going to check with Geonames to check if the place listed is real, grab it's location, etc. I'm going to be doing a lot of general information grabbing stuff with this. [editline]17th May 2012[/editline] Suggest famous people to try this with please so i can improve it :)
Now that my minds of a more stable condition, I'm actually thinking about starting a bit of a project. But before I begin, I figure I could get some decent opinions here: I'd prefer to avoid direct DirectX/OpenGLALCLetc. for my first foray from C into C++, and use some sort of media library instead. The two I'm aware of right now are SFML and SDL, although I think I recall seeing a few others posted in here. Not sure how well diving into C++ will work out for me, but I've got a few ideas tossed about in my head. So my question was this: What would be a good skeleton/library/etc. for media systems? That is, graphics rendering, audio handling, and control methods, and possibly handling image input (otherwise I might just deal with libpng a bit).
Let me clean it up a bit, and I will. Just running it on stuff. Okay includes are includes that it can find, and the caps match Replaced includes are includes that it can find, and the caps didn't match - so it edited the file Ambiguous includes are includes it found - but it found multiples (it doesn't do anything clever here) Unknown includes are includes that it couldn't find a match for (might be windows.h, math.h etc) Holly: [img]http://puu.sh/vfOh[/img] GWEN: [img]http://puu.sh/vfPF[/img] BOOTIL: [img]http://puu.sh/vfR3[/img] GMOD/Source Engine: [img]http://puu.sh/vfTs[/img] (there's so many because Valve changed names of files in perforce, and I added them to subversion - which doesn't handle caps changes well (or at all)) Program is here: [url]http://puu.sh/vfUw[/url] Just put it in the root folder of your source code and run it. [editline]17th May 2012[/editline] Code is here: [url]http://codepad.org/oyUAdrqv[/url]
[QUOTE=SteveUK;35993914]Only if you have Pro. Free misses out some key features such as render targets and post processing. I wish Pro was free for non-commercial but it isn't.[/QUOTE] I think I got the Pro version for free once. I have a serial for Unity3d 3.x in my email inbox from their store anyway and I don't remember spending a dime I should cash in on that if it is pro [editline]17th May 2012[/editline] Nevermind, it's just a free iOS/Android license.
[QUOTE=garry;35990038]Weird question, does anyone know of a tool I can run on my code that will scan #include's and automatically correct the caps on them?[/QUOTE] -snip- too late
[QUOTE=Richy19;35990173]Just wondering, why do this yourself and not just use GL_CULL_FACE?[/QUOTE] Faces have to be transformed before they can be culled; the hardware determines the vertex winding in screen space. If you have millions of vertices, the transformation that takes place before the faces can be culled becomes a significant part of your frame time, so it's useful to be able to cull a load of faces before they're even pushed through the vertex shader. [editline]17th May 2012[/editline] I'm still using GL_CULL_FACE, but this is a way of reducing the number vertices before they're even transformed. It does mean more batches and more binds, but the (still large) size of the batches and the vertex savings should more than make up for that. [editline]17th May 2012[/editline] [QUOTE=Richy19;35992961]is it possible to retreive the camera's position and view rotation/direction from just the view matrix? Or would it be easier to just keep track of the position and view direction and just pass that?[/QUOTE] There's probably a tidier way to do this, but try multiplying the vectors (0, 0, 0, 1) and (0, 0, -1, 1) by the matrix. The first one will tell you where the origin gets moved to by the matrix, the second minus the first should give you the view direction, and the distance between them should give you any scale factor (if it's uniform across the axes). You can then do some simple trig on the difference vector to get the angles back out. Yeah, it would be easier to just keep track of them though :v: [editline]17th May 2012[/editline] Actually you'd want to use the camera matrix's inverse. Whoops. Seriously though, don't do that.
I'm having problems with my raytracer and conic perspective, anyone with some experience care to help me out? Here is how it looks with orthographic, and it's proper (I guess): [IMG]http://i.imgur.com/DnaqY.png[/IMG] But then I change the perspective to conic and all goes to hell: [IMG]http://i.imgur.com/eW1gO.png[/IMG] The source is at [URL="https://github.com/ritave/Talent-Raytracer"]Github[/URL] I think ray creating part is wrong, because... Well - I don't even know what else could cause such results. Maybe useful snippets: [URL="https://github.com/ritave/Talent-Raytracer/blob/master/src/main.cpp"]main.cpp[/URL] [code] ... Camera c; c.pos=Vector(0,0,-1); c.view_plane=Vector(0,0,0); c.width=500; c.height=500; ... [/code] [URL="https://github.com/ritave/Talent-Raytracer/blob/master/src/Render.cpp"]Render.cpp[/URL] [code]Ray Render::GetEyeRay(int x, int y, Camera &c) { Ray r; ... } else if (c.perspective==Conic) { r.pos=c.pos; r.dir.x=x-c.height/2; r.dir.y=y-c.width/2; r.dir.z=c.view_plane.z; r.dir=r.dir-c.pos; r.dir=UnitV(r.dir); } return r; }[/code]
[QUOTE=garry;35993542]I posted about it earlier. It's trawling though .cpp and .h files, then it's looking at each #include and making sure the caps on the filename matches the caps of the include.[/QUOTE] Ah, C++, the magical language in which you must include headers inside headers. I've heard it's Xzibit's favourite language.
[QUOTE=SteveUK;35993914]Only if you have Pro. Free misses out some key features such as render targets and post processing. I wish Pro was free for non-commercial but it isn't.[/QUOTE] Those are cool features, but they aren't necessary to make most games which have budgets that aren't big enough for the pro license.
[QUOTE=ShaunOfTheLive;35995057]Ah, C++, the magical language in which you must include headers inside headers.[/QUOTE] You don't actually have to do that if you do some trickery such as forward declaring classes.
Sorry, you need to Log In to post a reply to this thread.