• What are you working on? v19
    6,590 replies, posted
look what I made everyone! it's a really rudimentary audio synthesiser! [url=http://dl.dropbox.com/u/6929441/screenshots/soundkit01.png][img]http://dl.dropbox.com/u/6929441/screenshots/soundkit01.png[/img][/url] Right now the output is always signed 32-bit, and the endianness depends on your system architecture. It's got sawtooth, sine, square and triangular wave outputs, plus clipping (not shown). It doesn't playback yet, you need to import it as raw into audacity. I'll add options for changing this all pretty soon, but I think for first-time ever GUI attempt in C++ with Qt, it's a pretty good effort.
[IMG]http://i.imgur.com/XFZmc.png[/IMG] Now here's my question, do I do a simple "c:\python27" or do I have to manually put down systemroot and all that smooth jazz?
[QUOTE=No Party Hats;31148489]Also, is there a place for me to post my minuscule advances in the field of Programming? I don't wanna be banned :v:[/QUOTE] /dev/null [highlight](User was permabanned for this post ("No, Conna." - Overv))[/highlight]
-Disregard this, I was reading the fucking OSX instructions haha-
[QUOTE=egowhore;31148577]/dev/null[/QUOTE] There's no need to be an asshat to someone new to programming.
Shit. I made this: [code]print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.'[/code] and when I put "C:\users\dylan\pythonshit\start python ex1.py" it just opens and closes Python's Command Line instantly. [editline]16th July 2011[/editline] Also, how do I get the [code] tags with the line numbers?
[QUOTE=No Party Hats;31148861]Shit. I made this: [code]print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.'[/code] and when I put "C:\users\dylan\pythonshit\start python ex1.py" it just opens and closes Python's Command Line instantly. [editline]16th July 2011[/editline] Also, how do I get the [code] tags with the line numbers?[/QUOTE] [noparse] I think that's a different tag like [lua][/lua] or [html][/html] or [php][/php] [/noparse]
[QUOTE=No Party Hats;31148861]Shit. I made this: [code]print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.'[/code] and when I put "C:\users\dylan\pythonshit\start python ex1.py" it just opens and closes Python's Command Line instantly. [editline]16th July 2011[/editline] Also, how do I get the [code] tags with the line numbers?[/QUOTE] That's because it just prints your text and after it's done doing what it needs to do, it closes.
[QUOTE=iNova;31149011]That's because it just prints your text and after it's done doing what it needs to do, it closes.[/QUOTE] So I need to put a "pause" at the end? Or does Python not use pause?
Add this to the end [lua] print input("Press Enter key to exit") [/lua]
Thanks above.
[QUOTE=No Party Hats;31149127]Thanks above.[/QUOTE] Here's a bunch of python coding resources from the (Australian) National Computer Science School competitions. [url=http://www.importsoul.net/file/NCSS-2010-Questions.zip]2010 Notes and Advanced Questions and Answers[/url] [url=http://dl.dropbox.com/u/6929441/NCSS2010-Beginners.docx]2010 Beginner Questions[/url] [url=http://dl.dropbox.com/u/6929441/NCSS2009Q.zip]2009 Beginner and Advanced Questions[/url] Yeah that's all I could find. Hope it helps you out learning python :smile:
You're wonderful.
Working on a critical hit hack for TF2. Say your weapon fires every 20 ticks. That means you have a chance to crit every 20 ticks if you fire continuously. But if you get a crit on tick 10, you missed that crit. If you wait until you get a crit, you now have a chance to crit every tick instead of only when you fire. The downside is you have to wait some time to fire. [code] uint *globalSeed = MakePointerGEN<uint>(hClient, 0xOffset); uint *weaponSeed = MakePointerGEN<uint>(pBaseWeapon, 0xOffset); int oldSeed = *globalSeed; uint oldWeaponSeed = *weaponSeed; *globalSeed = cmd->random_seed; if(!CalcIsAttackCritical(pBaseWeapon)) { cmd->buttons &= ~IN_ATTACK; } *globalSeed = oldSeed; *weaponSeed = oldWeaponSeed; [/code] Sometimes you can get random streaks of unluckiness, so I made it automatically fire if you don't get a crit for so long (100 ticks). [code] static int wait = 0; uint *globalSeed = MakePointerGEN<uint>(hClient, 0xOffset); uint *weaponSeed = MakePointerGEN<uint>(pBaseWeapon, 0xOffset); int oldSeed = *globalSeed; uint oldWeaponSeed = *weaponSeed; *globalSeed = cmd->random_seed; if(!CalcIsAttackCritical(pBaseWeapon) && wait < 100 && cmd->buttons & IN_ATTACK) { wait++; cmd->buttons &= ~IN_ATTACK; } else { wait = 0; } *globalSeed = oldSeed; *weaponSeed = oldWeaponSeed; [/code] Now I can be a pro Soldier.
[QUOTE=Altimor46;31149723]snip Now I can be a pro Soldier.[/QUOTE] What about the weapon delays themselves? Every other 10 ticks sounds pretty short
[QUOTE=Map in a box;31149827]What about the weapon delays themselves? Every other 10 ticks sounds pretty short[/QUOTE] It's not actually 10 ticks, I was just using that as an example.
[QUOTE=Altimor46;31149955]It's not actually 10 ticks, I was just using that as an example.[/QUOTE] Ah, I just misread it.
[QUOTE=The-Stone;31139820]File not found (anymore), mind reuploading to DropBox or something similar?[/QUOTE] Sure [url]http://filesmelt.com/dl/Border_Remover6.exe[/url]
Does anyone have any idea what could cause my program to crash with this error: [IMG]http://i.imgur.com/Mvuo4.png[/IMG] With this code: [cpp]for(int x = 0; x < CHUNK_X_BLOCKS; x++) { for(int y = 0; y < CHUNK_Y_BLOCKS; y++) { for(int z = 0; z < CHUNK_Z_BLOCKS; z++) { std::cout << x << ", " << y << ", " << z << std::endl; // ^ This line crashes // etc etc more stuff below here[/cpp] I've sat here for hours now trying to figure out what's going on, very confused...
[QUOTE=Chris220;31151302]Does anyone have any idea what could cause my program to crash with this error: [IMG]http://i.imgur.com/Mvuo4.png[/IMG] With this code: [cpp]for(int x = 0; x < CHUNK_X_BLOCKS; x++) { for(int y = 0; y < CHUNK_Y_BLOCKS; y++) { for(int z = 0; z < CHUNK_Z_BLOCKS; z++) { std::cout << x << ", " << y << ", " << z << std::endl; // ^ This line crashes // etc etc more stuff below here[/cpp] I've sat here for hours now trying to figure out what's going on, very confused...[/QUOTE] It's likely that that line itself doesn't cause an issue, but merely flags up one. Check everywhere you allocate and fill in an array, or otherwise do memory operations on a pointer - chances are you've written too much data to an array or something.
[QUOTE=thomasfn;31151381]It's likely that that line itself doesn't cause an issue, but merely flags up one. Check everywhere you allocate and fill in an array, or otherwise do memory operations on a pointer - chances are you've written too much data to an array or something.[/QUOTE] Thanks, I'll have a look through later on. Gonna take a break again... this project has had so many issues in these early stages that not taking frequent breaks results in my almost tearing my hair out :v:
[QUOTE=Chris220;31151302]Does anyone have any idea what could cause my program to crash with this error: [IMG]http://i.imgur.com/Mvuo4.png[/IMG] With this code: [cpp]for(int x = 0; x < CHUNK_X_BLOCKS; x++) { for(int y = 0; y < CHUNK_Y_BLOCKS; y++) { for(int z = 0; z < CHUNK_Z_BLOCKS; z++) { std::cout << x << ", " << y << ", " << z << std::endl; // ^ This line crashes // etc etc more stuff below here[/cpp] I've sat here for hours now trying to figure out what's going on, very confused...[/QUOTE] [url]http://www.facepunch.com/threads/1092921[/url]
I'm calling it now - some mong will integrate Twitter or Facebook or some social network site in to an IDE before the end of this year. I'm getting sick of every app I install or website I use wanting me to link Facebook or Twitter. "Log in with facebook and show your friends what sums you're doing with UltraCalc 2011!!" "Tweet your base64 image encode! Log In Now!" It's getting pretty old.
Oh look, I made a quick level editor for that little game I made a while ago. [IMG]http://i55.tinypic.com/k99myo.jpg[/IMG]
[QUOTE=Chris220;31151302]Does anyone have any idea what could cause my program to crash with this error: [IMG]http://i.imgur.com/Mvuo4.png[/IMG] With this code: [cpp]for(int x = 0; x < CHUNK_X_BLOCKS; x++) { for(int y = 0; y < CHUNK_Y_BLOCKS; y++) { for(int z = 0; z < CHUNK_Z_BLOCKS; z++) { std::cout << x << ", " << y << ", " << z << std::endl; // ^ This line crashes // etc etc more stuff below here[/cpp] I've sat here for hours now trying to figure out what's going on, very confused...[/QUOTE] I am such an idiot! Here's what I had before: [cpp]inline int Chunk::getIndex(int x, int y, int z) const { return x + (y * CHUNK_X_BLOCKS) + (z * CHUNK_X_BLOCKS * CHUNK_X_BLOCKS); }[/cpp] That last CHUNK_X_BLOCKS should be CHUNK_Y_BLOCKS I feel like such an idiot for spending hours searching for the issue, and THAT was it :suicide:
[QUOTE=Chris220;31152579]I am such an idiot! Here's what I had before: [cpp]inline int Chunk::getIndex(int x, int y, int z) const { return x + (y * CHUNK_X_BLOCKS) + (z * CHUNK_X_BLOCKS * CHUNK_X_BLOCKS); }[/cpp] That last CHUNK_X_BLOCKS should be CHUNK_Y_BLOCKS I feel like such an idiot for spending hours searching for the issue, and THAT was it :suicide:[/QUOTE] It happens to all of us.
[QUOTE=Chris220;31152579]I am such an idiot! Here's what I had before: [cpp]inline int Chunk::getIndex(int x, int y, int z) const { return x + (y * CHUNK_X_BLOCKS) + (z * CHUNK_X_BLOCKS * CHUNK_X_BLOCKS); }[/cpp] That last CHUNK_X_BLOCKS should be CHUNK_Y_BLOCKS I feel like such an idiot for spending hours searching for the issue, and THAT was it :suicide:[/QUOTE] The important bit is that you've got there in the end :wink:
[QUOTE=Altimor46;31149723]Working on a critical hit hack for TF2.[/QUOTE] Oh you were the guy that asked on gd :D You can predict the global seed (and therefore if the weapon will crit in the next x ticks) by using [code]random_seed = MD5_PseudoRandom( sequence_number + i)&0x7FFFFFFF)[/code] So you can fire your weapon instantly if you know that you wont crit in the next 100 ticks ! ontopic: Progress on my Minecraft2Aos Converter Assistant :P [img]http://dl.dropbox.com/u/10138885/mc_to_aos_assistant.png[/img]
[QUOTE=No Party Hats;31148522]Well I'm not working on anything specific, I'm working on learning Python, but if you guys are willing to deal with my awful code and silly questions, well then thank you :buddy: [editline]16th July 2011[/editline] That was exactly what I was gonna make it say too, but I thought it'd sound silly![/QUOTE] I think its actually pretty cool seeing people progress, even if its just like "hooray i learnt how to do loops", so personally i dont mind :v:
[QUOTE=foszor;31146907]Okay I did some work to make it tile better [img]http://puu.sh/3ny4[/img][/QUOTE] The way most pros do it, is by having multiple textures and choose a random one for each tile. Not that it is much needed for this. Aside from the tiles, I LOVE the plants and trees and rocks and... Green rocks? Also is perlin noise the new FP programmer fad? It was 2D normal mapping before and before that there was the 2D dynamic lightning
Sorry, you need to Log In to post a reply to this thread.