Worklog for Kalisme
2.5D map viewer
Return to Worklogs
| ||
http://www.uploading.com/files/OL8312WW/3.zip.html ^this version has floor tiles & a sky. Sorta nifty... Comes with code, executable & images. goto: http://www.blitzbasic.co.nz/Community/posts.php?topic=78182 for the topic on this. Here's a quick update with shading (well.. black fogging) I'd advise editing the "sky.jpg" to make it mainly black... stars maybe? (I used the RGB conversion code from the archive) --------------------- my current projects: ...*shrugs* Learning SDL via DevC++ |
| ||
I posted the first version of this a while ago in the blitzbasic forums, see it here: http://www.blitzbasic.co.nz/Community/posts.php?topic=77449 And the second one (that I just posted)here: http://www.blitzbasic.co.nz/Community/posts.php?topic=77699 it's not really that complex or hard... I'm going to presume you know of vectors... Well, you set up a type for vectors, holding the fields: x#,y# & id. The X&y represent location... the id represents the ID number of the vector... The camera has it's own x & y location as well as a view angle. Loop through the vectors subtract the camera vector... Then add 90 degrees to the cameras view angle then times the vertex vector by the camera matrix. That rotates everything infront of the camera above the clip plane. Remove everything underneith the clip plane... ... Well, actually I don't even know if anyone will be reading this... erm.... Well, I found it pretty interesting... it's all in the code. But if anyone wants it explained, just get in contact: kalisme@... --------------------- my current projects: ...*shrugs* Learning SDL via DevC++ |