• What are you working on? v19
    6,590 replies, posted
[QUOTE=danharibo;31980123]There's no way to do that, you'd just have to keep trying till you got a collision.[/QUOTE] I'll end up just reading the crc32 from a file and use the rest for comparison.
Iirc there was a submission in the iocc that could do that, map [editline]28th August 2011[/editline] [QUOTE=Map in a box;31979994]Make the stars wrap across the screen so they cant go in hiding [editline]27th August 2011[/editline] Needs more randomness too [editline]27th August 2011[/editline] And not to randomly vanish[/QUOTE] Thats planned, the next is a simple layout issue, and the third was explained before. Though ive already taken it out because it was awful
Well i just started programming a couple of days ago (VB) Whipped up this as my first program [media]http://www.youtube.com/watch?v=tVhycLuZxX8[/media] Excuse the shitty hypercam
[QUOTE=Maksim;31980658]Well i just started programming a couple of days ago (VB) Whipped up this as my first program [media]http://www.youtube.com/watch?v=tVhycLuZxX8[/media] Excuse the shitty hypercam[/QUOTE] 2000x better than any VB program I've seen. Although the sounds are earrape to a point.(but i believe thats hypercam)
[QUOTE=Map in a box;31980697]2000x better than any VB program I've seen. Although the sounds are earrape to a point.(but i believe thats hypercam)[/QUOTE] Yea, it sounded weird after recording, and thanks
So instead of going to sleep, I decided to implement some multiprocessing features. [img]http://i.imgur.com/vCjb3.png[/img]
[QUOTE=polkm;31979986]Did you have to load the shader functions via wglGetProcAddress?[/QUOTE] [IMG]http://dl.dropbox.com/u/8508508/My%20First%20OpenGL%20Shape%20Prototypes.png[/IMG] [IMG]http://dl.dropbox.com/u/8508508/My%20First%20OpenGL%20Shape%20Definations.png[/IMG] Ignore the glDrawRangeElements, I forgot to remove it since I didn't use it. [editline]27th August 2011[/editline] It was a pain to write all of that [editline]27th August 2011[/editline] More Success! A colored cube this time. :dance: However, can someone tell me why I didn't have to enable depth buffer? It seems that the depth buffer is enabled already and if I do: [cpp] glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); [/cpp] it draws nothing instead. Does it have to do with the context setup that was done in open.gl that enabled depth testing or am I crazy? [img]http://dl.dropbox.com/u/8508508/OGL%20Cube.png[/img] [editline]27th August 2011[/editline] Never mind, I just had to clear the depth buffer. However, how come depth testing is still enabled without me enabling it? (Or am I just lucky in drawing it in the right order)
Just found out today that you can document exceptions thrown (C#) using /// <exception cref="ExceptionType">Information here</exception> and there is intellisense for the xml comments. I really need to look into the features of VS. I also never knew that you could type a method call and have intellisense create the definition (ctrl + k, m). Bah, I also need to configure my hotkeys for some common tasks I do.
placeholder graphics, BUT! progress [img]http://i.imgur.com/KZwdq.png[/img]
[QUOTE=Map in a box;31980033]How would you append the hash of a file to a file without changing the hash it already has? Cause: CRC32 a file, prepend it. Oh no because you did that the crc32 changes. Might as well do this til the end of time![/QUOTE] One solution is to reserve a set amount of bytes at the start of the file for a hash. When calculating the hash, disregard the space dedicated to hash storage.
nothing better than coding a replay system at 2:03 AM with irene knocking on my window :v:
[QUOTE=icantread49;31983285]nothing better than coding a replay system at 2:03 AM with irene knocking on my window :v:[/QUOTE] I had to evacuate my house for Irene :(
[QUOTE=icantread49;31983285]nothing better than coding a replay system at 2:03 AM with irene knocking on my window :v:[/QUOTE] [QUOTE=Jawalt;31983315]I had to evacuate my house for Irene :([/QUOTE] I was about to ask who this Irene person was that you both knew, luckily I remembered. I'm trying to write a gui for a basic ciphering program in C++ with Qt, but Qt's scaling system is being a complete pain in the ass and is making a label take up 50% of this vertical layout.
hm, coding at 2am is not very good, i ended up with an array of pointers to arrays of pointers to structs
[QUOTE=icantread49;31983555]hm, coding at 2am is not very good, i ended up with an array of pointers to arrays of pointers to structs[/QUOTE] INCEPTION.
[QUOTE=icantread49;31983555]hm, coding at 2am is not very good, i ended up with an array of pointers to arrays of pointers to structs[/QUOTE]I've found that coding at 2am is either my golden zone, where I manage to write code that works in one try, or my bad zone, where I open the file the next day and wonder who pounded their buttcheeks on my keyboard to produce such code
math
Anyone know of any good voxel tutorials for XNA?
[QUOTE=Quark:;31983596]I've found that coding at 2am is either my golden zone, where I manage to write code that works in one try, or my bad zone, where I open the file the next day and wonder who pounded their buttcheeks on my keyboard to produce such code[/QUOTE] hm [cpp] #ifndef REPLAYSTATE_H #define REPLAYSTATE_H #include "Vector2.h" #include "ArrayUtil.h" class ReplayState { public: Vector2 Position; float Rotation; std::vector<Vector2> Points; }; typedef std::vector<ReplayState*> ReplayStateList; typedef std::vector<ReplayStateList*> FrameList; void DestroyReplayStateList(ReplayStateList& list); void DestroyFrameList(FrameList& list); float GetReplayFrameInterval(); #endif [/cpp] yup, appears to be the latter
[QUOTE=bobthe2lol;31978737]Speaking of big bangs, I have a question. I know this isn't really programming, but w/e. Theoretically, in a really long-ass time from now, wouldn't the gravity of everything in the universe draw everything in the universe into a single point? This point would be infinitely small, and would contain all the matter and energy in the universe. Since it contains all that in a single point, wouldn't that mean that when it exploded, it would explode in a predictable way? And doesn't that mean that I have typed this many times in the past, and will type it infinite times in the future? Wouldn't the universe expand because of the force of the big bang, then contract to a single point, then expand...ad infinitum? Sorry if that doesn't make sense...[/QUOTE] Not necessarily, and here's why: Acceleration is the derivative of velocity with respect to time, and gravitational acceleration is inversely proportional to the square of the distance. c0 is a constant that encompasses the mass of the attractor, the gravitational constant and the direction of the acceleration (in its sign). They don't really matter. [img]http://latex.codecogs.com/gif.latex?a%20=%20\frac{\mathrm{d}v%20}{\mathrm{d}%20t}%20=%20\frac{c_0}{x^2}[/img] We can apply the chain rule: [img]http://latex.codecogs.com/gif.latex?\frac{\mathrm{d}v%20}{\mathrm{d}%20t}%20=%20\frac{\mathrm{d}%20v}{\mathrm{d}%20x}%20\cdot%20\frac{\mathrm{d}%20x}{\mathrm{d}%20t}[/img] And since velocity is the derivative of position with respect to time: [img]http://latex.codecogs.com/gif.latex?v%20=%20\frac{\mathrm{d}%20x}{\mathrm{d}%20t}[/img] We get: [img]http://latex.codecogs.com/gif.latex?\frac{c_0}{x^2}%20=%20\frac{\mathrm{d}%20v}{\mathrm{d}%20x}%20\cdot%20v[/img] [img]http://latex.codecogs.com/gif.latex?\frac{c_0}{x^2}%20\mathrm{d}x%20=%20v%20\mathrm{d}v[/img] [img]http://latex.codecogs.com/gif.latex?\large%20\int_{x_0}^{x(t)}%20{\frac{c_0}{x^2}%20\mathrm{d}x}%20=%20\int_{v_0}^{v(t)}{v%20\mathrm{d}v}[/img] [img]http://latex.codecogs.com/gif.latex?-\frac{c_0}{x(t)}+\frac{c_0}{x_0}%20=%20{1\over2}v(t)^2%20-%20{1\over2}{v_0}^2[/img] If we try to let time go to infinity [img]http://latex.codecogs.com/gif.latex?t\rightarrow%20\infty[/img] We let velocity decrease to zero at infinite time [img]http://latex.codecogs.com/gif.latex?v(t)%20\rightarrow%200[/img] And assume that position goes to infinity at infinite time [img]http://latex.codecogs.com/gif.latex?x(t)%20\rightarrow%20\infty[/img] This equation gives us [img]http://latex.codecogs.com/gif.latex?\frac{c_0}{x_0}%20=%20-{1\over2}{v_0}^2[/img] I.e. [img]http://latex.codecogs.com/gif.latex?v_0%20=%20\sqrt{\frac{-2c_0}{x_0}}[/img] Which is a completely valid solution. It means that there exists an initial velocity that allows an object to escape to infinity from gravitational acceleration with a real-valued velocity. Note that c0's sign must be negative, i.e. gravitational acceleration must occur against the initial velocity. edit: [b]Throw something hard enough and it won't fall back[/b]
Facepunch needs a mathml bbcode
[QUOTE=ThePuska;31983722]<math snip>[/QUOTE] My new goal in life is the throw something hard enough that it doesn't come back down
[QUOTE=Chris220;31983968]My new goal in life is the throw something hard enough that it doesn't come back down[/QUOTE] 25,000 miles per hour! Annnndd go!
[QUOTE=Chris220;31983968]My new goal in life is the throw something hard enough that it doesn't come back down[/QUOTE] That's what she said.
[QUOTE=Mikolah;31984434]That's what she said.[/QUOTE] [img]http://www.facepunch.com/fp/emoot/psyduck.gif[/img]
[QUOTE=ThePuska;31983722][B]Maths snip[/B][/QUOTE] Maths dickwaving, tbh. You could've just summed that entire post into your edit.
[IMG]http://localhostr.com/files/VODadq9/Deferred%20Rendering.png[/IMG] :ohdear: frametime seems to peek when I take a screenshot. A bunch of boiler-plate code and I've got my own material, model, and texture formats that fit nicely into my content pipeline (I use Assimp to convert to my own format). Ignore the programmer art. I just need to add a normal map to the barrel and I can implement my gbuffer. [URL="http://localhostr.com/files/hgmqyym/nrocketst2.zip"]Here[/URL] is a little demo testing Engine::Gamestates, Graphics::SpriteBatch and UI::TextBatch.
[QUOTE=DevBug;31984719][IMG]http://localhostr.com/files/VODadq9/Deferred%20Rendering.png[/IMG] :ohdear: frametime seems to peek when I take a screenshot. A bunch of boiler-plate code and I've got my own material, model, and texture formats that fit nicely into my content pipeline (I use Assimp to convert to my own format). Ignore the programmer art. I just need to add a normal map to the barrel and I can implement my gbuffer. [URL="http://localhostr.com/files/hgmqyym/nrocketst2.zip"]Here[/URL] is a little demo testing Engine::Gamestates, Graphics::SpriteBatch and UI::TextBatch.[/QUOTE] My AV launches into a practical defcon 6 when accessing that site, are you sure it's safe?
[QUOTE=awfa3;31981129][IMG]http://dl.dropbox.com/u/8508508/My%20First%20OpenGL%20Shape%20Definations.png[/IMG][/QUOTE] [cpp]#define WGL_GET_PROC_ADDRESS(func) func = reinterpret_cast<decltype(func)>(wglGetProcAddress(#func))[/cpp]
[QUOTE=Mr. Smartass;31984817]My AV launches into a practical defcon 6 when accessing that site, are you sure it's safe?[/QUOTE] Does it for a friend too, a few bad apples spoiled the bunch, the tree being localhostr. I could mirror it for you.
Sorry, you need to Log In to post a reply to this thread.