Questions on Blitz max
BlitzMax Forums/BlitzMax Beginners Area/Questions on Blitz max
| ||
HI, I have some questions on "Blitz max". 1/BM can scale and rotate on images... but can it make scaling an rotations on all the buffer ? 2/There is no "Gosub" in BM ??? Are the function the same as BB3D ? 3/Can we strech the buffer ? Ex : making a game in 400x300 and strech it in Bi-linear 640x480. 4/Can we load 8bits ( and keep in in 8bits in Vram ) images and draw them en 32bit mode to make blur/scale/rotations/strech ? 5/Is the sound commands are like BB2D/BB3D ? Can we load module ? Can we load module in Vram as we load an image ? 6/Can we change the palette color or the gama in real time when drawing images ? 7/>Please mark, can you do something to force 60hz mode ? Ex : "graphics 640,480,32,1,[0]" for normal mode and "graphics 640,480,32,1,[1]" for real 60hz. Thank you. |
| ||
1/ By user function which might be added to official module... http://www.blitzbasic.com/Community/posts.php?topic=42799 2/ There is no Gosub. Functions are the same as BB3D except the posibility to 'associate' a function with a type. 3/ Nope, same rules as B3D I believe. 4/ I believe they're all loaded as 32bit. 7/ Default is 60hz. |
| ||
And the ones tony didn't cover: 4 You can store images in 8-bit on the harddrive but they will be converted into a 24-bit image once loaded. They will also be drawn as 24-bit images. 5 Sound commands are different from Classic Blitz. Most noticably BlitzMAX doesn't load an play soundtracker style modules. It plays Ogg files fine tho'. As for loading a sound into VRam - what would be the point? The graphics card cannot use the audio data for anything. 6 No. Like Classic Blitz, BlitzMAX has no direct support for 8-bit (or less) palletized displays. |
| ||
shame about 8 bit, as thats really usefull for cutting down filesize and Vram usage. Particularlt without compression. I even use 8 bit for lightmaps when I can get away with it. (more often than you would think) Plus in Bmax I'm doing specular maps and masking that only needs 8 bit greyscale. |
| ||
1) You would have to come up with a custom routine of some kind to rotate the whole buffer. If you are prepared to dabble with OpenGl you could rotate the camera viewpoint and that should cause everythiing rendered to appear rotated? 3) There are some ways you could stretch the buffer but it would probably involve rendering everything to 400x300 size and then doing a separate scaling operationg for the whole buffer. You could alternatively draw all your gfx/objects using SetScale and also multiplying any coordinates by the scaling amount. Not sure which would be faster. 4) If you want to dabble in OpenGL it should support 8-bit indexed color images and should have buffers that support that. I think all OpenGL implementations are meant to support it. However usually like the others said, there needs to be a format conversion to internal floating point values so you don't gain much at all by using 256-color data. If you set your desktop to 256 colors, and you run in windowed mode, you can get it to output to 256 colors with or without dithering (default is with). But I expect it still works internally with more resolution than that. Good 256-color support would be nice. 4) Using OpenGL you can read data from a variety of color formats including 32-bit, 24-bit, 16-bit, 8-bit and 1-bit in a variety of combinations of storage, and these usually are converted to an internal floating point format in the videoram. I don't think you can use anything other than 32-bit in videoram. 6) Using OpenGl directly you could adjust various settings to alter the gamma value for stuff you are rendering. Ambient light? Also with normal BlitzMax commands, you can use SetColor to add a tint to all DrawImage calls. Maybe you can use that to adjust gamma/brightness? |
| ||
yeah had a quick look at the lightmaps in the leadfoot racing game, using 8 bit cut the lightmap file size down from 2x11mb to 270k and 390k which is very nice if your trying to sell your game online. |
| ||
There is no palette based 8 bit but there is an alpha only 8 bit as used by the default font engine and an intensity 8 pixmap mode which i think is a=255 r=g=b=i. |
| ||
Hi ! 1/tonyg>link doesn't work, but it would be a very important thing to add !!! 2/I really regret that. I use a lot of "Gosub" in my code... well, I should deal with "Function" one day :/ 3/should be a good thing to add :) 4/like >1 5/I should try to make a tracker. If I undersand BM play "Wav" and "Ogg" files like the standard Blitz. 6/like >1. 7/I read on different posts that BM actually does not force the monitor refresh rate, it's an "emulation" slowing down the soft playing with timers and/or "Vwait". I wish good luck to Mark in his hard work, and I wish he could add all this options in the futur. |
| ||
1 - its not rotating the whole buffer. This is the same way in which OpenGL works. It is an optimized way of performing rotations, since all you have to do is calculate a rotation matrix once when calling this, and then all drawing commands afterwards are affected by the matrix. This does not mean the stuff that was there before is affected. 2 - Functions are the same. Gosub shouldnt be used even if it was there. 3 - Its probably possible, with a few opengl commands, though you'll have to do it yourself. Since, in opengl all you would have to do is have a scaling matrix on the matrix stack so that everything is scaled when drawn. 5 - Similar. Since it is no longer using a commercial library, they are probably worse quality. |
| ||
1/tonyg>link doesn't work, but it would be a very important thing to add !!! It works for me but you can find it under Module Tweaks forum. |