• What do you need help with? V4 (January 2012)
    966 replies, posted
[QUOTE=esalaka;34868944]I always wondered if you could implement a voxelworld as a bunch of vertices (or meshes?) and a shader that renders a cube at each vertex [editline]26th February 2012[/editline] Points*[/QUOTE] You could write a geometry shader that turns points into cubes pretty easily, optimizing out hidden blocks and applying the right textures would be difficult though.
Decided to learn java and c++ a the same time. Lots of in between time for answers.. I'm building the same program in both languages. Should be fun. why am I posting again? oh yeah. anyone have advice for a good macro program? I want to be able to do shift+alt+<a key i chooose> = "text I choose" [editline]25th February 2012[/editline] Oh. I thought the SDK folder was not the IDE... I suppose "Software developer kit" would include the IDE that helps you develop. I'm loading up eclipse from this file right here... Uhm. but the file is less than a meg. Am I doing something wrong? I should probably store this program under "Program and Files" right? I thoguht this folder was a "setup" folder. I guess not... right? [IMG]http://i.imgur.com/WzAzi.png[/IMG]
[lua] seed = love.timer.getTime() math.randomseed(seed) if math.random(1, 10) == 5 then print("true") end [/lua] I have a problem with math.random(). No matter what value I put as the seed or what minimum and maximum value I use, it always returns the minimum value. I've tried using os.time(), love.timer.getTime() and even single numbers as the seed. It's probably an easy fix but I'm pretty new to lua. [editline]26th February 2012[/editline] Problem solved!
[QUOTE=-Kesil-;34869239]Decided to learn java and c++ a the same time. Lots of in between time for answers.. I'm building the same program in both languages. Should be fun. why am I posting again? oh yeah. anyone have advice for a good macro program? I want to be able to do shift+alt+<a key i chooose> = "text I choose" [editline]25th February 2012[/editline] Oh. I thought the SDK folder was not the IDE... I suppose "Software developer kit" would include the IDE that helps you develop. I'm loading up eclipse from this file right here... Uhm. but the file is less than a meg. Am I doing something wrong? I should probably store this program under "Program and Files" right? I thoguht this folder was a "setup" folder. I guess not... right? [IMG]http://i.imgur.com/WzAzi.png[/IMG][/QUOTE] Eclipse is portable, meaning you can run it from any folder anywhere, even from a flash drive without installing it. It will keep all your plugins and settings (save for a few user-specific settings stored in %USERPROFILE%/.eclipse), and it doesn't have to be under C:/Program Files. And Eclipse is written in Java, so the .exe just runs java.exe with the parameters in eclipse.ini.
[QUOTE=-Kesil-;34868993] [B] done?[/B] [IMG]http://i.imgur.com/wdJX5.png[/IMG] [B] so to link to it... I did this ...[I][U]. right?[/U][/I] [/B][IMG]http://i.imgur.com/xMbMN.png[/IMG] I'm pretty new to syntax of C++ and Visual Studio. Don't worry though. all I need to do is draw lines and boxes or circles... I'm not asking to create some mega 3D engine[/QUOTE] [t]http://puu.sh/iotU[/t]
What's the difference between String and string, in C#? Which should I use?
[QUOTE=Giacomand;34871371]What's the difference between String and string, in C#? Which should I use?[/QUOTE] They're both exactly the same. "string" is just an alias for "System.String" in the same way that "int" is just an alias for "System.Int32", etc. [url=http://stackoverflow.com/questions/7074/in-c-sharp-what-is-the-difference-between-string-and-string]This StackOverflow question[/url] explains it very well.
[QUOTE=Giacomand;34871371]What's the difference between String and string, in C#? Which should I use?[/QUOTE] There is no difference. string is an alias for System.String. EDIT: ugh, ninja'd
Are there any alternatives to the ActionScript 3 library [url=http://www.photonstorm.com/flod]FLOD[/url] that can play *.XM modules without having to donate $5 for commercial use? Not having luck in the search.
[QUOTE=Stonecycle;34872103]Are there any alternatives to the ActionScript 3 library [url=http://www.photonstorm.com/flod]FLOD[/url] that can play *.XM modules without having to donate $5 for commercial use? Not having luck in the search.[/QUOTE] If you have FLOD implemented just pay the five bucks. Someone put some hard work into it, if you're gonna make money (or try to), $5 is pretty cheap as far as investment goes.
[QUOTE=Lord Ned;34872204]If you have FLOD implemented just pay the five bucks. Someone put some hard work into it, if you're gonna make money (or try to), $5 is pretty cheap as far as investment goes.[/QUOTE] I know, and I would, but as the situation is, I am unable to pay up (mostly by lacking a PayPal).
[QUOTE=Stonecycle;34872235]I know, and I would, but as the situation is, I am unable to pay up (mostly by lacking a PayPal).[/QUOTE] How do you expect to get paid for this commercial product of yours then? :p
[QUOTE=Lord Ned;34872285]How do you expect to get paid for this commercial product of yours then? :p[/QUOTE] Okay, you got me there. Someone I know can help me on the income, but I got to get the project done, and the audio's in a need for *.XM playback to reduce file size. No, I'm not just going to use Fzip. SiON's an alternative, but I hear it really impacts performance.
$5 is nothing
[QUOTE=Stonecycle;34872383]Okay, you got me there. Someone I know can help me on the income, but I got to get the project done, and the audio's in a need for *.XM playback to reduce file size. No, I'm not just going to use Fzip. SiON's an alternative, but I hear it really impacts performance.[/QUOTE] mail me a $5 bill and I'll get you a licence
[QUOTE=swift and shift;34872388]$5 is nothing[/QUOTE] The amount is irrelevant if you are (and from what he posted I would assume he is) too young to hold a PayPal account or other form of electronic payment.
I have a c# question for you guys. Say you want to check an array of bees, and you want to run through the list trying to assign a job to each bee, and return true as soon as a bee can actually do the job. Of course one can do a simple for loop for this, but what happens when you try: [code] foreach( Bee b in BeeList[]) { if bee can do job, return true; } return false [/code] Does this return as soon as one can do it, or does it check all the bees, no matter what? (P.S, this is from head first c#)
If I have a 2d array data in a 1d array, how would I get the desired information? would it be: blah[ x + (y * arrayWidth) ]
[QUOTE=DoctorSalt;34872989]Does this return as soon as one can do it, or does it check all the bees, no matter what?(P.S, this is from head first c#)[/QUOTE] If you return from within the loop, the loop ends even if it hasn't processed all the bees yet.
[QUOTE=DoctorSalt;34872989]I have a c# question for you guys. Say you want to check an array of bees, and you want to run through the list trying to assign a job to each bee, and return true as soon as a bee can actually do the job. Of course one can do a simple for loop for this, but what happens when you try: [code] foreach( Bee b in BeeList[]) { if bee can do job, return true; } return false [/code] Does this return as soon as one can do it, or does it check all the bees, no matter what? (P.S, this is from head first c#)[/QUOTE] It will return true as soon as one bee can do the job. This isn't specific to C#, it applies to any programming language. One way to think about it is to unroll the foreach loop in your head. It would look something like this: [code]if bee[0] can do it, return true; if bee[1] can do it, return true; if bee[2] can do it, return true; ... return false;[/code] As soon as any of the bees can do it, you return true. The moment you see a return statement, you leave the method and go back to the calling method. No delays. [editline]a[/editline] Actually there's only one exception to that rule. In pretty much any language that has try-catch-finally blocks, C# included, returning something within the "try" block will not immediately return, but call the code in the "finally" block first.
[QUOTE=Richy19;34873020]If I have a 2d array data in a 1d array, how would I get the desired information? would it be: blah[ x + (y * arrayWidth) ][/QUOTE] Yes.
[QUOTE=robmaister12;34873176]It will return true as soon as one bee can do the job. This isn't specific to C#, it applies to any programming language. One way to think about it is to unroll the foreach loop in your head. It would look something like this: [code]if bee[0] can do it, return true; if bee[1] can do it, return true; if bee[2] can do it, return true; ... return false;[/code] As soon as any of the bees can do it, you return true. The moment you see a return statement, you leave the method and go back to the calling method. No delays.[/QUOTE] Thanks. I had a hunch that perhaps it somehow queued the statements to be performed for each Bee. Out of curiosity, can I write something like this?: [code] foreach (Bee b in Beelist[]) { if some requirement is met return i; } [/code] Aka, does it still handle i as a number?
[QUOTE=DoctorSalt;34873297]Thanks. I had a hunch that perhaps it somehow queued the statements to be performed for each Bee. Out of curiosity, can I write something like this?: [code] foreach (Bee b in Beelist[]) { if some requirement is met return i; } [/code] Aka, does it still handle i as a number?[/QUOTE] foreach statements don't iterate over the array like a for statement does. No "int i" is defined as part of a foreach loop, so you would receive an error saying that variable "i" doesn't exist. If you're curious, foreach loops iterate the array as a [url=http://en.wikipedia.org/wiki/Linked_list]linked list[/url]. In your new example, you would have to switch back to a regular for loop to work with the index. A fairly recent addition to C# is LINQ, which can simplify things for you. In this case, you can use the "FindIndex" extension method of List<T> to do everything in that bit of code on one line (assuming beeList is a List<Bee>, and requirement() is a method that takes a bee and returns a bool): [csharp]beeList.FindIndex(b => requirement(b));[/csharp]
[QUOTE=leontodd;34870615][lua] seed = love.timer.getTime() math.randomseed(seed) if math.random(1, 10) == 5 then print("true") end [/lua] I have a problem with math.random(). No matter what value I put as the seed or what minimum and maximum value I use, it always returns the minimum value. I've tried using os.time(), love.timer.getTime() and even single numbers as the seed. It's probably an easy fix but I'm pretty new to lua. [editline]26th February 2012[/editline] Problem solved![/QUOTE] I don't have your problem, but next time, please explain what you did, rather than just "Problem solved!".
[QUOTE=Richy19;34873020]If I have a 2d array data in a 1d array, how would I get the desired information? would it be: blah[ x + (y * arrayWidth) ][/QUOTE] That is but one way to do it. You can store the data in any way you wish, as long as you use the same method to retrieve it that you stored it with.
Anyone know what defines I need to use with Lua (5.1.4) and Box2D to use them statically or dynamically?
[IMG]http://i.imgur.com/6klMm.png[/IMG] This is transparent. Help
I've trying to do the following in Java, but [i]method[/i], [i]responseCode[/i] and [i]responseMessage[/i] are all protected. Is there a way I can get around this? [csharp] URL url = new URL(someURL); HttpsURLConnection con = (HttpsURLConnection)url.openConnection(); con.method = "POST"; int responseStatus = con.responseCode; String responseString = con.responseMessage; [/csharp] [b]Fixed this with setRequestMethod, getResponseCode and getResponseMessage.[/b]
Whats an identifier it's an error i have. int = age; The = has a line under it for the error.
[QUOTE=IndieGamer;34884175]Whats an identifier it's an error i have. int = age; The = has a line under it for the error.[/QUOTE] int age;
Sorry, you need to Log In to post a reply to this thread.