• Programming - WAYWO - V.37
    1,000 replies, posted
[QUOTE=dije;39998126]Facepunch, we need to code more! There aren't enough highlights in the OP! :tinfoil:[/QUOTE] I have too much coursework to be coding. :(
[QUOTE=dije;39998126]Facepunch, we need to code more! There aren't enough highlights in the OP! :tinfoil:[/QUOTE] I am adding functions to my language's syntax documentation and compiler so 99 bottles of beer will be possible if that interests you.
[QUOTE=Robber;40000713]I continued with my plans for my AR Drone and my app actually just crashed while the drone was hovering and I panicked and turned off wifi and hoped the drone would just land itself, but it just continued hovering there and could have flown of into the bushes any second (because it's super windy atm). I tried grabbing the drone mid air and pushing it to the ground but the darn thing wouldn't turn of. Then I remembered that it had a emergency shut off when it flipped over so i tried turning it over which the drone obviously registered and tried to fight against it and became super angry (or just loud because it tried to counteract me). Programming isn't usually this exciting :v:[/QUOTE] If you're good at electronics, you can hook up a small radio receiver like the ones found in garage doors (hopefully with a bit better range) and program the drone to override the instructions from the Android and just land. Or you can invest in a few hundred light-weight dog leashes.
[quote=amcwatters]This makes my penis very stiff, A++ By any chance are you able to apply simple textures?[/quote] I know I can apply textures yeah but I'm not sure how fast it will be. I might save that for drawing text. [editline]22nd March 2013[/editline] There are ways you could draw simple patterns across the polygons using a stencil buffer and/or blending. [editline]22nd March 2013[/editline] Also if anyone here knows jack shit about quaternions I DESPERATELY NEED SOME HELP. Please message me on steam.
[IMG]http://content.screencast.com/users/cartman300/folders/Jing/media/57479759-59af-493f-9b9e-7e42f95a2106/2013-03-22_2114.png[/IMG] I wanted to make a game but then i accidentally made XRAY application, it shows desktop.
[QUOTE=cartman300;40003023][IMG]http://content.screencast.com/users/cartman300/folders/Jing/media/57479759-59af-493f-9b9e-7e42f95a2106/2013-03-22_2114.png[/IMG] I wanted to make a game but then i accidentally made XRAY application, it shows desktop.[/QUOTE] That is actually pretty damn cool.
I once made an OpenGL window that would just slide to the right and go off the screen. I still have no idea how I managed to do that.
I added very basic pipes and folder actions to my test console, so now I can write [code]==> all>with tag>save to dir With tag>LMMS Directory to save to>"F:\Landfill Export Test"[/code] to retrieve files. I also made the availability a distinct status so I can drop and delete files with a something>drop>purge chain without deleting the names (which is OK for testing but definitely not a sensible thing to do).
Got in flat shading to my LOVE 3d framework. Coming along well :D. Just need to finish the camera bug. I did testing and I'm able to render ~8000 polys on mediocre hardware at decent FPS. Any choppyness is caused by recording, it's amazingly smooth here.
[QUOTE=Jawalt;40002348][...] Also if anyone here knows jack shit about quaternions I DESPERATELY NEED SOME HELP. Please message me on steam.[/QUOTE] [URL="http://www.iquilezles.org/www/articles/quaternions/quaternions.htm"]This is a very good explanation.[/URL]
[QUOTE=Tamschi;40004547][URL="http://www.iquilezles.org/www/articles/quaternions/quaternions.htm"]This is a very good explanation.[/URL][/QUOTE] I know the basics but I'm having a problem with camera movement that I'd need someone more versed in quaternions than I to help me with.
Gonna prepare for the worst critcism, but I will steel through it. [url]https://github.com/hogofwar/NameGen[/url]
[QUOTE=cartman300;40003023][IMG]http://content.screencast.com/users/cartman300/folders/Jing/media/57479759-59af-493f-9b9e-7e42f95a2106/2013-03-22_2114.png[/IMG] I wanted to make a game but then i accidentally made XRAY application, it shows desktop.[/QUOTE] The same thing happened to me when I was trying to draw directly to the desktop with C++. I ended up with a really cool x-ray window.
[QUOTE=hogofwar;40004655]Gonna prepare for the worst critcism, but I will steel through it. [URL]https://github.com/hogofwar/NameGen[/URL][/QUOTE] It looks fine structure-wise but your usage of String is really cringe-worthy. If you create a string by appending text a few times use StringBuilder instead. It's much faster because it avoids the string pool. The lists in nameBase should really be ArrayList<char> as you only store one character at a time. char has a much smaller footprint than String because there are no references involved. The way your rebuild the keys for nameBase is pretty bad too, either use a substring on strLine or make a Pair class that takes care of comparisons. (The latter is most likely faster.) There's a duplicate check for [I]once[/I] in line 81 (remove the rightmost one). I really doubt "" + as replacement for .toString() is good practice, although the compiler probably optimizes that out.
[QUOTE=Tamschi;40005114]It looks fine structure-wise but your usage of String is really cringe-worthy. If you create a string by appending text a few times use StringBuilder instead. It's much faster because it avoids the string pool. The lists in nameBase should really be ArrayList<char> as you only store one character at a time. char has a much smaller footprint than String because there are no references involved. The way your rebuild the keys for nameBase is pretty bad too, either use a substring on strLine or make a Pair class that takes care of comparisons. (The latter is most likely faster.) There's a duplicate check for [I]once[/I] in line 81 (remove the rightmost one). I really doubt "" + as replacement for .toString() is good practice, although the compiler probably optimizes that out.[/QUOTE] Thanks for the feedback, could you clarify your third point though? (The rebuilding of keys one)
[QUOTE=hogofwar;40005388]Thanks for the feedback, could you clarify your third point though? (The rebuilding of keys one)[/QUOTE] You use c[i] + "" + c[i + 1] a few times. A faster way to do this is strLine.substring(i, i + 2) , as that only creates one string. You can also make it a bit faster by storing this in a variable instead of recomputing it each time it's used. The reason I mentioned a Pair class is the string pool: Every time a String is created, Java checks if it already exists and reuses the existing String if possible. This means Strings are efficient regarding memory use, but creating a large number of strings is very slow. If you have a class that stores two chars and implements the methods necessary to act as key in a HashMap, you can circumvent the string pool and only check against the keys in the HashMap. StringBuilder is similar, it most likely contains a char array and a length variable in some form instead of using String. [editline]23rd March 2013[/editline] [code]By Edgar Allan Poe True! --nervous --very, very slowly, so that I am nervous: so I am. And now at the police office, and they (the officers) had been lodged at the idea; and perhaps he heard me; for he moved on the bed listening; --just as I gazed upon it. I saw it with perfect distinctness --all a dull blue, with a he ightened voice. Yet the sound increased --and what could I do? It was not the ol d man sprang up in the bed. His fears had been ever since growing upon him. He h ad the eye of a vulture --a pale blue eye, with a heightened voice. Yet the soun d increased --and what could I do? It was the low stifled sound that arises from the bottom of the old man. He had the eye forever. Now this is the beating of t he sense? --now, I say, there came a knocking at the police office, and they (th e officers) had been heard by a neighbour during the night; suspicion of foul pl ay had been heard by a neighbour! The old man than during the whole week before I killed him. And every morning, when the day broke, I went to work! I was singu larly at ease. They sat, and while I answered cheerily, they chatted of familiar things. But, ere long, I felt the extent of my head within the opening so far t hat I am mad? The disease had sharpened my senses --not destroyed --not dulled t hem. Above all was the low stifled sound that arises from the flooring of the po lice. A shriek had been sitting, and grated it upon the damned spot. And have I not told you that what you mistake for madness is but over-acuteness of the old man. He had never wronged me. He had been too wary for that. A tub had caught al l --ha! ha! When I had made an opening sufficient for my head, I put in a hearty tone, and inquiring how he has passed the night. So you see he would have been a very profound old man, and thus rid myself of the eye forever. Now this is the beating of the unperceived shadow that caused him to the death watches in the c ountry. I took for the concealment of the soul when overcharged with awe. I knew the sound well. Many a night, just at twelve, I looked in upon him while he sle pt. Upon the eighth night I was more than usually cautious in opening the door. A watch's minute hand moves more quickly --more vehemently; but the noise was no t the old man. He had been deputed to search the premises. I smiled, --for what had I now grew very pale; --but I found that the noise steadily increased. Oh Go d! what could I do? I foamed --I raved --I swore! I swung the chair upon which I had directed the ray upon the heart increased. It grew quicker and quicker, and louder every instant. The old man was dead. I placed my own bosom, deepening, w ith its dreadful echo, the terrors that distracted me. I say I knew that sound w ell, too. It was a low, dull, quick sound --much such a sound as a watch makes w hen enveloped in cotton. I knew it was his eye! yes, it was this! He had never w ronged me. He had the eye forever. Now this is the point. You fancy me mad. Madm en know nothing. But you should have seen me. You should have seen me. You shoul d have seen how wisely I proceeded --with what dissimulation I went boldly into the chamber, and spoke courageously to him, calling him by name in a high key an d with a muffled sound. This, however, did not vex me; it would not be gone? I p aced the floor to and fro with heavy strides, as if startled. Now you may think that I am mad? The disease had sharpened my senses --not destroyed --not dulled them. Above all was the beating grew louder, I say, there came a knocking at the street door. I went boldly into the chamber, and spoke courageously to him, cal ling him by name in a hearty tone, and inquiring how he has passed the night. So you see he would have been extreme! It grew louder --louder --louder! And still the men --but the noise steadily increased. Oh God! what could I do? I foamed - -I raved --I swore! I swung the chair upon which I had been and am; but why will you say that I am mad? The disease had sharpened my senses --not destroyed --no t dulled them. Above all was the mournful influence of the old man who vexed me, but his Evil Eye. And every morning, when the day broke, I went boldly into the room. He shrieked once --once only. In an instant I dragged him to feel --altho ugh he neither saw nor heard --to feel the presence of my head within the openin g so far done. But, for many minutes, the heart increased. It grew louder, loude r! I thought the heart must burst. And now at the idea; and perhaps he heard me; for he moved on the bed suddenly, as if startled. Now you may think that I am m ad? The disease had sharpened my senses --not destroyed --not dulled them. Above all was the low stifled sound that arises from the bottom of the soul when over charged with awe. I knew it was the groan of pain or of grief --oh, no! --it was the low stifled sound that arises from the bottom of the soul when overcharged with awe. I knew the sound increased --and what could I do? It was the mournful influence of the unperceived shadow that caused him to feel --although he neithe r saw nor heard --to feel the presence of my confidence, I brought chairs into t he room. He shrieked once --once only. In an instant I dragged him to feel --alt hough he neither saw nor heard --to feel the presence of my own in a hearty tone , and inquiring how he has passed the night. So you see he would have laughed to see how cunningly I thrust it in! I moved it slowly --very, very dreadfully ner vous I had been deputed to search the premises. I smiled, --for what had I to fe ar? I bade the gentlemen welcome. The shriek, I said, was my own bosom, deepenin g, with its dreadful echo, the terrors that distracted me. I say I knew what the old man. He had been saying to himself --'It is nothing but the noise steadily increased. Why would they not be heard by a neighbour during the night; suspicio n of foul play had been aroused; information had been aroused; information had b een deputed to search the premises. I smiled, --for what had I now to fear? I ba de the gentlemen welcome. The shriek, I said, was my own powers --of my sagacity . I could see him as he lay upon his bed. Ha! would a madman have been extreme! It grew quicker and quicker, and louder and louder every instant. The old man's hour had come! With a loud yell, I threw open the lantern and leaped into the ro om, and desired them here to rest from their fatigues, while I myself, in the wa ll. Presently I heard many things in the heaven and in the country. I took my vi sitors all over the house. I bade them search --search well. I led them, at leng th, to his chamber. I showed them his treasures, secure, undisturbed. In the ent husiasm of my head within the room. He shrieked once --once only. In an instant I dragged him to the death watches in the country. I took for the concealment of the unperceived shadow that caused him to feel --although he neither saw nor he ard --to feel the presence of my own in a hearty tone, and inquiring how he has passed the night. So you see he would have laughed to see how cunningly I thrust in my ears: but still they sat and still chatted. The ringing became more disti nct: I talked more fluently, and with a muffled sound. This, however, did not he ar him lie down, I resolved to open it with a film over it. Whenever it fell upo n me, my blood ran cold; and so by degrees --very gradually --I made up my mind to take the life of the men chatted pleasantly, and smiled. Was it possible they heard not? Almighty God! --no, no! They heard! --they suspected! --they knew! - -they were making a mockery of my confidence, I brought chairs into the chamber, and spoke courageously to him, calling him by name in a dark lantern, all close d, closed, that no human eye --not even his --could have detected any thing wron g. There was nothing to wash out --no stain of any kind --no blood-spot whatever . I had been trying to fancy them causeless, but could not. He had the eye of a drum stimulates the soldier into courage. But even yet I refrained and stood sti ll. But the beating of his hideous heart!'[/code] :v: (I cheated a bit by using some "clever" code and a few things that aren't possible in Java.) [editline]23rd March 2013[/editline] Fun with operators: [csharp]var theTellTaleRaven = theTellTaleHeart + theRaven;[/csharp] [code]By Edgar Allan Poe Once upon a midnight dreary, while I answered cheerily, they chatted of familiar things. But, ere long, I felt myself getting pale and wished them gone. My head ached, and I knew it was impossible to do the work; for it w as the mournful influence of the body. The night waned, and I kept quite still a nd said nothing. For a whole hour I did not vex me; it would not be heard by a n eighbour during the whole week before I killed him. And every morning, when the day broke, I went down to open it with perfect distinctness --all a dull blue, w ith a heightened voice. Yet the sound increased --and what could I do? I foamed --I raved --I swore! I swung the chair upon which I had been lying awake ever si nce growing upon him. He had never given me insult. For his gold I had been sitt ing, and grated it upon the damned spot. And have I not told you that I am nervo us: so I am. And now a new anxiety seized me --the sound would be heard by a nei ghbour! The old man was dead. I removed the bed suddenly, as if his soul in that one word he did outpour. Nothing further then he uttered- not a minute stopped or stayed he;But, with mien of lord or lady, perched above my chamber door, With such name as 'Nevermore.' But the fact is I was napping, and so it was this! He had been lodged at the street door. I went to work! I was napping, and so gentl y you came tapping, tapping at my chamber door- Perched upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgo tten lore, While I nodded, nearly napping, suddenly there came a knocking at the police office, and they (the officers) had been deputed to search the premises. I smiled, --for what had I to fear? There entered three men, who introduced the mselves, with perfect distinctness --all a dull blue, with a light heart, --for what had I now to fear? I bade them search --search well. I led them, at length, I found the eye forever. Now this is the point. You fancy me mad. Madmen know n othing. But you should have seen how wisely I proceeded --with what caution --wi th what dissimulation I went down to open the lantern, when my head within the o pening so far that I might not disturb the old man, indeed, to suspect that ever y night, just at twelve, I looked in upon him while he slept. Upon the eighth ni ght I was singularly at ease. They sat, and while I pondered, weak and weary, Ov er many a flirt and flutter, In there stepped a stately raven of the spider, sho t from out my heart, I stood repeating, ''Tis some visitor entreating entrance a t my window lattice: Let me see, then, what thereat is, and this mystery explore ;- 'Tis the wind and nothing more. Back into the room, I undid the lantern and l eaped into the tempest and the arms and the Night's Plutonian shore! Leave no bl ack plume as a watch makes when enveloped in cotton. I gasped for breath --and y et the officers heard it not. I talked more quickly --more vehemently; but the n oise was not a minute stopped or stayed he;But, with mien of lord or lady, perch ed above my chamber door, With such name as 'Nevermore.' But the beating of a vu lture --a pale blue eye, with a film over it. Whenever it fell upon the heart an d held it there many minutes. There was nothing to wash out --no stain of any ki nd --no blood-spot whatever. I had been trying to fancy them causeless, but coul d not. He had been lying awake ever since growing upon him. He had the eye forev er. Now this is the beating of a demon's that is dreaming, And the silken sad un certain rustling of each purple curtain Thrilled me- filled me with fantastic te rrors never felt before; So that now, to still the beating of his hideous heart!'[/code]
I'm not sure where I'm going with this. This is what I have so far - a simple scene (the models and textures aren't mine): [thumb]http://puu.sh/2mgYO[/thumb] Here is the same scene, at night - with rudimentary headlight sprites and a dynamic light. [thumb]http://puu.sh/2mh19[/thumb] It's cute when I look back and see how this was all expanded from [url=http://puu.sh/2mh2T]a simple experiment.[/url]
[media]http://soundcloud.com/tamschi/f-r-elise-in-trigrams[/media] That didn't work so well. Trigrams are too short to preserve structure, maybe around 1 1/2 of a measure would work better. It's not properly integrated into the synth, I just made it override the notes in the piano roll.
[QUOTE=Tamschi;40008511][media]http://soundcloud.com/tamschi/f-r-elise-in-trigrams[/media] That didn't work so well. Trigrams are too short to preserve structure, maybe around 1 1/2 of a measure would work better. It's not properly integrated into the synth, I just made it override the notes in the piano roll.[/QUOTE] I used something similar to this I think generating words once. I had trigrams/bigrams/unigrams of each letter combo and I could figure out how likely letters were to come up to one another. It could tell whether or not you could find the word in a dictionary fairly reliably. [editline]23rd March 2013[/editline] [media]http://www.youtube.com/watch?v=N52PiAvBmOo[/media] I nearly doubled performance today, and I decided to render the classic teapot. You can see depth sorting issues here, but I'll fix that soon. It's only 60-90 fps while recording. It gets ~280 fps without recording, which is impressive considering it's in Lua and all of it is software expect the actual rasterization. I can now render 10,000 lit polygons at 60 fps. [editline]23rd March 2013[/editline] The question I keep getting asked: Why don't you bind OpenGL? A) I am aiming for oldschool polygonal graphics anyway. B) It's been a really cool learning experience. C) Perhaps most importantly, I'd have to ship my own version of LOVE or something, with this anyone with LOVE can use it. (Although without LuaJIT it's going to be markedly slower, but that's not much of an issue as you can just package your .love with a LuaJIT enabled executable :) )
[QUOTE=Jawalt;40004572]I know the basics but I'm having a problem with camera movement that I'd need someone more versed in quaternions than I to help me with.[/QUOTE] Why don't you have a library to work with/manipulate quaternations?
[QUOTE=OldFusion;40008813]Why don't you have a library to work with/manipulate quaternations?[/QUOTE] I already figured it out. I couldn't find a nice one for Lua so i wrote my own.
It chains N-grams now but that doesn't help much because I got the octaves wrong :rolleyes: It's good for somewhat coherent storytelling though, apparently. [editline]MOBY DICK - Edgar Allen Poe =[/editline] "MOBY DICK OR THE WHALE KILLER." :v:
With the wonderful help from Rama (Ralle105 on here), I optimized my chunk building to these speeds: [t]https://dl.dropbox.com/u/41041550/Coding/C%23/OGLFV/omg_stats.PNG[/t] Before the optimization, it was this: [t]https://dl.dropbox.com/u/41041550/Coding/C%23/OGLFV/stats.PNG[/t] And as a goodie, have a 25x25 area that I loaded in 21 seconds: [t]https://dl.dropbox.com/u/41041550/Coding/C%23/OGLFV/blockLighting.PNG[/t]
So... In the past 24 hours I've... Accidentally removed my Boot Loader (I was installing GRUB and it removed my windows boot loader without installing itself properly) Killed my Linux Distro... Twice (Fixed Now) And broke a glass in the kitchen. How to computer? In other news: MongoDB is AWESOME!
[QUOTE=Contron;40006988]I'm not sure where I'm going with this. This is what I have so far - a simple scene (the models and textures aren't mine): [thumb]http://puu.sh/2mgYO[/thumb] Here is the same scene, at night - with rudimentary headlight sprites and a dynamic light. [thumb]http://puu.sh/2mh19[/thumb] It's cute when I look back and see how this was all expanded from [url=http://puu.sh/2mh2T]a simple experiment.[/url][/QUOTE] Higher res textures, more deliberate art style and the bottom screenshot is an insta buy for me. Looks like a start to a great adventure game.
I am making a program to evaluate the validity of symbolic logical arguments, via truth table. I have gotten it to show the value of an expression for each possible combination of variable values so far. I just love the way my evaluation function turned out: [code] public static boolean evaluate(String postEx, char[] vars, boolean[] values){ char[] expression = postEx.toCharArray(); Stack<Boolean> valueStack = new Stack<>(); for(int i = 0; i<expression.length; i++){ if(inArray(order,expression[i])){ switch(expression[i]){ case '~': valueStack.push(!valueStack.pop()); break; case '*': valueStack.push(valueStack.pop() & valueStack.pop()); break; //must remove both values case '+': valueStack.push(valueStack.pop() | valueStack.pop()); break; case '>': valueStack.push(valueStack.pop() | !valueStack.pop()); break; //come in reverse order case '=': valueStack.push(valueStack.pop() == valueStack.pop()); break; } }else{ for(int j = 0; j<vars.length; j++){ if(expression[i] == vars[j]){ valueStack.push(values[j]); break; } } } } return valueStack.pop(); } [/code] I switched and with * and or with + and implication with > so it would be easier to type stuff in when it's done.
[QUOTE=Loli;40011015]So... In the past 24 hours I've... Accidentally removed my Boot Loader (I was installing GRUB and it removed my windows boot loader without installing itself properly) Killed my Linux Distro... Twice (Fixed Now) And broke a glass in the kitchen. How to computer? In other news: MongoDB is AWESOME![/QUOTE] I don't remember MongoDB being so difficult to install.
[QUOTE=danharibo;40011521]I don't remember MongoDB being so difficult to install.[/QUOTE] SiPlus tried to install MongoDB three weeks ago. He hasn't posted since.
[QUOTE=Jookia;40011613]SiPlus tried to install MongoDB three weeks ago. He hasn't posted since.[/QUOTE] It probably blew up in his face.
[QUOTE=NightmareX91;40011694]It probably blew up in his face.[/QUOTE] Never go full NoSQL
Sorry, you need to Log In to post a reply to this thread.