|
I used that method for the map I made, but I wasn't sure if I could pull off effects like this with it. Thank you for your help with explaining how to make the map using the drawing panel though!
|
Well it depends, you have access to modifiers like spin/rotation. You can also cut it into showimgs that run much better than polygons. Or just slap the entire image onto a single polygon and rotate it like that.
Also, here's the script I used to prerender my levels in Mode7:
PHP Code:
function PreRenderLevel() {
temp.mw = int((player.gmap.width > 0 ? player.gmap.width : 64)/64);
temp.mh = int((player.gmap.height > 0 ? player.gmap.height : 64)/64);
for (temp.i : client.mode7render) {
if (getimgwidth(i) > 0) deletefile(i);
}
client.mode7render = new[0];
temp.lvlprefix = "dusty/mode7/lvl_" @ int(timevar2);
temp.originalx = player.x;
temp.originaly = player.y;
temp.ir = this.imgresolution;
new GuiDrawingPanel("Dusty_Mode7_prerender") {
useownprofile = true;
profile.modal = false;
x = y = 0;
width = height = 1024/ir;
alpha = 0;
clearall();
for (temp.w=0;w<mw;w++) {
for (temp.h=0;h<mh;h++) {
playerx = w*64+32;
playery = h*64+32;
clearall();
for (temp.i=0;i<64;i++) {
for (temp.j=0;j<64;j++) {
temp.t = TilesToImage(tiles[w*64+i,h*64+j]);
//drawimagerectangle(i*16/ir,j*16/ir,thiso.mode7tileset,624,336,16,16);
drawimagestretched(i*16/ir,j*16/ir,16/ir,16/ir,thiso.mode7tileset,t[0],t[1],16,16);
}
}
temp.filename = lvlprefix @ "_" @ w @ "_" @ h @ ".png";
saveimage(filename);
client.mode7render.add(filename);
waitfor(name,"bleh",0.05);
}
}
}
Dusty_Mode7_prerender.destroy();
player.x = originalx;
player.y = originaly;
}
Using drawimagestretched like I did, you can stretch the portions you're drawing to the drawingpanel down to half/quarter sizes to map a smaller map with the limit space.
There are problems I've had with saving images intended to be used in-game in that it doesn't seem to like properly reloading the new image when generated with script. That is why I alway save my images with a unique prefix(in this case using timevar2). But if you do it like this you
have to remember to clean up the old images. That's why I store the ones I'm generating into a client string and then loop through that on the next run and delete them all.