• What are you working on? v15
    5,001 replies, posted
[url]http://dl.dropbox.com/u/9317774/Bin.rar[/url] There. Mushrooms Its not a screensaver yet, but that shouldnt be massively difficult
Did anyone say perlin noise? [img]http://anyhub.net/file/1ubH-gg.png[/img]
[QUOTE=Dlaor-guy;27439571]Did anyone say perlin noise? [img_thumb]http://anyhub.net/file/1ubH-gg.png[/img_thumb][/QUOTE] :eng99: You win.
[img]http://www.createagif.net/actual/3743201_CreateAgif.gif[/img] texture animations! takes animation speed, and unlimited frames that check if they have already been loaded before in another texture.
[hd]http://www.youtube.com/watch?v=iqxJSAOywE0[/hd] Who else likes the sentry (sound)?
-snip-
I got tired of always having to manually enter all the texture coordinates for my Minecraft stuff, so I finally made a GUI to do it. It's loading everything from the local Minecraft installation and saves to a binary config file. [IMG_thumb]http://i51.tinypic.com/2a5do4n.png[/IMG_thumb]
I finally got opengl working on my windows machine, now I'll have to join in on the perlin noise bandwagon :ohdear:
I wrote a simple C++ program that removes comments and unneeded whitespace from Lua source files. For example, the [url=http://www.lua.org/cgi-bin/demo?bisect][u]bisection example[/u][/url] on lua.org becomes: [code] delta=1e-6 function bisect(f,a,b,fa,fb)local c=(a+b)/2 io.write(n," c=",c," a=",a," b=",b,"\n")if c==a or c==b or math.abs(a-b)<delta then return c,b-a end n=n+1 local fc=f(c)if fa*fc<0 then return bisect(f,a,c,fa,fc)else return bisect(f,c,b,fc,fb)end end function solve(f,a,b)n=0 local z,e=bisect(f,a,b,f(a),f(b))io.write(string.format("after %d steps, root is %.17g with error %.1e, f=%.1e\n",n,z,e,f(z)))end function f(x)return x*x*x-x-1 end solve(f,1,2)[/code] The size of the main file of my admin mod for Garry's Mod would go from 38 kB to 27 kB with this.
[QUOTE=Overv;27441981] The size of the main file of my admin mod for Garry's Mod went from 38 kB to 27 kB with this.[/QUOTE] So you got rid of 11 kB at the cost of making editing/debugging/error reporting impossible. What for?
Working on generating 3D maps with my perlin noise creator using openGL so far i have [img_thumb]http://img146.imageshack.us/img146/3766/sfdfe.png[/img_thumb] The colours are rubish as im drawing each bit of the map as a GL_QUAD and the giving each verticy its respective colour, however whats in the quad gets coloured as the transition colors of the verticies not like the actual image its self Once this is done i could eventually make a game out of it that would have a diffrent level each time you played
[QUOTE=jA_cOp;27442908]So you got rid of 11 kB at the cost of making editing/debugging/error reporting impossible. What for?[/QUOTE] I didn't replace the source, I just showed what the difference it can make is.
Quick Question: Who was the person that made a simple colored text library? I would like to take a look at it.
Chandler.
[QUOTE=DuCT;27444087]Quick Question: Who was the person that made a simple colored text library? I would like to take a look at it.[/QUOTE] Chandler posted one for C++ using C++ streams. I think it worked for Windows and ANSI-enabled terminals. edit: :ninja:
[QUOTE=DuCT;27444087]Quick Question: Who was the person that made a simple colored text library? I would like to take a look at it.[/QUOTE] This? [url]https://github.com/mnmlstc/hue[/url] (double) Ninja'd, kinda. But at least I have a link.
Yes, that was the one. Thank you, all 3 of you.
Just finished the last of a bunch of bugfixes for my garbage collector. Valgrind is reporting no memory leaks. Just need to clean up the code, fix all the //TODO: statements, remove the unnecessary printing, and maybe write a few extra tests, but as far as I can tell, the garbage collector works as intended. (And it's fast too. I was actually a bit surprised :D) I've also left it open for more improvements. I wish I had screenshots, to show off, but what would I show? a terminal printing hexadecimal numbers? Wouldn't lend anything to my credibility. If anyone wants to try to go ahead and use it, I'll help you if you run into any issues or bugs. Or in a worst case scenario, maybe even a :kraken:
How can you tell if a window is in fullscreen mode? I assumed it would be a style but I didn't see a style for fullscreen.
[QUOTE=Chandler;27444564]Just finished the last of a bunch of bugfixes for my garbage collector. Valgrind is reporting no memory leaks. Just need to clean up the code, fix all the //TODO: statements, remove the unnecessary printing, and maybe write a few extra tests, but as far as I can tell, the garbage collector works as intended. (And it's fast too. I was actually a bit surprised :D) I've also left it open for more improvements. I wish I had screenshots, to show off, but what would I show? a terminal printing hexadecimal numbers? Wouldn't lend anything to my credibility. If anyone wants to try to go ahead and use it, I'll help you if you run into any issues or bugs. Or in a worst case scenario, maybe even a :kraken:[/QUOTE] Awesome stuff. I believe you. Put a video up showing it working or something. Also, hue displays the wrong colors for some values. hue::color::yellow prints it in blue, and hue::color::blue prints in yellow. It could be my system, but it works for any other color I've used (which is only red at the moment). EDIT: Just redid my command line dice roller from last thread to output in color. Very easy! I really like hue (except for the color bug!).
[QUOTE=ThePuska;27438332][img_thumb]http://img24.imageshack.us/img24/8227/cpolynomials2.png[/img_thumb] Solves polynomials of any degree. With complex coefficients. [editline]16th January 2011[/editline] Imprecision is caused by the numerical solver terminating with a very low threshold[/QUOTE] Hey, That's very cool, what algorithm(s)?
[QUOTE=high;27444988]How can you tell if a window is in fullscreen mode? I assumed it would be a style but I didn't see a style for fullscreen.[/QUOTE] What kind of a window? Graphical (such as OpenGL or DirectX)?
[QUOTE=Rohans;27445691]What kind of a window? Graphical (such as OpenGL or DirectX)?[/QUOTE] Well it looks like depending on the app there are different ways. Kinda weird that the only real way is checking the foreground window and its position.
rewriting your friends' code that took up 20 lines, had 8 variables, and countless calls to the Math class with 6 lines of code, 2 variables, and much less Math calls makes you feel awesome. Protip: when trying to see if one object is facing another, don't calculate two points on the front and back of one entity, then see which one is closer to the entity and by how much, just take the difference between the angles (if you have it wrap around 0-360 like we do, make sure to account for that) and see if it's within a range (ie between -45 and 45 degrees of each other)
This is what I'me working on. [img]http://i.imgur.com/IdC2M.jpg[/img] [img]http://www.jwz.org/images/006g7yzt.jpg[/img] [img]http://www.jwz.org/images/cp1037041603.jpg[/img] [highlight](User was permabanned for this post ("Gimmick Account" - Terrenteller))[/highlight]
[QUOTE=limitofinf;27445662]Hey, That's very cool, what algorithm(s)?[/QUOTE] I've got special cases for linear, quadratic, cubic and quartic equations. The quartic equation was a bit tricky: it divides it into a product of two quadratic equations with unknown coefficients, and solving the coefficients is a cubic equation. For greater degrees, it numerically finds one root. That's done with Newton's method (extended to the complex plane - I was surprised to find that the method seems to work perfectly even then). After it has the approximate root, the polynomial is divided by the root to get a new polynomial of a lower degree. The remainder's discarded because it's supposed to be 0. Repeat with the new polynomial. Since polynomials behave so well, Newton's method is almost guaranteed to find a root and converge quickly with only a few conditions to check for.
Can anyone link me to that island/map generator that was posted the other day I'd appriciate that, thanks.
[QUOTE=DuCT;27445031]Awesome stuff. I believe you. Put a video up showing it working or something. Also, hue displays the wrong colors for some values. hue::color::yellow prints it in blue, and hue::color::blue prints in yellow. It could be my system, but it works for any other color I've used (which is only red at the moment). EDIT: Just redid my command line dice roller from last thread to output in color. Very easy! I really like hue (except for the color bug!).[/QUOTE] Glad you brought this to my attention. I just pushed a fix to the repo. Go ahead and git pull, and it should update just fine (turns out I didn't have the proper enum order from a previously used configuration. woops :v:)
[QUOTE=robmaister12;27446325]Protip: when trying to see if one object is facing another, don't calculate two points on the front and back of one entity, then see which one is closer to the entity and by how much, just take the difference between the angles (if you have it wrap around 0-360 like we do, make sure to account for that) and see if it's within a range (ie between -45 and 45 degrees of each other)[/QUOTE] If you have (or can easily obtain) vectors representing the directions the objects are facing, you can also just take the dot product of the two vectors and check whether the result is positive or negative.
[QUOTE=Chandler;27446978]Glad you brought this to my attention. I just pushed a fix to the repo. Go ahead and git pull, and it should update just fine (turns out I didn't have the proper enum order from a previously used configuration. woops :v:)[/QUOTE] Sweet, I'll check it out tomorrow.
Sorry, you need to Log In to post a reply to this thread.