• What are you working on? v15
    5,001 replies, posted
[QUOTE=r4nk_;28082940]But that doesn't matter because you had it all under source control right?[/QUOTE] copy paste is best source control :smugdog:
All my programming projets are always at least in my Dropbox, just in case something like this happens.
[QUOTE=Jallen;28084964]copy paste is best source control[/QUOTE] Well it's better than CVS. :smithicide:
I have a semi-recent zipped version, plus the class is mostly a top level trainstation of code, so to rewrite it won't require me to replicate actual brain-intensive work. Mostly I've just never seen an error like that.
[QUOTE=geel9;28080557]You know you're a true programmer when an image for a sprite is an image of a window.[/QUOTE] You know you're a true programmer when you're not geel9
I really love the error reporting I get sometimes, [img]http://puu.sh/Yht[/img] Now I have to go look why it does that although I think I know why. :psyduck: the text vanishes when I try to capture it! [code] The runtime has encountered a fatal error. The address of the error was at 0x792bee12, on thread 0x1620. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. [/code] That is the error. [editline]16th February 2011[/editline] Turns out I had a wrong function signature :doh:
[QUOTE=commander204;28087599]I really love the error reporting I get sometimes, [code] The runtime has encountered a fatal error. The address of the error was at 0x792bee12, on thread 0x1620. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. [/code] [/QUOTE] It's like the compiler is just making up shit on the go.
[QUOTE=AtomiC0l;28088960]It's like the compiler is just making up shit on the go.[/QUOTE] That error rather clearly originates from the runtime and not the compiler.
I didn't know what I was doing while programming a custom generic collection class in C# and I tried nulling a generic when it notified me that "You probably mean default(T) because T might not be nullable" Fuck you, how did you know The damn IDE programs better than I do YET AGAIN
You might want to look into [url=http://en.wikipedia.org/wiki/Tokenization]tokenization[/url]
Has anyone tried to develop for Android in C++ ?
I made a program that plays the chaos game. It works, but it gives me these weird bars across the image: [img]http://filesmelt.com/dl/sierpinski1.png[/img] Anyone got any ideas why this happens? (Also, I tried with an almost equilateral triangle and still get the same thing (using ints for the coordinates)) Here's the render code: [code] GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); Color.black.bind(); if(!Main.xPoints.isEmpty()&&!Main.yPoints.isEmpty()) { for(int i=0;i<Main.xPoints.size()&&i<Main.yPoints.size();i++) { GL11.glBegin(GL11.GL_POINTS); GL11.glVertex2i(Main.xPoints.get(i), Main.yPoints.get(i)); GL11.glEnd(); } } [/code]
[QUOTE=aero1444;28090776]I made a program that plays the chaos game. It works, but it gives me these weird bars across the image: [img_thumb]http://filesmelt.com/dl/sierpinski1.png[/img_thumb] Anyone got any ideas why this happens? (Also, I tried with an almost equilateral triangle and still get the same thing (using ints for the coordinates)) Here's the render code: [code] GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); Color.black.bind(); if(!Main.xPoints.isEmpty()&&!Main.yPoints.isEmpty()) { for(int i=0;i<Main.xPoints.size()&&i<Main.yPoints.size();i++) { GL11.glBegin(GL11.GL_POINTS); GL11.glVertex2i(Main.xPoints.get(i), Main.yPoints.get(i)); GL11.glEnd(); } } [/code][/QUOTE] At a glance and flicker of thought I'd say something to do with rounding float->int on the coordinates somewhere.
[QUOTE=Chris220;28090955]At a glance and flicker of thought I'd say something to do with rounding float->int on the coordinates somewhere.[/QUOTE] [img]http://filesmelt.com/dl/sierpinski2.png[/img] I managed to fix it by using GL_QUADS but it seems a bit silly to draw 4 coordinates instead of just one. I thought it might be that but surely with integer coordinates the coordinates would be on whole pixels, so there shouldn't be any semi-transparent ones?
[QUOTE=PiXeN;28089934]Has anyone tried to develop for Android in C++?[/QUOTE] Yes, I had to add a missing OpenGL ES 2.0 binding for Java with the NDK. That's all though, there isn't a lot of documentation for the Android NDK.
Why not just use the std namespace?
Why is GL_TEXTURE_2D deprecated and what do I enable instead?
glEnable(GL_TEXTURE_2D) would tell the fixed-function pipeline to enable texturing. The fixed-function pipeline is deprecated, thus is that function-call. [url]http://www.opengl.org/wiki/GLSL_Samplers#Binding_textures_to_samplers[/url]
Now that I think about it, I access each pixel of the texture in the shader manually. It doesn't make sense for me to have to enable something.
Does anyone know a simple way to draw text in OpenTK? I don't want to go download external libraries or render to a texture or something.
[QUOTE=bootv2;28091709]I've just finished my tokenizer! every word is now a string on itself stored inside of a vector. Up to multiple lines![/QUOTE] That isn't a tokenizer. A tokenizer doesn't just divide your code into strings, it analyses your code and separates it into tokens. Take for example the following C code: [cpp]int sum = a + 3;[/cpp] The tokenizer would generate the following table: [list][*][b]int[/b] - Type name [*][b]sum[/b] - Identifier [*][b]=[/b] - Assignment operator [*][b]a[/b] - Identifier [*][b]3[/b] - Constant integer [*][b];[/b] - Expression end[/list]
[QUOTE=Dlaor-guy;28091779]Does anyone know a simple way to draw text in OpenTK? I don't want to go download external libraries or render to a texture or something.[/QUOTE] OpenTK is just a wrapper for OpenGL and since OpenGL doesn't know what drawing text to screen means, neither does OpenTK. There's one file, TexLib that fiddler also made that handles texture loading and drawing bitmap fonts to screen. You can get it on the official page.
[QUOTE=Overv;28091134]Yes, I had to add a missing OpenGL ES 2.0 binding for Java with the NDK. That's all though, there isn't a lot of documentation for the Android NDK.[/QUOTE] You finished that facepunch application for android, right?
So I was pulling my hair out for 3 hours last night, today we have dedicated to independent projects. Fired up my laptop, started debugging, realized that when the game activity pauses, it calls finish();, which is why starting a new activity on top of it returned it to the main menu. Commented out a single line, problem solved.
[QUOTE=bootv2;28091383]it's just a temporary cout, therefor it's be a waste of time to use a whole namespace for a one time use of cout, and a one-time us of endl.[/QUOTE] Then put: using std::cout; using std::endl; Or even better, just put std::cout when you use it instead of just cout. :)
I was thinking of making a game base with C# and then make everything else in Lua, is that a good Idea? Did you ever try it?
[QUOTE=commander204;28094125]I was thinking of making a game base with C# and then make everything else in Lua, is that a good Idea? Did you ever try it?[/QUOTE] Well what would you achieve by doing that? It would run slower and you'd have to bind a huge amount of procedures. Why do you need the ability to write your entire game in Lua?
Next project: Jackpot, which is a graphical, block based (think the programming enviorment from [url=http://mindstorms.lego.com/en-us/history/default.aspx]this[/url]) that translates to Lua. All the code is in Lua, and will run on any Lua 5 interperter with no modification. However, like Frutcose it requires a seperate library (written in Lua) to work, and isn't really human readable.
[QUOTE=Jallen;28094375]Well what would you achieve by doing that? It would run slower and you'd have to bind a huge amount of procedures. Why do you need the ability to write your entire game in Lua?[/QUOTE] If he used LuaInterface, he wouldn't need to worry about binding - since it uses reflection to automatically bind methods.
[media]http://www.youtube.com/watch?v=cSL9S6crtVc[/media] Day 2 of Hadron development. Sorry it's so long-winded, I'm rather tired (what's new?) I'll try and keep the others a bit more snappy
Sorry, you need to Log In to post a reply to this thread.