Ranquest Object Hacking: (From the Propellerpowered/GG forums)
Oldbitcollector (Jeff)
Posts: 8,091
A few of us who have an interest in Propeller gaming have been conversing on the Propellerpowered/GG forums.
One of our members (Roadster) has been tearing into JT Cook's Ranquest video object with some amazing results.
Full thread is here: http://www.gadgetgangster.com/forums/viewtopic.php?f=4&t=119
I didn't think this should stay secret..
OBC
One of our members (Roadster) has been tearing into JT Cook's Ranquest video object with some amazing results.
Full thread is here: http://www.gadgetgangster.com/forums/viewtopic.php?f=4&t=119
I didn't think this should stay secret..
OBC
Comments
Definately not! Thanks for posting
When Andre asked me to work on the C3, after I completed the porting process I did, I started a new game and pulled out this driver I had. The only thing I added at that time was 1BPP tiles so I can free up the tiles I was using for text to take up 1/8 the size.
Hope some people can get some use out of this, and remember that it supports both NTSC and PAL!
The graphics convert utility (GC.exe) is a command-line utility used to convert graphics from a standard bitmap format (like PNG) to one that is usable by the driver.
There is not really a help file included with the code right now for how GC.exe is used, however here is what I have derived:
GC.EXE [options]
Options:
[ -i ] indicates the input file being specified (in .png format)
[ -b ] (bitmap flag) indicating tile size (8 or 16 in the case of the driver)
[ -f ] indicates the output format [bitmap/sprite]
[ -o ] indicates the output filename being specified
Example: Generate the 8x8 tiles used in MsPac:
gc.exe -i MsPacscrn.png -b 8 -f bitmap -o Mspac1
Example: Generate the 16x16 sprites used in MsPac:
gc.exe -i MsPacSpr.png -b 16 -f sprite -o Mspac1
As far as the code, if you look at the MsPac.spin you will see how the driver is used. Since this is a sprite-based driver, it takes a little understanding of how they are structured in the code in order to use these.
What "makes up" a sprite in the driver are the following:
In the actual code of the driver you will see these expressed like the following:
In this case, the code (a pseudo-structure) is defining sprite #3 (which is why the values are -2), that is displayed at 100,92, using image #5, and has $1c defined as color #1, and $7 as color #2.
The "sprite number" (or image) references the data that would have been generated by GC.exe, and indicates the 6th image (0-based) present in the file.
Understanding that, most of the rest of the code in the MsPac.spin example should be at least a little easier to follow.
If you still feel incredibly overwhelmed, there is another sprite-based driver that you could try here, It is lower resolution and has a few more limitations (NTSC only), however it is also fully functional, and public domain (MIT Licensed code).
--trodoss
I really need to find the time to document all the options
-i input graphic filename, will except any graphic file format supported by .net
-o output filename (optional)
-f conversion format options bitmap, tile, sprite
-b pixel bits 16 for sprites, 16 / 8 for tiles, tiles with 16 bits also creates 4x4 tile map
-s use saturated colors true / false (optional default is true)
-c conversion color space rgb and lab (optional default is rgb)
-w color weight 0-99% (optional) format rr_gg_bb, this doesn't always work as expected
-t common tile set bitmap, Not finished
-v VGA conversion, Not finished
I'm buying a house at the minute so my free time has been somewhat limited over the past couple of weeks