Saturday, November 24, 2001

aha! i just spent today fiddling with directx... after download the directx 8.1 SDK (140mb), then installing it *grumbles at the long time*, and looking at the help file, i realised that when they said "we won't develop directdraw anymore" they also meant "we wont even provide you with directdraw tutorials". They claimed to have merged d3d and directdraw to make d3d/d3dx (i cant figure out the difference), but all the tutorials they have talk bout vertices, surfaces, bump mapping etc... and all i wanted was a simple make-a-form, put-pixels-on-the-form code! *grumble*

eventually, i uninstalled the thing and installed the directx 7.0a SDK... at least in 7.0a, directdraw is still inside... come to think of it, i think every1's too crazy bout 3d stuff nowadays... so wat if its supposed to be a 3d-ish cube on the screen? its a two-dimensional screen!!! if i draw enuf 2d sprites, you wouldnt even know they were 2d, and they would probly look nicer as well... so anyway, i started reading their help file... ugh, the first tutorial was "create a screen", their sample code was a couple hundred lines long, and didnt make much sense the first couple times i read through it... eventually, after a couple hours struggling and nearly killing myself... i had a simplified version of their code that painted the entire screen red in 640*480*256.. whee!

my next objective was to create a rectangle that was actually smaller than the whole screen. after trying for ages and ages, it finally worked... some crazy problems that i dont really understand (i never did learn object-oriented programming in school, i picked it up on my own, and windows oop is mad), i finally managed to put a smaller sized red rectangle on screen!

the last objective of the day was to create random pixels on screen. well, i tried to modify my rectangle code to make them 1*1 in size, so they'r actually pixels... guess wat? nothing happened! after quite a while, i found out that microsoft made rectangles (left, top)-(right-1, bottom-1) instead of the usual (left, top)-(right, bottom) so that they could count sizes of windows more easily *grumble* so i managed to get my pixel routine working... julian mentioned that usually pixels r used to make rectangles, but i was using rectangles to make pixels *grin* i guess its a microsoft thing. the only problem now is getting the random function working.. once that works, i can port my terrain generator coded in good, old DOS to unstable, slow and irritating windows.

ah.... good old DOS... i have a nice graphics library i coded (actually the assembly was swiped from someone else, i ported it to c++) and its really good... i guess now its quite useless, but i can say im one of the very very very few ppl left now that know DOS, and i know how graphics work!!! mwahahha. i learnt svga in sec 3 and 4... was quite interesting.. a realyl slow library formed, but it was interesting nevertheless...

oh well, hopefully ill have my terrain generator ported over by tonight, and i can start work on a big 1024*768 terrain instead of my small 100*100 ones =)

ps remove that pic!!! ARGHHHHHHhhhhhhhh......... its utterly disgusting!
blog comments powered by Disqus