• What are you working on? v16
    5,004 replies, posted
Ha, my school is paying me again to do some more programming work...
[QUOTE=Loli;28637777]Ha, my school is paying me again to do some more programming work...[/QUOTE] How did they start paying you in the first place? :o
[QUOTE=Jallen;28635420]Just out of interest, I see 20 entities, the 4 players and the 16 boxes. What are the other 4? (the readout says 24 entities)[/QUOTE] Oh my god, 4 not immediately accountable entities, what an exposé.
[QUOTE=xAustechx;28638082]How did they start paying you in the first place? :o[/QUOTE] First off they needed something making, and I just said "Hey, I can program..." So I just had to make a network status checker... Now they need my skills again :D
[QUOTE=Philly c;28638098]Oh my god, 4 not immediately accountable entities, what an exposé.[/QUOTE] deloc is that you? :frog:
[QUOTE=Richy19;28638448]deloc is that you? :frog:[/QUOTE] No.
[QUOTE=Richy19;28638448]deloc is that you? :frog:[/QUOTE] He used capital letters and full stops, which I assumed deloc's keyboard was incapable of producing.
[QUOTE=Philly c;28638098]Oh my god, 4 not immediately accountable entities, what an exposé.[/QUOTE] [QUOTE=Jallen;28635420]Just out of interest...[/QUOTE] Evidently you missed that. [editline]16th March 2011[/editline] [media]http://www.youtube.com/watch?v=37iodtLvqeg[/media] My raycaster got to a good enough state that I could record it. Up next: texturing!
Started a little on my random interpreted language Wrote a little parser, will successfully turn "hi Fool "Hi fool"" into (3) separate objects, while keeping "Hi fool" as one. Hooray! :v:
I made a Hello world program for my ATMEGA 8 [code] #include <avr/io.h> #include <util/delay.h> int main(void) { DDRC = 0x22; while(1) { PORTC = 0x22; _delay_ms(500); PORTC = 0x00; _delay_ms(300); } }[/code] It turns on 2 leds and then turns them off :D
[QUOTE=marcin1337;28640537]I made a Hello world program for my ATMEGA 8 [code] #include <avr/io.h> #include <util/delay.h> int main(void) { DDRC = 0x22; while(1) { PORTC = 0x22; _delay_ms(500); PORTC = 0x00; _delay_ms(300); } }[/code] It turns on 2 leds and then turns them off :D[/QUOTE] Just to inspire you, this is what I did with AtMega88 //In real life it's quite beautiful, camera just can't capture that :( [media]http://www.youtube.com/watch?v=rsel5lqHjbU&feature=channel_video_title[/media] Basically, it's 4x ( RGB+UV) LEDs, multiplex and PWM. It's quite complex project but just to show you how much of fun you are gonna have ;). And, a code... [code]#include <stdlib.h> #include <avr/io.h> // header file #include <avr/delay.h> #include <avr/interrupt.h> #define TIME 65 int cycle_4(int x); int cycle_3(int x); void clear(); int counter=0; int x[4][4]; ISR(TIMER1_COMPA_vect) //interrupt where multiplex and PWM is done { counter++; if(counter>=4) { counter=0; } switch(counter) { case 0:PORTC=0b00000100;break; case 1:PORTC=0b00001000;break; case 2:PORTC=0b00010000;break; case 3:PORTC=0b00100000;break; } OCR2B=x[counter][0]; //red OCR0B=x[counter][1]; //green OCR2A=x[counter][2]; //blue OCR0A=x[counter][3]; //uv } int i=0,j=0,k=0,s=0; int temp; int main() { DDRD=0b01101000; DDRB=0b00001000; DDRC=0b00111100; //transistor for switching RGBUV segments PORTD=0b01101000; PORTB=0b00001000; TIMSK1 |= (1 << OCIE1A); OCR1A = 450; // when 16-bit timer reaches this value it resets TCCR1B |= (1 << CS10) | (1 << CS11) | (1 << WGM12); // prescaler 64x CTC Mode enable interrupt timer 1 on owerflow TCCR0A |=(1 << WGM00) | (1 << WGM01) | (1<<COM0A1) | (1<<COM0B1); TCCR0B |=(1 << CS00); TCCR2A |=(1 << WGM20) | (1 << WGM21) | (1<<COM2A1) | (1<<COM2B1); TCCR2B |=(1 << CS20); PORTC=0b00000100; clear(); sei(); //start from this point repeat while(1) { s=5;//5 while(s) { for(k=0;k<4;k++) { for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][k]=i; } _delay_ms(TIME); for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][k]=255-i; } } s--; } clear(); s=240; //240 while(s) { srand(rand()%255); _delay_ms(TIME*25); for(k=0;k<4;k++) for(j=0;j<4;j++) x[k][j]=rand()%255; s--; } s=10; //10 while(s) { clear(); for(k=0;k<4;k++) { for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][cycle_4(k+j)]=i; } _delay_ms(TIME); for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][cycle_4(k+j)]=255-i; } } s--; } s=7; //7 while(s) { clear(); for(k=0;k<4;k++) {x[k][k]=255; } for(j=0;j<4;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_4(k+j)]--; x[k][cycle_4(k+j+1)]++; } } s--; } s=6;//6 while(s) { clear(); for(k=0;k<4;k++) { x[k][cycle_3(k)]=255; } for(j=0;j<3;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_3(k+j)]--; x[k][cycle_3(k+j+1)]++; } } _delay_ms(TIME*20); s--; } s=8;//8 while(s) //~8s en cikel { clear(); for(k=0;k<4;k++) { x[k][0]=255; } for(j=0;j<4;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_4(j)]--; x[k][cycle_4(j+1)]++; } } _delay_ms(TIME*20); s--; } s=3; while(s) //2,3 { clear(); srandom(rand()%100); for(i=0;i<255;i++) { _delay_ms(rand()%200); for(k=0;k<4;k++) { for(j=rand()%25;j>0;j--) {x[k][2]=x[k][3]++; x[k][3]=x[k][2]--; _delay_ms(5); } for(j=rand()%25;j>0;j--) {x[k][2]--; x[k][3]++; _delay_ms(5); } } } s--; } } return 0; } int cycle_4(int x) //modulus 3, this function returns numbers 0-3 { while(x>=4) { x=x-4; } return x; } int cycle_3(int x) //modulus 4, this function returns numbers 0-2 { while(x>=3) { x=x-3; } return x; } void clear() { for(k=0;k<4;k++) for(j=0;j<4;j++) x[j][k]=0; clear(); } [/code] Yeah I know it's incredibly difficult to understand, because I wrote it uncommented and just... unappealing.
[QUOTE=HeatPipe;28640883]Just to inspire you, this is what I did with AtMega88 //In real life it's quite beautiful, camera just can't capture that :( [media]http://www.youtube.com/watch?v=rsel5lqHjbU&feature=channel_video_title[/media] Basically, it's 4x ( RGB+UV) LEDs, multiplex and PWM. It's quite complex project but just to show you how much of fun you are gonna have ;). And, a code... [code]#include <stdlib.h> #include <avr/io.h> // header file #include <avr/delay.h> #include <avr/interrupt.h> #define TIME 65 int cycle_4(int x); int cycle_3(int x); void clear(); int counter=0; int x[4][4]; ISR(TIMER1_COMPA_vect) //interrupt where multiplex and PWM is done { counter++; if(counter>=4) { counter=0; } switch(counter) { case 0:PORTC=0b00000100;break; case 1:PORTC=0b00001000;break; case 2:PORTC=0b00010000;break; case 3:PORTC=0b00100000;break; } OCR2B=x[counter][0]; //red OCR0B=x[counter][1]; //green OCR2A=x[counter][2]; //blue OCR0A=x[counter][3]; //uv } int i=0,j=0,k=0,s=0; int temp; int main() { DDRD=0b01101000; DDRB=0b00001000; DDRC=0b00111100; //transistor for switching RGBUV segments PORTD=0b01101000; PORTB=0b00001000; TIMSK1 |= (1 << OCIE1A); OCR1A = 450; // when 16-bit timer reaches this value it resets TCCR1B |= (1 << CS10) | (1 << CS11) | (1 << WGM12); // prescaler 64x CTC Mode enable interrupt timer 1 on owerflow TCCR0A |=(1 << WGM00) | (1 << WGM01) | (1<<COM0A1) | (1<<COM0B1); TCCR0B |=(1 << CS00); TCCR2A |=(1 << WGM20) | (1 << WGM21) | (1<<COM2A1) | (1<<COM2B1); TCCR2B |=(1 << CS20); PORTC=0b00000100; clear(); sei(); //start from this point repeat while(1) { s=5;//5 while(s) { for(k=0;k<4;k++) { for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][k]=i; } _delay_ms(TIME); for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][k]=255-i; } } s--; } clear(); s=240; //240 while(s) { srand(rand()%255); _delay_ms(TIME*25); for(k=0;k<4;k++) for(j=0;j<4;j++) x[k][j]=rand()%255; s--; } s=10; //10 while(s) { clear(); for(k=0;k<4;k++) { for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][cycle_4(k+j)]=i; } _delay_ms(TIME); for(i=0;i<255;i++) { _delay_ms(TIME/3); for(j=0;j<4;j++) x[j][cycle_4(k+j)]=255-i; } } s--; } s=7; //7 while(s) { clear(); for(k=0;k<4;k++) {x[k][k]=255; } for(j=0;j<4;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_4(k+j)]--; x[k][cycle_4(k+j+1)]++; } } s--; } s=6;//6 while(s) { clear(); for(k=0;k<4;k++) { x[k][cycle_3(k)]=255; } for(j=0;j<3;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_3(k+j)]--; x[k][cycle_3(k+j+1)]++; } } _delay_ms(TIME*20); s--; } s=8;//8 while(s) //~8s en cikel { clear(); for(k=0;k<4;k++) { x[k][0]=255; } for(j=0;j<4;j++) for(i=0;i<255;i++) { _delay_ms(TIME); for(k=0;k<4;k++) { x[k][cycle_4(j)]--; x[k][cycle_4(j+1)]++; } } _delay_ms(TIME*20); s--; } s=3; while(s) //2,3 { clear(); srandom(rand()%100); for(i=0;i<255;i++) { _delay_ms(rand()%200); for(k=0;k<4;k++) { for(j=rand()%25;j>0;j--) {x[k][2]=x[k][3]++; x[k][3]=x[k][2]--; _delay_ms(5); } for(j=rand()%25;j>0;j--) {x[k][2]--; x[k][3]++; _delay_ms(5); } } } s--; } } return 0; } int cycle_4(int x) //modulus 3, this function returns numbers 0-3 { while(x>=4) { x=x-4; } return x; } int cycle_3(int x) //modulus 4, this function returns numbers 0-2 { while(x>=3) { x=x-3; } return x; } void clear() { for(k=0;k<4;k++) for(j=0;j<4;j++) x[j][k]=0; clear(); } [/code] Yeah I know it's incredibly difficult to understand, because I wrote it uncommented and just... unappealing.[/QUOTE] :O awesome too bad I only have one RGB Led :(
[QUOTE=Chris220;28639230]Evidently you missed that. [editline]16th March 2011[/editline] -raycaster glory- My raycaster got to a good enough state that I could record it. Up next: texturing![/QUOTE] Looks really cool but you should really implement some filtering before doing anything else imo:rolleyes:
[QUOTE=marcin1337;28641080]:O awesome too bad I only have one RGB Led :([/QUOTE] You will spend lots of time reading datasheet and making RGB LED, don't worry. You can add components in future anytime you wish (and if your wallet allows :S). At first, data sheet will be mindfucking you, but don't worry, as more as you learn the faster you will learn.
Possible to add/remove blocks with left/right mouse button. Need to optimize the picking and drawing. [img]http://img8.imageshack.us/img8/7775/houseq.png[/img] [img_thumb]http://img263.imageshack.us/img263/4170/addblock.png[/img_thumb] [url]http://dl.dropbox.com/u/17624598/OGLApplication%2013.03.2011.rar[/url]
Can someone link me to a good LWJGL tutorial? I have googled, but I wasn't able to find anything useful.
I tried learning how to use mode 7 style 3D. :saddowns: [editline]16th March 2011[/editline] I did work out a lot of the math for calculating rotation of circles based on circumference and velocity.
[QUOTE=bobthe2lol;28643781]Can someone link me to a good LWJGL tutorial? I have googled, but I wasn't able to find anything useful.[/QUOTE] You can find a few on their [url=http://www.lwjgl.org/wiki/index.php?title=LWJGL_Basics_1_(The_Display)]wiki[/url], but it's mainly to set it up for use. As it's intended to be a thin binding to things like OpenGL, you can use those tutorials and implement them in LWLJGL.
[QUOTE=caesium;28643986]You can find a few on their [url=http://www.lwjgl.org/wiki/index.php?title=LWJGL_Basics_1_(The_Display)]wiki[/url], but it's mainly to set it up for use. As it's intended to be a thin binding to things like OpenGL, you can use those tutorials and implement them in LWLJGL.[/QUOTE] I feel incredibly dumb for not noticing that. Wow... thank you very much.
Got a new mouse, and have been furiously working on a little present for WAYWO :3
How is a mouse useful for baking cookies?
My old one died, I've been force to use my track pad for almost a week :saddowns: [editline]16th March 2011[/editline] Just a hint; it's related to one of my favorite things... Trains! [editline]16th March 2011[/editline] -fixed problem-
A quick video of all I've gotten done so far. The only thing left is actual gameplay. DAMN YOU PROCRASTINATION :argh: [media]http://www.youtube.com/watch?v=MHrIsyb_MN8[/media]
[QUOTE=ralle105;28642669]Looks really cool but you should really implement some filtering before doing anything else imo:rolleyes:[/QUOTE] I can actually get it perfectly smooth by tweaking the ray sensitivity value a bit, but I actually kinda like the lower-res look! (Plus it runs a bit faster which is always nice)
Got off my ass - writing a class-file assembler in Clojure. The spec states that I don't actually have to assemble any instructions to get a valid class-file... [img]http://i.imgur.com/HZwzr.png[/img] Which was assembled from [code] (make-class {:this-class "bar" :super-class "java/lang/Object" :interfaces () :access-flags (:public) :major-version 50 :minor-version 0} (field "bob" "L Object;" (:public)) (method "main" "([Ljava/lang/String;)V" (:static)) [/code] Although this really just goes through an IR that mirrors the class-file format and then that gets written.
[img]http://i.cubeupload.com/j7Xunv.png[/img] Why thank you :smug: Tried batch compiling a map I had generated, but it gave me that error when I tried running it in Gmod :(
[QUOTE=Dr Magnusson;28652818][img_thumb]http://i.cubeupload.com/j7Xunv.png[/img_thumb] Why thank you :smug: Tried batch compiling a map I had generated, but it gave me that error when I tried running it in Gmod :([/QUOTE] Lightmaps are too big, I'd assume. The same problem as with gm_evocity2
IIRC you could add a launch option to fix it [editline]17th March 2011[/editline] +r_hunkalloclightmaps 0
It might not seem impressive, but I got Lua (with LuaBind) implemented. [img_thumb]http://img651.imageshack.us/img651/3580/development12.png[/img_thumb]
After thinking a lot about how I could do reconfigurable controls, I came up with something and it immediately worked. You set up the controls like this (This will be done with a "Press key" prompt later in options menu): [I]see screenshot below[/I] It works so perfectly and is so rad I feel totally awesome right now. [editline].[/editline] Jeez I just added joystick (axes) support and it also works shiiit. controls[2]["right"] = "joy-0-axe-1-pos" This is why programming is fun. Coming up with awesome solutions for things you thought were difficult and having them work perfectly. [img_thumb]http://filesmelt.com/dl/mario6.png[/img_thumb] (It's hard to press 2 buttons and a key at the same time and then take a screenshot)
Sorry, you need to Log In to post a reply to this thread.