Where do you work that they let you use whatever coding style you want?
Where do you work that they let you use whatever coding style you want?
:barf:Code:19:03 - |TzC| The Cupid Stunt: i know 19:03 - |TzC| The Cupid Stunt: but this is a pretty simple gamemode 19:03 - |TzC| The Cupid Stunt: this is the hardest part of it really 19:03 - |TzC| The Cupid Stunt: and i have made a full game before 19:04 - |TzC| The Cupid Stunt: so i though why dont i just go ahead and make a gmod gamemode 19:04 - King Flawless: What did you make the game in? 19:04 - |TzC| The Cupid Stunt: gamemaker
how is this so dumb
Edited:
Argh fucking point doesn't wanna unproject
-snip-
note to self, "divide by w" applies to unprojection too
So I ported my GLSL helper thing to WPF and I'd appreciate it if someone could try it with Mono.
It has some stuff that I'm not sure if Mono supports.
http://anyhub.net/file/2V9W-glslhelper.rar
yeah one thing i really hate is when people use hungarian notation in lua.
Edited:
OH WAIT
So I'm working on my first opengl application, and I got this piece of code to choose a pixel format in windows.
However, that leaves me with an error that it cannot find a matching pixel format. However, if I remove the hardware accelerated option it finds a pixel format but nothing gets rendered at all. My graphics card supports Opengl 3.3, and the drivers are up to date. Any ideas? I'm very new to opengl so it might just be something really stupid.Code:int pixAttribs[] = { WGL_SUPPORT_OPENGL_ARB, 1, // Must support OGL rendering WGL_DRAW_TO_WINDOW_ARB, 1, // pf that can run a window WGL_ACCELERATION_ARB, 1, // must be HW accelerated WGL_COLOR_BITS_ARB, 24, // 8 bits of each R, G and B WGL_DEPTH_BITS_ARB, 16, // 16 bits of depth precision for window WGL_DOUBLE_BUFFER_ARB, GL_TRUE, // Double buffered context WGL_SAMPLE_BUFFERS_ARB, GL_TRUE, // MSAA on WGL_SAMPLES_ARB, 8, // 8x MSAA WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, // pf should be RGBA type 0}; // NULL termination // Ask OpenGL to find the most relevant format matching our attribs // Only get one format back. wglChoosePixelFormatARB(g_hDC, &pixAttribs[0], NULL, 1, &nPixelFormat, (UINT*)&nPixCount);
I remember something in this thread about a terraria widescreen prog with fixed hug placements, but I can't find it anymore, anyone have a link?
Apparently, it didn't miss you.
It works fine on other programs, I also have the newest version (2.10).Code:$ mono GLSLDebugHelperWPF.exe The entry point method could not be loaded
I just found out about C++0x.#include <string> #include <vector> #include <iostream> using namespace std; vector<string> awesomeface = { "HI THERE", "Whuzup", "HAHAHA", "this is stupid", }; int main(){ for(string& s: awesomeface){ cout << s << endl; } }
Wait, WPF? No chance getting that to run atm.
:(
I couldn't get Avalon syntax highlighting on WinForms.
Completely misread what he said.
Also had no idea what GWEN was.
Total herp derp moment on my part.
Edited:
Replace the 1 after WGL_ACCELERATION_ARB with WGL_FULL_ACCELERATION_ARB
Lack of an internet connection from my desktop PC for the last couple of days sort of brought my regular programming stuff to a halt and I had been admiring high's work on a Terraria map renderer a few pages back right before I lost connection, so today I decided to give one a shot as well.
Having never messed with anything related to 2D games (sprite sheets, etc.), it was quite fun to do!
Only things left to work out are tile "styles" (which is probably the biggest thing of the whole lot), better colours for the liquids and proper background transition points (it'll probably only work on a Small map at the moment).
It renders into 1200px x 1200px tiles currently, rather than a single large image.
Some earlier renderings: http://dl.dropbox.com/u/6938670/Terr...orld1_test.png http://dl.dropbox.com/u/6938670/Terr...rld1_test2.png http://dl.dropbox.com/u/6938670/Terr...rld1_test3.png
Rendering using the current code of the column around my house: http://dl.dropbox.com/u/6938670/Terr...rariaHouse.png (Warning, it's big.)
"Deep Zoom" image of the full map (this is currently using older code, it's rebuilding right now): http://fennec.limetech.org/terraria
Does anyone know of a method to weigh nodes with 2-dimensional (or more general) coordinates so that their barycenter is a given point?
Mathematically
How does one determine the multipliers a(k)?
(Quite clearly there are an infinite amount of solutions except for perhaps some special cases - but just one will do for me)
Edited:
Or does anyone know anything about this problem? How hard is it? Can it be reduced to some other problem?
Edited:
Oh wait, I just realized that's actually a very simple problem. Nevermind then
I've never heard of this problem before, but aren't there an infinite number of solutions there?
As a heuristic, couldn't you give them all a weight of 1 initially, find S', then take the difference of S and S' to determine which way center of mass has to move? You could probably take the dot product of this difference vector and each v_k to determine a weight adjustment factor and repeat the process in an iterative fashion, with smaller adjustments each iteration.
That's actually the definition of a system of linear equations where v_k are the coefficients, a_k are the variables and S is the desired result. (Though in most formal math you would see k start from 1, but that's just nitpicking)
Edited:
And yes there are an infinite number of solutions if n exceeds the dimension of the space you are working in.
Beaten to it.
Edited:
It was much harder in my mind when I was thinking of all kinds of stuff like how you'd do some weird gradient shit with the nodes etc. and just writing the definition out made me realize how easy it was
Working on serializing my game world into a file so i can make levels
Crossposting from WDYNHW:
So I'm still trying to convert BBcode to JSON, and still no further. My regex really sucks.
I'm trying to turn this:
This is some text.
[url=http://example.com]This is a URL[/url]
This is an image:
[img]http://lol.com/lol.png[/img]
That was an image. Here's a YouTube video:
[media]video-id-here[/media]
[b]This is some bold text.[/b]
Into this:
Any suggestions? Doing this in PHP, by the way, as part of vBulletin, so all it's functions are available for use.Code:{ "tags":[ { "text":"This is some text.\n\n" }, { "url":{ "content":"This is a URL", "href":"http://example.com" } }, { "text":"\n\nThis is an image:\n\n" }, { "img":"http://lol.com/lol.png" }, { "text":"\n\nThat was an image. Here's a YouTube video:\n\n" }, { "youtube":"video-id-here" }, { "text":"\n\n" }, { "b":"This is some bold text." } ] }
Um, the whole point of WDYNHW is so that WAYWO isn't littered with questions like this...
True, but most of the questions in WDYNHW are rather simple, figured this was more of a challenge.
Is the post limit per thread capped at 3.5k now? If so, who's making v18?
go for it
i have an op ready but anyone else wants to make it go for it.
Edited:
oops i didn't save it nevermind then!
deloc you've made the last 3, let someone else have a turn!
Where's that automatic thing Overv made..
i don't know, which is why i just go through posted images and pick out anything that looks interesting.
I'll let it run on this thread.
Edit: Here you go.
Thanks, but you posted that link literally a second after I trawled through every page.
Oh well, it didn't take too long, it's amazing how many pages of content there aren't.
Unfortunately, I must go to bed now - but here is what I've come up with.
Thomas thats a nice OP! <3
Isn't the max post count 5k, why are we talking about v18 right now?
It goes by artistic ??
Nope. 3.5k now.
Implemented a little neural network thingy during the last 2 hours.. using backpropagation for learning.
Results look promising already, will have to do some more testing when I find the time :D
// Generate network with 2 input neurons and 1 output neuron final Network network = NetworkFactory.generateSigmoidNet( new int[] { 2, 4, 4, 1 } ); // Teach the network to act like a logic AND gate System.out.println( "Pre test 0,1 -> 0 "); network.setInputValues( new double[] { 0, 1 } ); network.dumpOutput(); System.out.println( "Pre test 1,1 -> 1 "); network.setInputValues( new double[] { 1, 1 } ); network.dumpOutput(); final int steps = 1000; for ( int i = 0; i < steps; i++ ) { final double learningRate = 1.0 - ( i / (double)steps ); network.setInputValues( new double[] { 0, 1 } ); network.learn( new double[] { 0 }, learningRate ); network.setInputValues( new double[] { 1, 1 } ); network.learn( new double[] { 1 }, learningRate ); network.setInputValues( new double[] { 1, 0 } ); network.learn( new double[] { 0 }, learningRate ); network.setInputValues( new double[] { 0, 0 } ); network.learn( new double[] { 0 }, learningRate ); } System.out.println( "Post test 0,1 -> 0 "); network.setInputValues( new double[] { 0, 1 } ); network.dumpOutput(); System.out.println( "Post test 1,1 -> 1 "); network.setInputValues( new double[] { 1, 1 } ); network.dumpOutput();
Resulting in:
Code:Pre test 0,1 -> 0 Layer 3: [0] = 0,84, Pre test 1,1 -> 1 Layer 3: [0] = 0,84, Post test 0,1 -> 0 Layer 3: [0] = 0,04, Post test 1,1 -> 1 Layer 3: [0] = 0,95,
Rated artistic because I don't know whats going on.
you dont need to tell us everytime you rate artistic.
Also managed to fix the problem i was having, boxes for everyone
It also takes into account mass so some objects can fall faster thna others
C++ Primer Plus is awesome. I'm gonna try to make a little game where you explore a dungeon, but I can't decide on how to store the map: 2D arrays or just have several blocks. With several blocks I could enable destruction and generate random dungeons easily, while with 2D arrays I'm not sure. Should I go for 2D arrays or just instances?
Edit: And my idea is just like the game below. Damn.
My roguelike still isn't dead. :buddy:
I don't even remember adding the Combustible Lemon enemy.Must have been post-Portal 2's release, though.
Anyway, added a lot of stuff I can't really show...
The "Unthreatened" text on the bottom right changes depending on the situation. For instance, if your character has taken a lot of damage it will change to "Wounded", or if he's dead it'll change to "Deceased". Added a ton of items and monsters, as well.
Another neat feature is that if you stay on a particular level for an extended period of time, the game will spawn a "motivator monster" which is almost impossible to kill, forcing the player to descend and therefore stops excessive grinding. There is forewarning, though, so it's not completely cheap.In this case the "Unthreatened" text changes to "Endangered."
Also, I'm aware I misspelled "combustible". Heh.