• What are you working on? v16
    5,004 replies, posted
[QUOTE=Moustach3;29028904][img]http://gyazo.com/99bdfce864bcc25f3a70d51bef4329cc.png[/img][/QUOTE] Does anyone else see that in 3D?
[QUOTE=Tamschi;29033142]Does anyone else see that in 3D?[/QUOTE] Wow I was going to rate you dumb but yeah actually I do [QUOTE=Moustach3;29028904]I modified Conway's game of life to have two "factions", red and blue. I added a single rule: -If three pixels of the opposite color surround a pixel, that pixel dies. [img]http://gyazo.com/99bdfce864bcc25f3a70d51bef4329cc.png[/img][/QUOTE]
[QUOTE=high;29026269]Ugh, [csharp]if (tcp.Poll(1, SelectMode.SelectRead) && tcp.Available == 0) { //Disconnected } [/csharp] is not working on linux :\[/QUOTE] Since polling doesn't seem to be working on linux for checking if a socket is disconnected. What would be another way to check for a non-blocking socket?
Been working on a Binary Space Partitioning algorithm lately. It only supports horizontal and vertical split planes, otherwise things would get too complicated. It looks pretty nice though :buddy: (media-tagged due to size) [media]http://filesmelt.com/dl/Untitled-1_0001_Layer-2.png [url]http://filesmelt.com/dl/Untitled-1_0002_Layer-1.png[/url] [url]http://filesmelt.com/dl/Untitled-1_0000_Layer-3.png[/url] [url]http://filesmelt.com/dl/Untitled-2_0002_Layer-2.png[/url] [url]http://filesmelt.com/dl/Untitled-2_0003_Layer-1.png[/url] [url]http://filesmelt.com/dl/Untitled-2_0001_Layer-3.png[/url] [url]http://filesmelt.com/dl/Untitled-2_0000_Layer-4.png[/url] [url]http://filesmelt.com/dl/betteralg.png[/url] [url]http://filesmelt.com/dl/betteralg2.png[/url][/media] Also, the last 2 pics show an improved algorithm that prevents the width/height ratio from going over 4 to prevent extremely long/thin segments, as seen in the previous picture. EDIT: Bonus picture, improved algorithm + color! [img]http://i.imgur.com/Emvzy.png[/img]
Now use it as a map of a city with blocks. It looks really cool.
[QUOTE=Dlaor-guy;29033899] [img_thumb]http://i.imgur.com/Emvzy.png[/img_thumb][/QUOTE] That looks like an awesome effect. (Maybe you could use it for procedural scifi-ish textures?)
You could make it a [url=http://en.wikipedia.org/wiki/Greeble]greeble[/url] algorithm.
[QUOTE=neos300;29007039]A property is always read, even if it is 0 it just is read and it moves to the next property. Property's don't end with 0.[/QUOTE] Oh, I forgot about the property identifier. [QUOTE=neos300;29007039]What are magical bytes?[/QUOTE] [url]http://en.wikipedia.org/wiki/File_format#Magic_number[/url] A bunch of constant bytes present at each file-header to identify the format. [QUOTE=neos300;29007039]The game id isn't anti-piracy, it's just to keep the game from crashing from not having the proper entites.[/QUOTE] Anti-piracy is not what I implied. It's just that, say you use game id 0, make the engine public, a bunch of people want to use it and now we have multiple 1s. If you would use a string instead the chance of this happening would be lower. On the other hand, if people make a map for game A and someone tries to use it on game B he shouldn't expect it to work properly. The game doesn't have to crash, it could just be wrong (when there are entities with the same name, but different behavior or properties) or simply output a warning and perhaps refuse to load it. [QUOTE=neos300;29007039]The entity types are defined as strings in the engine, and this map editor isn't constrained to one game, it's used for all games made with this engine, and it needs to be dynamic.[/QUOTE] You could use some kind of game definition files, though when adding entities to the game code, you'd also have to update the game definition, unless you have some nifty interface that can loop through all entities in the code and automagically loop through each entity and thus the game definition file would be the game itself. I guess strings and ids have both their advantages and disadvantages. [QUOTE=neos300;29007039]Again, the map editor doesn't know about the property's of entites, it doesn't assume anything about them. I should have put an etc. in that property list, there are many more (you could have infinite, the property map is transformed into a std::map)[/QUOTE] Well, I think an unsigned 16-bit number would usually be enough if you want to associate the properties to their number. [QUOTE=neos300;29007039]'Also, are only bytes or multiple thereof supported?' Not really understanding what you are getting at here.[/QUOTE] I meant if you can specify a variable having n bits (as opposed to bytes) of size. This way you could pack stuff more tightly.
[QUOTE=benjojo;29022867][media]http://www.youtube.com/watch?v=RUKSRct95aI[/media] Code: (For all, Public domain, I don't care what you do with it.) [url]http://pastebin.com/6XASysWA[/url] [highlight] WARNING WORST CODE YOU WILL EVER SEE [/highlight] Also if anyone was wondering the code compiles to around 8.1KB. Also, can someone give me pointers on how to do the whole java short to int?[/QUOTE] lol i just bought arduino yesterday.And im working on a project with light sensor and motors to detect the sun and move a motor witch is atached to a mirror to point my window so there can be light free alll the day.
[QUOTE=Tamschi;29033142]Does anyone else see that in 3D?[/QUOTE] Oh god it's like the red is floating on the blue! [QUOTE=Moustach3;29028904]I modified Conway's game of life to have two "factions", red and blue. I added a single rule: -If three pixels of the opposite color surround a pixel, that pixel dies. [img_thumb]http://gyazo.com/99bdfce864bcc25f3a70d51bef4329cc.png[/img_thumb][/QUOTE]
[QUOTE=Moustach3;29028904][img_thumb]http://gyazo.com/99bdfce864bcc25f3a70d51bef4329cc.png[/img_thumb][/QUOTE] It looks like a coastline to me. Maybe this thing of yours could be useful for generation of maps?
I uploaded RawFile's source to GitHub: [url]https://github.com/Tamschi/RawFile[/url]. I'll make a few example plugins in the next days, but the interface should have enough documentation for everyone to get started.
I'm so glad I save all my test programs for Kento. Apparently the last rewrite broke everything but the last example.
[QUOTE=high;29033690]Since polling doesn't seem to be working on linux for checking if a socket is disconnected. What would be another way to check for a non-blocking socket?[/QUOTE] pingpong
[QUOTE=Darwin226;29036614]I'm so glad I save all my test programs for Kento. Apparently the last rewrite broke everything but the last example.[/QUOTE] What do you intend to do with it when it's finished?
[QUOTE=Jallen;29036872]What do you intend to do with it when it's finished?[/QUOTE] Program? :v:
[QUOTE=Jallen;29036872]What do you intend to do with it when it's finished?[/QUOTE] Interface it with my OpenTK wrapper and see what it can do :D
So I finally found time to fix my Fedora install. Whats the quickest way to start programming in C++ on Linux? Recommend me an IDE or something... I've already installed gcc.
[QUOTE=DeadKiller987;29037375]So I finally found time to fix my Fedora install. Whats the quickest way to start programming in C++ on Linux? Recommend me an IDE or something... I've already installed gcc.[/QUOTE] gedit, nano, emacs, or vim with the command line. Or use Code::Blocks.
[QUOTE=DeadKiller987;29037375]So I finally found time to fix my Fedora install. Whats the quickest way to start programming in C++ on Linux? Recommend me an IDE or something... I've already installed gcc.[/QUOTE] code blocks! that seems to be fairly standard Edit: Damn ninjas.
Well, my program decided to optimize it self and now runs 3 times faster... Fuck me if I did something... [editline][/editline] Btw, I fixed the bug. It was caused by local variables getting destroyed when exiting the scope, even if that scope was a class definition. One line fix did the trick.
[QUOTE=DuCT;29037560]gedit, nano, emacs, or vim with the command line. Or use Code::Blocks.[/QUOTE] I'll try Code::Blocks. What are the advantages of learning to use vim or emacs? I hear good things about them, but are they really THAT good?
[QUOTE=Darwin226;29037640]Well, my program decided to optimize it self and now runs 3 times faster... Fuck me if I did something... [editline][/editline] Btw, I fixed the bug. It was caused by local variables getting destroyed when exiting the scope, even if that scope was a class definition. One line fix did the trick.[/QUOTE] Debug/Release mode?
Nope. Everything is the same as yesterday. The only thing I changed is wrapping up Dictionary<string, Reference> into a separate class. That, if anything, should make it slower. Yet it runs faster.
[QUOTE=Jallen;29035720]Oh god it's like the red is floating on the blue![/QUOTE] Try shaking your head while looking at it. [editline]Not. I'm just using this as separator.[/editline] Example plugin for plain text: [img]http://dl.dropbox.com/u/5013896/forum/Facepunch/Programming%20WAYWO/RawFile/Plugins/PlainText.png[/img] Source: [url]http://dl.dropbox.com/u/5013896/forum/Facepunch/Programming%20WAYWO/RawFile/Plugins/PlainText.txt[/url]
[QUOTE=esalaka;29035765]It looks like a coastline to me. Maybe this thing of yours could be useful for generation of maps?[/QUOTE] That's what I thought it was. It kind of looks like the coast of the eastern U.S. It even has one of the Great Lakes. No Canada though.
[QUOTE=Jallen;29035720]Oh god it's like the red is floating on the blue![/QUOTE] You wear glasses? That's probably it. Mine do that too.
[QUOTE=Ortzinator;29039420]You wear glasses? That's probably it. Mine do that too.[/QUOTE] Nope :v:
[QUOTE=DeadKiller987;29037660]I'll try Code::Blocks. What are the advantages of learning to use vim or emacs? I hear good things about them, but are they really THAT good?[/QUOTE] They're swiss army knives with wonderful portability and hackability. They won't die off any time soon, and they can be scripted to your wish - do pick one, it's a skill that'll last, and for a good reason. There's a tossup between vi[m] and emacs: vim's control scheme is pretty concise and is composable, it's guaranteed to exist on any *nix and for the most part as part of the base install, and it's pretty nimble. It's a very, very good text editor once you become fluent but can be kludged into other things. Emacs is an 88-tall Swiss Army knife - it's a heavy installation and won't usually come installed but slightly less cryptic to use and play around with, is self documenting, and with some scripting (although it comes with plenty of batteries included) can do everything from edit binaries in hex mode, to acting as an IRC client, to replacing your IDE complete with REPL and debugger, to running roguelikes, to emulating vi's text editing behavior. What it doesn't have is a good all-in-one text editor mode. (You can use both with the commandline as well and as widgeted apps, but the visual cues that come with a GUI are worth it.)
HOLY FUCKING FUCK YES! Finally got FFT working. I can now play a metal piece and have millions up to 1024 pixels jump according to the beat and such... THIS IS AWESOME!
Sorry, you need to Log In to post a reply to this thread.