• What are you working on? v19
    6,590 replies, posted
I'm in a hurry and I can't figure out how to solve this ridiculous problem: I'm parsing lines out of a text file I've compiled from a several different websites, and for some reason, many/ (all?) of the single and double quotes are not REALLY single/double quotes, but in fact something dark and evil, and string.replace()'ing them doesn't work. Furthermore, when I try to reprint them to another file, they all come out as a backslash delimiter followed by an invisible character. In the command prompt, I get shit like: "ΓÇ¥" edit: I made a temporary solution by using my text editor to replace all the quotes with [QUOTE], and then replacing programmatically from there. however, still relevant question.
[QUOTE=Ehmmett;30699885]Apparently I can't show you because Fraps doesn't want to record it and CamStudio is incapable of compiling a video that will play. So I'll describe it and put up a screen shot. Using 'fake' cursors in GlovePIE, I made a small portal game to play with a joystick. Left joystick button makes a blue portal, right makes orange, and you move the joystick about to move around the 'player' cursor. It had sound effects and cursor images and everything too. [img]http://i.imgur.com/e7Y3x.png[/img] Simple, but fun.[/QUOTE] Had to try myself :D [img]http://filesmelt.com/dl/hadtotry.PNG[/img]
[QUOTE=Orki;30704497]Had to try myself :D [img]http://filesmelt.com/dl/hadtotry.PNG[/img][/QUOTE] Both of you should collaborate and make the next desktop shimeji.
2D lighting! Now with 4x FSAA! [img]http://img818.imageshack.us/img818/1762/fsaalighting.jpg[/img]
[QUOTE=RyanDv3;30703732]I'm in a hurry and I can't figure out how to solve this ridiculous problem: I'm parsing lines out of a text file I've compiled from a several different websites, and for some reason, many/ (all?) of the single and double quotes are not REALLY single/double quotes, but in fact something dark and evil, and string.replace()'ing them doesn't work. Furthermore, when I try to reprint them to another file, they all come out as a backslash delimiter followed by an invisible character. In the command prompt, I get shit like: "ΓÇ¥" edit: I made a temporary solution by using my text editor to replace all the quotes with [noparse][QUOTE][/noparse], and then replacing programmatically from there, how, still relevant question.[/QUOTE] This mysterious dark and evil is actually just the variable-length Unicode encoding called UTF-8. The bogus output in the command prompt happens because your terminal is not set to use UTF-8. You will get a seemingly similar bogus output if you do get your terminal to use UTF-8, but your terminal font doesn't support that particular character (Actually it's not bogus, but it will be substituted for a single character signaling error, like a box with a question mark in it). How you must handle this depends on your platform and programming environment. If you don't need to output this text to the terminal, you don't need to do any of the above, but you still need to handle the Unicode if you want to handle the quotes. The best option is to use a Unicode-enabled programming environment with Unicode-aware strings, but it might be more practical to just hard-code the UTF-8 encoded code point and use string.replace() for that: "ΓÇ¥" is how the character U+201D (“) looks like in the Latin-1 ASCII code page when it's actually encoded as UTF-8; if your editor and/or compiler/interpreter doesn't support Unicode source files, you can represent the three code units as "\xE2\x80\x9D" instead. Note that the above encoding for the U+201D character is only valid for UTF-8, but on the web as well as elsewhere, UTF-8 is by far the most common Unicode encoding.
Hey i'm having a pop at Fluid Motion (?) using cellular automata, its very basic and bad can anyone give me some tips? the biggest problem i have is it doesn't spread out, its more like sand... [code] function World:Fluid(x, y) -- 4 = water -- 1 = air -- 2 = sand -- 3 = dirt if world.map[x][y+1] == 1 then world.map[x][y] = 1 world.map[x][y+1] = 4 elseif world.map[x-1][y+1] == 1 and world.map[x-1][y] == 1 then world.map[x][y] = 1 world.map[x-1][y+1] = 4 elseif world.map[x+1][y+1] == 1 and world.map[x+1][y] == 1 then world.map[x][y] = 1 world.map[x+1][y+1] = 4 elseif world.map[x][y-1] == 4 then if world.map[x+1][y] == 1 then world.map[x][y] = 1 world.map[x+1][y] = 4 elseif world.map[x-1][y] == 1 then world.map[x][y] = 1 world.map[x-1][y] = 4 end end end [/code] [media]http://www.youtube.com/watch?v=PRlDnk2zj20[/media] image (it was too big) - [url]http://bambofy.co.uk/junk/migwl.png[/url]
I am bad at making tile art :(
[QUOTE=Map in a box;30705469]I am bad at making tile art :([/QUOTE] And you're working on making better tile art? :D
I put together (using various tutorials and examples) a server/client system. [img]http://i.imgur.com/4W2EX.png[/img] The server starts up, and client 0 and client 1 connects. Client 0 writes a message which the server resends to every client connected. Then Client 1 wrote a message as well which client 0 also received.
[QUOTE=Chris220;30705562]And you're working on making better tile art? :D[/QUOTE] Well, rendering the tileart on the screen has crappy and ocd-stressing spacing Other than that yes. <3 [editline]25th June 2011[/editline] Oh and a quick question, should I use a binary format for maps?
Soo... I was bored again, so I wrote a soft body spring simulator thing. [img]http://dl.dropbox.com/u/4081391/blob.gif[/img] It's really fun to play with :buddy: (also, as you can see, it's not really optimized, but it IS threaded so the "game" remains responsive :eng101:)
[QUOTE=Dlaor-guy;30706576]Soo... I was bored again, so I wrote a soft body spring simulator thing. [img]http://dl.dropbox.com/u/4081391/blob.gif[/img] It's really fun to play with :buddy: (also, as you can see, it's not really optimized, but it IS threaded so the game remains responsive :eng101:)[/QUOTE] You do some awesome stuff when you're bored :P Mind giving a small explanation of how this works? I wanna have a go at it.
[QUOTE=Dlaor-guy;30706576]Soo... I was bored again, so I wrote a soft body spring simulator thing. [img]http://dl.dropbox.com/u/4081391/blob.gif[/img] It's really fun to play with :buddy: (also, as you can see, it's not really optimized, but it IS threaded so the game remains responsive :eng101:)[/QUOTE] Teach me your ways
Just found this little gem in a few weeks old code: [code]this.turnDirection = Math.random() < 0.5 ? true : false;[/code] Must have been really tired that night...
It's not really that difficult. I have a list of positions, and every frame I loop through them and check the distance between all other positions, and based on that, I offset the current position either towards or away from the other position. I'm not really good at explaining it so here's a snippet of the code: (C#) [cpp]public void CalculateMotion() { for (int i = 0; i < Points.Count; i++) { for (int j = 0; j < Points.Count; j++) { if (i == j) continue; Vector2 v1 = Points[i]; Vector2 v2 = Points[j]; Vector2 diffVec = v1 - v2; if (diffVec.X == 0 && diffVec.Y == 0) continue; float dist = diffVec.LengthSquared; diffVec.Normalize(); diffVec *= dist - 45000; Points[i] -= diffVec / 40000f; } } }[/cpp] The magic numbers 45000 and 40000 respectively change the average distance between the points and the speed of adjusting the points. The latter is framerate dependant, so I still need to fix that. For the drawing, I loop through the points in pretty much the same way as shown above, but in this case I draw a line between them and change the alpha of it depending on the distance.
I would like to know how well / if Lewt will run on systems other than my own, so would any of you be able to test my current build? [url=http://anyhub.net/file/3ibD-lewt250611.7z][img]http://anyhub.net/file/3iaY-ss1000.png[/img] http://anyhub.net/file/3ibD-lewt250611.7z[/url] I've included my resource archive builder and the chunk editor in case you want to try them out. At the moment you just explore a randomly generated dungeon with skeletons to test my collision code etc. WASD to move. You'll probably need .NET 4.0. Edit: fixed a small bug and reuploaded
[QUOTE=Dlaor-guy;30707056]It's not really that difficult. I have a list of positions, and every frame I loop through them and check the distance between all other positions, and based on that, I offset the current position either towards or away from the other position. I'm not really good at explaining it so here's a snippet of the code: (C#) [cpp]public void CalculateMotion() { for (int i = 0; i < Points.Count; i++) { for (int j = 0; j < Points.Count; j++) { if (i == j) continue; Vector2 v1 = Points[i]; Vector2 v2 = Points[j]; Vector2 diffVec = v1 - v2; if (diffVec.X == 0 && diffVec.Y == 0) continue; float dist = diffVec.LengthSquared; diffVec.Normalize(); diffVec *= dist - 45000; Points[i] -= diffVec / 40000f; } } }[/cpp] The magic numbers 45000 and 40000 respectively change the average distance between the points and the speed of adjusting the points. The latter is framerate dependant, so I still need to fix that. For the drawing, I loop through the points in pretty much the same way as shown above, but in this case I draw a line between them and change the alpha of it depending on the distance.[/QUOTE] What kind of framerate are you getting with around 20 points? Also mind letting us have a go with it?
[QUOTE=Dlaor-guy;30707056]It's not really that difficult. I have a list of positions, and every frame I loop through them and check the distance between all other positions, and based on that, I offset the current position either towards or away from the other position. I'm not really good at explaining it so here's a snippet of the code: (C#) [cpp]<code snoop>[/cpp] The magic numbers 45000 and 40000 respectively change the average distance between the points and the speed of adjusting the points. The latter is framerate dependant, so I still need to fix that. For the drawing, I loop through the points in pretty much the same way as shown above, but in this case I draw a line between them and change the alpha of it depending on the distance.[/QUOTE] That's pretty cool. I'm gonna play around with something like this, I'll be sure to post anything interesting I come up with!
[QUOTE=Ziks;30707128]I would like to know how well / if Lewt will run on systems other than my own, so would any of you be able to test my current build?[/QUOTE] [img]http://www.1337upload.net/files/SS-2011-06-25_11.51.00.png[/img] Windows 7 64bit nvidia GTX260 [editline]25th June 2011[/editline] RSABuilder.exe works, ChunkEditor.exe has the same problem
[QUOTE=Ziks;30707128]I would like to know how well / if Lewt will run on systems other than my own, so would any of you be able to test my current build? [url=http://anyhub.net/file/3ibD-lewt250611.7z][img]http://anyhub.net/file/3iaY-ss1000.png[/img] http://anyhub.net/file/3ibD-lewt250611.7z[/url] I've included my resource archive builder and the chunk editor in case you want to try them out. At the moment you just explore a randomly generated dungeon with skeletons to test my collision code etc. WASD to move. You'll probably need .NET 4.0. Edit: fixed a small bug and reuploaded[/QUOTE] [img]http://filesmelt.com/dl/exception.PNG[/img] Tried to start it normally.
[QUOTE=Naelstrom;30707261]Windows 7 64bit nvidia GTX260 [editline]25th June 2011[/editline] RSABuilder.exe works, ChunkEditor.exe has the same problem[/QUOTE] Googleing around it seems that suggests that your drivers don't support OpenGL 3 features, although it might be something else. I'll see if I can find out more tomorrow. [editline]25th June 2011[/editline] [QUOTE=Dj-J3;30707383]Tried to start it normally.[/QUOTE] If I post a version tomorrow that outputs more debugging info could you test that?
[QUOTE=Ziks;30707402]If I post a version tomorrow that outputs more debugging info could you test that?[/QUOTE] Sure, no problem.
[QUOTE=Ziks;30707402]Googleing around it seems that suggests that your drivers don't support OpenGL 3 features, although it might be something else. I'll see if I can find out more tomorrow.[/QUOTE] All nVidia cards from the 8000 series and above support OpenGL 3.3, you just need to install some newer drivers. [url]http://www.nvidia.com/object/win7-winvista-64bit-275.33-whql-driver.html[/url] for win7 64-bit and GTX260.
[QUOTE=Ziks;30707128]I would like to know how well / if Lewt will run on systems other than my own, so would any of you be able to test my current build? [url=http://anyhub.net/file/3ibD-lewt250611.7z][img]http://anyhub.net/file/3iaY-ss1000.png[/img] http://anyhub.net/file/3ibD-lewt250611.7z[/url] I've included my resource archive builder and the chunk editor in case you want to try them out. At the moment you just explore a randomly generated dungeon with skeletons to test my collision code etc. WASD to move. You'll probably need .NET 4.0. Edit: fixed a small bug and reuploaded[/QUOTE] Works fine for me. Windows 7 x64, ATI videocard. [QUOTE=Richy19;30707189]What kind of framerate are you getting with around 20 points? Also mind letting us have a go with it?[/QUOTE] I'm getting around 300 FPS at 20 points. You can download it here: [url]http://dl.dropbox.com/u/4081391/blob.zip[/url] Left mouse to create a circle of points and right mouse to create a continuous stream of points. Space bar should delete all the points but it's throwing an exception instead and I'm too lazy to fix it.
Greetings, strangers. Here's a little project, I started to get used to C# and XNA. [media]http://www.youtube.com/watch?v=1k9fu3NwvDk[/media] Took me about two days to get this far and I still have some way to go. Next things to do will be better controlls and more gamemodes. I think I go with Dr Mario next. Any other ideas?
[QUOTE=Kaloffl;30707714]Greetings, strangers. Here's a little project, I started to get used to C# and XNA. [media]http://www.youtube.com/watch?v=XR_ASpVhMiQ[/media] (since the game has no sounds, i had to make them manualy with my keyboard :V ) Took me about two days to get this far and I still have some way to go. Next things to do will be better controlls and more gamemodes. I think I go with Dr Mario next. Any other ideas?[/QUOTE] watching the pieces awkwardly slide around and fall into place combined with the faint sound of you frantically slamming your keyboard keys made me laugh uncontrollably i am amused.
[QUOTE=Kaloffl;30707714]Greetings, strangers. Here's a little project, I started to get used to C# and XNA. [media]http://www.youtube.com/watch?v=XR_ASpVhMiQ[/media] (since the game has no sounds, i had to make them manualy with my keyboard :V ) Took me about two days to get this far and I still have some way to go. Next things to do will be better controlls and more gamemodes. I think I go with Dr Mario next. Any other ideas?[/QUOTE] Private video.
[QUOTE=Dlaor-guy;30707577] I'm getting around 300 FPS at 20 points. You can download it here: [url]http://dl.dropbox.com/u/4081391/blob.zip[/url] Left mouse to create a circle of points and right mouse to create a continuous stream of points. Space bar should delete all the points but it's throwing an exception instead and I'm too lazy to fix it.[/QUOTE] What version of OpenGL does it need? It just opens a blank command prompt but nothing else happens
[QUOTE=Ziks;30707128]I would like to know how well / if Lewt will run on systems other than my own, so would any of you be able to test my current build? [url=http://anyhub.net/file/3ibD-lewt250611.7z][img]http://anyhub.net/file/3iaY-ss1000.png[/img] http://anyhub.net/file/3ibD-lewt250611.7z[/url] I've included my resource archive builder and the chunk editor in case you want to try them out. At the moment you just explore a randomly generated dungeon with skeletons to test my collision code etc. WASD to move. You'll probably need .NET 4.0. Edit: fixed a small bug and reuploaded[/QUOTE] Opens fine for me, but every few seconds it'll freeze then it speeds up for a few seconds. AMD HD 5850 Windows 7 64 bit
I got an issue with the textures (look rotated or inverted or something) [img]http://i.imgur.com/J18Wz.png[/img] win7 64bit GTX260
Sorry, you need to Log In to post a reply to this thread.