pouët.net

Go to bottom

Coders, please write about your work

category: general [glöplog]
Hugi#32 is in the making and getting near completion.
Share your knowledge with others for perhaps a better scene

But for the coder section we can still use some small, larger or very large
articles..

check out:

http://www.hugi.scene.org/main.php?page=topcod

for inspiration what you can write about

you can email your support to magic_nah@hotmail.com

than you for your cooperation.
added on the 2006-06-17 13:57:27 by magic magic
coders are busy coding so they can't write large or even very large articles. \o/
added on the 2006-06-17 15:12:45 by StingRay StingRay
Disassemble?
added on the 2006-06-17 15:15:11 by nitro2k01 nitro2k01
LOL?
added on the 2006-06-17 15:38:38 by nitro2k01 nitro2k01
ok. i'm going to share my startup code for the amiga:

-----
start:
-----

ok, and then when your demo is finished:

-----
moveq #0,d0
rts
-----

There you go.
added on the 2006-06-17 16:19:26 by xeron xeron
All of the topics in the wanted articles-list can be answered with one word:

Google.
added on the 2006-06-17 16:53:06 by Preacher Preacher
preacher: hugi#32 is by sceners for sceners

we would like articles written by demo coders
which (if possible) isnt released yet.
added on the 2006-06-17 17:02:14 by magic magic
I am gonna share my knowledge how to destroy Xeron's startup code:

Code: lea start(pc),a0 move.l #$4afc4e75,(a0) rts


now you have a destroyed startup code.
added on the 2006-06-17 17:39:50 by StingRay StingRay
should be move.l #$4afc4e75,(a0) of course.
added on the 2006-06-17 17:40:41 by StingRay StingRay
i recommend adding

Code:lock xadd [esi], eax
right after stingrays code.

that stops it from assembling correctly on AT LEAST 5 different platforms.
added on the 2006-06-17 21:58:43 by ryg ryg
Should it really? Let's say you just set the .radix directive. (Or wahtever your compiler calls it)
added on the 2006-06-17 22:07:40 by nitro2k01 nitro2k01
pop cs
added on the 2006-06-17 22:16:59 by p01 p01
My coding article for Hugi:

--8<---8<--- cut here ---8<---8<---

I'm gonna teach you how to clear the screen. To do that, do:

Code: for ( int x = 0; x < 319; x++ ) { for ( int y = 0; y < 199; y++ ) { int color = 0; setColor( x, y, color ); } }


Now, that's easy, isn't it? But now we're gonna make the screen white, and that's a lot more difficult because to make the color white we have to count up all the way to 255!!!!!!!!!

Code: for ( int x = 0; x < 319; x++ ) { for ( int y = 0; y < 199; y++ ) { int color = 0; while ( color != 255 ) { color++; } setColor( x, y, color ); } }


But here comes a nice optimisation trick. We'll secretly set the color already to 128 before we start counting!!!!!!!!!!!

Code: for ( int x = 0; x < 319; x++ ) { for ( int y = 0; y < 199; y++ ) { int color = 128; while ( color != 255 ) { color++; } setColor( x, y, color ); } }


OMG WTF we have just doubled the speed of this awesome routine! Us demosceners are such 7331 h4x0r5!!!!!!!!

In the next Hugi I'll teach you how to use 2 different colors at once in only a quarter of the speed OMG WTF that's gonna be so cool!!!!!

--8<---8<--- cut here ---8<---8<---
added on the 2006-06-17 22:33:41 by sparcus sparcus
sparcus: 319x199 is a stoopid resolution
added on the 2006-06-17 22:46:23 by the_Ye-Ti the_Ye-Ti
Damn, someone noticed ;-)
added on the 2006-06-17 22:47:50 by sparcus sparcus
you should use (unsigned)(199*4.0/3.0) instead !
added on the 2006-06-17 22:50:11 by the_Ye-Ti the_Ye-Ti
Code: int main() { return main() ; }
added on the 2006-06-17 23:05:58 by rmeht rmeht
Please only send serious articles to magic_nah@hotmail.com and stop spamming
thank you ;-)
added on the 2006-06-17 23:22:15 by magic magic
Quote:

Please only send serious articles to magic_nah@hotmail.com and stop spamming


That's not us, that comes with the hotmail account...
added on the 2006-06-17 23:24:08 by sparcus sparcus
It takes more time to code than to write about that code.
added on the 2006-06-17 23:36:10 by _-_-__ _-_-__
I mean the reverse, of course.
added on the 2006-06-17 23:36:42 by _-_-__ _-_-__
pass on your knowledge to new generation of scners

:-)
added on the 2006-06-17 23:41:18 by magic magic
Turbo Pascal 4evah:
Code: Program Div_Routines; uses crt; Procedure WaitVR; begin asm mov dx, 3dah { Waits 4 the vertical retrace so that you } @looper: { can avoid "snow". } in al, dx test al, 8 jz @looper @looper2: in al, dx test al, 8 jnz @looper2 end; end; Procedure SetMode(mode:byte); { Sets the desired video-mode. $13 for MCGA } begin { 320*200*256, and $3 for textmode. } asm mov al, mode mov ah, 00 int $10 end; end; Procedure PutPixel(x,y : integer; col : byte); var pos : word; begin { Puts an pixel whereever you } pos := x+y*320; { want it. } asm mov ax, 0a000h mov es, ax mov bx, pos mov al, col mov [es:bx], al end; end; Procedure Box(y, x, x2, y2 : integer; color : byte); var loopy : word; begin for loopy := y to y2 do fillchar(mem[$a000:x+loopy*320],x2-x,color); end; Procedure ExplodingBox; var loopy : word; loopx : word; begin for loopy := 0 to 199 do for loopx := 0 to 199 do begin repeat Box(200-loopx div 2, 200-loopy div 2, 200-loopx, 200-loopy, 15); WaitVR; until keypressed; end; end.


Man, I sure wrote leet code in '94.
added on the 2006-06-17 23:47:17 by gloom gloom
Quote:
pass on your knowledge to new generation of scners

:-)
The scene needs fresh people who are really motivated to learn to code. However people who are enough motivated (and smart) will to code regardless of available articles.

Now, let's get back to spamming, folks!
Code:Start ENTRY: jp $150 End di .loop jr .loop
added on the 2006-06-17 23:48:07 by nitro2k01 nitro2k01

login

Go to top