• What do you need help with? V. 3.0
    4,884 replies, posted
I don't know if the -v flag will do much then. Perhaps you can also enable verbose output in the GUI somewhere.
What is a decent simple programming language? I'm new to programming and have only learned the basics of python, but I want to try another language for fun. I'd prefer a simple one where lines look like: print "Message" rather than: std.print >> << "Message" >> << ::endoftheline
[QUOTE=AntonFTW;32573308]What is a decent simple programming language? I'm new to programming and have only learned the basics of python, but I want to try another language for fun. I'd prefer a simple one where lines look like: print "Message" rather than: std.print >> << "Message" >> << ::endoftheline[/QUOTE] Lua
[QUOTE=AntonFTW;32573308]I'd prefer a simple one where lines look like: print "Message" rather than: std.print >> << "Message" >> << ::endoftheline[/QUOTE] cout << "Message" << endl; isn't that hard, in my opinion. You can remove the endl modifier if you don't want to flush the stream, too, and replace it with \n in the string. Additionally, handling streams like that has the advantage that you need to do no special formatting to output any datatype, everything works the same way if there's an operator<< specified with the correct types.
[highlight]This is already solved at Page 72[/highlight] Decided to try C++ for the hell of it, couldn't even manage to do a simple "Hello World". [img]http://img819.imageshack.us/img819/6960/screenshot2011100120472.png[/img] Anybody know a decent free guide to get me started?
Are you compiling as C?
Try saving it as hoho.cpp. The compiler might think it's C code, because the .c extension is normally used for C.
Ah, that did it, thanks.
[QUOTE=AntonFTW;32575166]Decided to try C++ for the hell of it, couldn't even manage to do a simple "Hello World". [img]http://img819.imageshack.us/img819/6960/screenshot2011100120472.png[/img] Anybody know a decent free guide to get me started?[/QUOTE] nevermind
I did install that version but the problem was me typing the wrong file extension.
-snip-
I've highlighted your mistake: [img]http://localhostr.com/files/ofYqR96/capture.png[/img] While the code you've written is valid [B]C++[/B] code, you've named your file hoho[B].c[/B], which is making your compiler compile it as [B]C[/B] code. If you rename that file to hoho.cpp, I'm fairly sure it will compile :) [B]Edit:[/B] Somehow missed an entire page. My bad.
Idk if you develop on linux or mac or something, But you can save yourself a lot of hassle if you just used Visual studio as IDE
Hello, I have just started coding in python for my CIS (122) class and I have found/made 2 bits of code that do the exact some thing but they are written differently. 1) [code] numericTest = 0 while numericTest <> 1: bob = raw_input('input a number: ') try: randomVar = float(bob) except ValueError, TypeError: print 'try again' print else: numericTest = 1 print 'done' [/code] 2) [code] x = raw_input('input a number: ') while x <> 'end': if not x.isdigit(): print 'try again' print x = raw_input('input a number: ') continue x = 'end' print 'done' [/code] Which one is fast/better and which one should I use?
[QUOTE=OldFusion;32575615]Idk if you develop on linux or mac or something, But you can save yourself a lot of hassle if you just used Visual studio as IDE[/QUOTE] Visual Studio compiles .c files as C as well.
[QUOTE=Dark7533;32577127]Hello, I have just started coding in python for my CIS (122) class and I have found/made 2 bits of code that do the exact some thing but they are written differently. 1) [code] numericTest = 0 while numericTest <> 1: bob = raw_input('input a number: ') try: randomVar = float(bob) except ValueError, TypeError: print 'try again' print else: numericTest = 1 print 'done' [/code] 2) [code] x = raw_input('input a number: ') while x <> 'end': if not x.isdigit(): print 'try again' print x = raw_input('input a number: ') continue x = 'end' print 'done' [/code] Which one is fast/better and which one should I use?[/QUOTE] I'm not a Python expert, but I'd say the one that doesn't use exceptions.
[QUOTE=Jookia;32577239]I'm not a Python expert, but I'd say the one that doesn't use exceptions.[/QUOTE] Using exception handling mechanisms for general program flow is actually pretty Pythonic. As for 'better/faster': If you have some kind of real-time constraint, Python isn't the right language. In like 95% of code on any given project you don't have any such constraint, as in this case, so speed doesn't matter at all. It's a very small portion of all code that is time-critical. Optimizing elsewhere is bad practice.
Can someone please give me a very simple bare bones set of equations for a multi layer backpropagation neural network? I understand it all except the backpropagation equations, I understand it for single layer but not multi layer. Thanks.
If i have an array of integers that represents the screen colours, whats the fastest way to draw it using SFML?
I've just finished the Microsoft-provided Visual C# tutorials to create a side scrolling shooter, any suggestions on where I should go next? A good route to take to learn more. I don't mind what I'm doing as long as the tutorials are clear, game related things would be preferable. Not sure if this is the right thread.
[QUOTE=Icedshot;32580095]If i have an array of integers that represents the screen colours, whats the fastest way to draw it using SFML?[/QUOTE] Use a byte array in RGBA format instead, then use sf::Image::LoadFromPixels() and draw that. Fastest way I can think of right now, anyway.
[QUOTE=Nubsy;32580445]I've just finished the Microsoft-provided Visual C# tutorials to create a side scrolling shooter, any suggestions on where I should go next? A good route to take to learn more. I don't mind what I'm doing as long as the tutorials are clear, game related things would be preferable. Not sure if this is the right thread.[/QUOTE] If its the one with UFO,s that go along the top and you aare a cannon. try giving the player movement and make a asteroid type game
Alright I'm having an issue with indices and freaking drawing a simple cube. Either me or the indices are being retarded about this. [code] const int size = 2; UINT numVertices = 24; vertex* v = NULL; pVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**) &v ); //vertices for a cube v[0] = vertex( D3DXVECTOR3(x,y+size,z), D3DXVECTOR4(1,0,0,1) ); //front top left v[1] = vertex( D3DXVECTOR3(x+size,y+size,z), D3DXVECTOR4(0,1,0,1) ); //front top right v[2] = vertex( D3DXVECTOR3(x,y,z), D3DXVECTOR4(0,0,1,1) ); //front bottom left v[3] = vertex( D3DXVECTOR3(x+size,y,z), D3DXVECTOR4(1,1,0,1) ); //front bottom right v[4] = vertex( D3DXVECTOR3(x,y+size,z+size), D3DXVECTOR4(1,0,0,1) ); //back top left v[5] = vertex( D3DXVECTOR3(x+size,y+size,z+size), D3DXVECTOR4(0,1,0,1) ); //back top right v[6] = vertex( D3DXVECTOR3(x,y,z+size), D3DXVECTOR4(0,0,1,1) ); //back bottom left v[7] = vertex( D3DXVECTOR3(x+size,y,z+size), D3DXVECTOR4(1,1,0,1) ); //back bottom right pVertexBuffer->Unmap(); //create indexes for a cube unsigned int* i = NULL; pIndexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**) &i ); //front face i[0] = 0; i[1] = 1; i[2] = 3; i[3] = 2; i[4] = 0xffffffff; //start new strip //right face i[5] = 0; i[6] = 2; i[7] = 6; i[8] = 4; i[9] = 0xffffffff; //left face i[10] = 5; i[11] = 7; i[12] = 3; i[13] = 1; i[14] = 0xffffffff; //back face i[15] = 6; i[16] = 4; i[17] = 5; i[18] = 7; i[19] = 0xffffffff; //top face i[20] = 0; i[21] = 4; i[22] = 1; i[23] = 5; i[24] = 0xffffffff; //bottom face i[25] = 6; i[26] = 2; i[27] = 3; i[28] = 7; pIndexBuffer->Unmap(); [/code]
I have a sorted list of floats. How would I force its "normalization" so that it (approximately) fits a certain distribution? The distribution is expressed discretely, i.e. I have multiple ranges (e.g. from 0 to 0.3) of which each one should contain a specific percentage of the floats (e.g. 50%) Here's a paint illustration [img]http://img834.imageshack.us/img834/8150/unledxwu.png[/img] The purpose is to ensure that a heightmap always has the right amount of land of specific height, so certain smoothness would be desirable. Heights have to be changed, but the method should try to minimize the total change in heights. [editline]2nd October 2011[/editline] I have some untested ideas but I'd like to hear how other people would approach the problem
How would i "scroll" through a picture as if it was a 2D array in XNA? I mean, take the first pixel of an image, get the color (XNA doesnt have built-in hexes, RGBA will have to do) of it and get a corresponding number of that color. Then take the another and another and another and another until we reach the end and we have to move another column down. Im going to get one Java game that i know does it and try recreate the same.
[QUOTE=ThePuska;32584067]I have a sorted list of floats. How would I force its "normalization" so that it (approximately) fits a certain distribution? The distribution is expressed discretely, i.e. I have multiple ranges (e.g. from 0 to 0.3) of which each one should contain a specific percentage of the floats (e.g. 50%) Here's a paint illustration [img]http://img834.imageshack.us/img834/8150/unledxwu.png[/img] The purpose is to ensure that a heightmap always has the right amount of land of specific height, so certain smoothness would be desirable. Heights have to be changed, but the method should try to minimize the total change in heights. [editline]2nd October 2011[/editline] I have some untested ideas but I'd like to hear how other people would approach the problem[/QUOTE] We covered something like this in an image processing class I had. The general process is 'histogram equalization'. I'm pretty sure the process goes something like this: 1. Integrate both the histogram and the target density function to get their cumulative density functions 2. For each value in the target CDF: a. Iterate through values in the histogram CDF, continuing from wherever you left off. For each value which is less than the current target value, create a mapping from the histogram bucket to the target value. b. When values in the histogram CDF are no longer less than the target CDF, break and continue onto the next target value 3. Use the map from histogram to target distribution to convert all the pixels. Sorry if this is a little hard to follow. It's late and I'm having some difficulty putting it into words. This method probably won't be suitable for heightmaps without some additional work, as you end up with these sort of 'gaps' in the output histogram, where multiple inputs map to the same output and some outputs go unmapped. This problem could probably be mitigated with an edge-preserving blur.
[code] MyForm form = new MyForm(); form.Show(); // OR this next line form.ShowDialog(); [/code] ShowDialog means you can't use the first form till you close the second, while just Show means you can use both at the same time. You'll need to be careful that when you close the main window, the whole program won't quit though (unless you want that)
Okay, gonna try this again. I deleted everything programming related and now I'm gonna re-install them one by one. First, I downloaded C::B 10.05 and installed. Then I downloaded the Ogre 1.7.3 source from [url=http://www.ogre3d.org/download/source]here[/url], and compiled them using CMake. Everything went fine, and now I have an ogre.cbp file in the Binary folder, which I then proceeded to load up and then hit "Compile". It couldn't compile, so instead it showed me this error: [cpp] -------------- Build: all in OGRE --------------- Using makefile: Makefile Execution of 'make.exe -s -f Makefile all' in 'G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3' failed. Nothing to be done.[/cpp] The problem here, I found to be, is that there's no make.exe file included with the Code::Blocks default MinGW installation. So then, I downloaded mingw-get from [url=http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/]here[/url], to make sure I have everything I need. I then opened the installer, and set it to install everything it can: C++, ObjC (ew), Fortran, MSYS and more, so now I have the full suite and I'm sure that there will be no missing files. It took about 40 minutes to download and install everything, and after it was done I tried to open the project file and compile it again. However, this happens: [cpp]-------------- Build: all in OGRE --------------- Using makefile: Makefile Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3>[/cpp] It looks as if it's just launching the CMD and doing nothing else, because that first message is what shows you up when you load up the regular windows command prompt. So guys, what do?
How to install OpenGL please someone describe for me ?
Okay, I tried setting up CMake manually and it compiled fine, but it still shows me the same error: [cpp]-------------- Build: all in OGRE --------------- Using makefile: Makefile Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3> Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3>Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3>Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. G:\Samuka97\1. Aplications\5. Programming Software\IDE\CodeBlocks\Libraries\Ogre3D\Binary_1.7.3> Process terminated with status 0 (0 minutes, 7 seconds) 0 errors, 0 warnings [/cpp] I don't know what to do anymore. I've followed the tutorial and all it gives me is this.
Sorry, you need to Log In to post a reply to this thread.