The main task on today's agenda was to start preparing the Editor for the implementation of multiple tile sizes (currently I hope to implement 16x16 tiles, 32x32 tiles, 64x64 tiles, and 128x128 tiles).
The first task was to change the display cursors and tile selection cursors from bitmap images into Blitz-drawn rectangles and lines (which should also allow for customisable colour schemes).
That done, I started wading through the routines one by one, tweaking those that didn't utilise my handy "tilesize" variable, and making sure those that did no longer assumed the tiles were 32x32.
Thursday, June 30, 2005
Wednesday, June 29, 2005
Wednesday 29th
Wasn't in the mood for a heavy coding session today, so I decided to tackle a few of the smaller tasks from my To Do list. Currently I have three different lists: the first covers all the features and so forth that need to be added; the second covers possible features and ideas I may want to explore; the third covers any bugs, as well as features that may need attention as the Editor is expanded.
Having these lists means that I always have something to do; if I don't fancy a big tasks, I can tackle a smaller one. It's a simple way of keeping things moving in the right direction, and also keeps the creative juices flowing.
My first task was to resize the Tile window; I want to implement different tile sizes, and thus, the Tile window needs to be able to cope with this. Thankfully, it was a relatively simple task, and also freed up a little bit of space to add some buttons for tile and tileset selection. While making these tweaks I hit upon the idea of adding a grid to the Tile window, to make the tile divisions a little clearer.
The next task was a simple tweak to allow the user to confine the current Brush to the screen boundary (currently, the Brushes can be moved off the sides of the display).
Next, I tweaked the routine which inverts the current tileset mask (if you recall, I changed the mask system from a single array to 8 different databanks - the invert mask routine therefore needed changing accordingly).
The final task of the day was a batch of menu changes I'd been meaning to implement for a few days. I also took the liberty of adding options to save and load a Map Set, a feature which will be coded in the upcoming days.
Having these lists means that I always have something to do; if I don't fancy a big tasks, I can tackle a smaller one. It's a simple way of keeping things moving in the right direction, and also keeps the creative juices flowing.
My first task was to resize the Tile window; I want to implement different tile sizes, and thus, the Tile window needs to be able to cope with this. Thankfully, it was a relatively simple task, and also freed up a little bit of space to add some buttons for tile and tileset selection. While making these tweaks I hit upon the idea of adding a grid to the Tile window, to make the tile divisions a little clearer.
The next task was a simple tweak to allow the user to confine the current Brush to the screen boundary (currently, the Brushes can be moved off the sides of the display).
Next, I tweaked the routine which inverts the current tileset mask (if you recall, I changed the mask system from a single array to 8 different databanks - the invert mask routine therefore needed changing accordingly).
The final task of the day was a batch of menu changes I'd been meaning to implement for a few days. I also took the liberty of adding options to save and load a Map Set, a feature which will be coded in the upcoming days.
Friday, June 24, 2005
Friday 24th
Finally managed to crack an I/O problem that had plagued me for the last two days; essentially, I needed to tweak the Brush Set loading and saving routines, so that a) any brushes not defined are ignored during the save, and b) brushes being loaded into the Editor will generate their own thumbnails.
The I/O routines for Brush Sets had been temperamental to say the least, and with only tiny chunks of time here and there to actually work on the problem, it took a lot of headscratching to work out why I was getting inundated with errors. Ultimately it boiled down to a simple slip of logic - I was trying to access a Data Bank at the wrong point.
With that out of the way, I tied in the I/O routine to the thumbnail routine so that when a set of Brushes is loaded, their thumbnails are automatically generated (previously, thumbnails were generated only when the user chose to manually "store" the current brush in a buffer).
The routine required only a couple of tweaks to make it work in both instances, and now the entire system is complete and working like a dream.
I finished off the day by adding an "Anim" panel to the group of tile panels, and began adding the various display information (such as source tile, animation sequence, etc.), as well as the buttons to make everything work. I've still no idea how to actually put the system together, but there's plenty of groundwork to do in the meantime. :)
The I/O routines for Brush Sets had been temperamental to say the least, and with only tiny chunks of time here and there to actually work on the problem, it took a lot of headscratching to work out why I was getting inundated with errors. Ultimately it boiled down to a simple slip of logic - I was trying to access a Data Bank at the wrong point.
With that out of the way, I tied in the I/O routine to the thumbnail routine so that when a set of Brushes is loaded, their thumbnails are automatically generated (previously, thumbnails were generated only when the user chose to manually "store" the current brush in a buffer).
The routine required only a couple of tweaks to make it work in both instances, and now the entire system is complete and working like a dream.
I finished off the day by adding an "Anim" panel to the group of tile panels, and began adding the various display information (such as source tile, animation sequence, etc.), as well as the buttons to make everything work. I've still no idea how to actually put the system together, but there's plenty of groundwork to do in the meantime. :)
Tuesday, June 21, 2005
Tuesday 21st
Got cracking on the Meta routines today, and specifically, setting up the Data Banks and coaxing the checkboxes to set the relevant flags - this took a little longer than expected thanks to a stray variable which was pointing my values at the wrong place in the Data Bank.
Next I added the functionality to the three new buttons on the Meta panel, which allow the user to Copy the Meta data for the current tile, Paste the Meta data in the buffer to the current tile, or Paste All (which applies the Meta data in the buffer to all tiles).
The final task for the Meta panel was to add the file I/O routines, so that Meta data can be saved for later use. As with Maps, the user will be able to save and load Meta files individually, for maximum flexibility.
As an afterthought, I also added a toggle on the Meta checkboxes; currently, the tiny display area gets a little cluttered - the toggle removes the checkbox numbers, which will hopefully make things clearer for experienced users.
Work continued tonight with the Brushes panel next on the agenda. Back in the day, I wanted to include a small thumbnail view for the current brush; the Tab was added, but as things progressed and the Brush functionality expanded, I honestly expected this to fall by the wayside.
However, after a conversation with Muttley (again!), I discovered the ResizeImage command which should help me to accomplish my goal, so tonight I set about putting the framework together. I started off by adding the tabber functionality, new canvas, and gadget panel.
Next I set about taking a stored brush, converting the brush to a single image, then scaling the image down to fit in the Brush window. After typing frantically for 15 minutes, I fired up the code... and it worked first time!
The next task was to ensure the scaling remained proportional no matter what the brush dimensions; basically, the image is resized to be exactly 256 pixels wide - but I also needed the program to proportionally scale the image height, based on the scale ratio used for the image width.
After a bit of headscratching, I came up with a formula, but the results were somewhat limited so I decided to post on the Llamasoft forum for advice. No sooner did I click the POST button, the solution to the problem popped into my head. Duh! A couple of tweaks later, the scaling was working perfectly.
With time ticking away, I decided to leave the remaining fiddly code until tomorrow (I need to tie in the thumbnail functions with the I/O functions, for example), and instead added a trio of buttons to allow the user to select and choose a brush from the library.
Next I added the functionality to the three new buttons on the Meta panel, which allow the user to Copy the Meta data for the current tile, Paste the Meta data in the buffer to the current tile, or Paste All (which applies the Meta data in the buffer to all tiles).
The final task for the Meta panel was to add the file I/O routines, so that Meta data can be saved for later use. As with Maps, the user will be able to save and load Meta files individually, for maximum flexibility.
As an afterthought, I also added a toggle on the Meta checkboxes; currently, the tiny display area gets a little cluttered - the toggle removes the checkbox numbers, which will hopefully make things clearer for experienced users.
* * *
Work continued tonight with the Brushes panel next on the agenda. Back in the day, I wanted to include a small thumbnail view for the current brush; the Tab was added, but as things progressed and the Brush functionality expanded, I honestly expected this to fall by the wayside.
However, after a conversation with Muttley (again!), I discovered the ResizeImage command which should help me to accomplish my goal, so tonight I set about putting the framework together. I started off by adding the tabber functionality, new canvas, and gadget panel.
Next I set about taking a stored brush, converting the brush to a single image, then scaling the image down to fit in the Brush window. After typing frantically for 15 minutes, I fired up the code... and it worked first time!
The next task was to ensure the scaling remained proportional no matter what the brush dimensions; basically, the image is resized to be exactly 256 pixels wide - but I also needed the program to proportionally scale the image height, based on the scale ratio used for the image width.
After a bit of headscratching, I came up with a formula, but the results were somewhat limited so I decided to post on the Llamasoft forum for advice. No sooner did I click the POST button, the solution to the problem popped into my head. Duh! A couple of tweaks later, the scaling was working perfectly.
With time ticking away, I decided to leave the remaining fiddly code until tomorrow (I need to tie in the thumbnail functions with the I/O functions, for example), and instead added a trio of buttons to allow the user to select and choose a brush from the library.
Monday, June 20, 2005
Monday 20th
The main task on today's agenda was the Meta Data panel, which I've been meaning to implement for some time. After careful thought (and a little discussion with my test pilots), it seemed logical to implement a flag-based system; each tile will have 16 flags associated with it, and the user can turn any of these flags on or off as required.
Obviously, it's possible that the average user might prefer more flags, but coupled with the ability to create additional collision layers and so forth, the Editor currently offers enough flexibility to cover all eventualities (in my opinion, of course!).
With precious little space left on the screen for extra buttons and suchlike, the only option was to overlay the Meta Data information over the bottom of the Tile panel. After knocking up a rough design in PhotoShop, I began the arduous task of creating panels and gadgets, and adding the various buttons and checkboxes.
Once in place, I tackled the control logistics to ensure that the Tile, Meta, and Mask panels could share the same code, but didn't conflict with one another. Then came the task of allowing the tiles to scroll slightly further on the Meta panel, as there's less on-screen space. After a couple of hours, the whole system - or at least, the framework - was in place, ready for the final code additions tomorrow.
Obviously, it's possible that the average user might prefer more flags, but coupled with the ability to create additional collision layers and so forth, the Editor currently offers enough flexibility to cover all eventualities (in my opinion, of course!).
With precious little space left on the screen for extra buttons and suchlike, the only option was to overlay the Meta Data information over the bottom of the Tile panel. After knocking up a rough design in PhotoShop, I began the arduous task of creating panels and gadgets, and adding the various buttons and checkboxes.
Once in place, I tackled the control logistics to ensure that the Tile, Meta, and Mask panels could share the same code, but didn't conflict with one another. Then came the task of allowing the tiles to scroll slightly further on the Meta panel, as there's less on-screen space. After a couple of hours, the whole system - or at least, the framework - was in place, ready for the final code additions tomorrow.
Friday, June 17, 2005
Friday 17th
Bit of a slow start today, thanks to an eyeful of soap (which seemed like God's way of saying, "don't code today"). Not that I believe in God, or indeed, believe that God, if he existed, would have time to send messages about my code. But I digress.
The first task on today's list was to tweak the resize function; one of my test pilots pointed out that if a map is smaller than the screen, it's hard to tell where the edges of the map are because it's surrounded by blank tiles. I therefore popped in a small piece of code that resizes the canvas should the map drop below a certain size, and certainly makes editing smaller maps a little more intuitive.
Next up came a tweak to the Mask system; currently the user can activate a simple on/off mask, which allows tiles to be masked (in the same way that DPaint stencils worked) to prevent them from being drawn over. Masks will also be used to quickly generate collision maps and so forth. In response to feedback, however, it became apparent that one Mask per tileset would be preferable to just a single Mask.
This was no simple task, as I not only had to tweak the Mask display routine, I also needed to convert the array-based system to a more flexible bank-based one, and then convert all the drawing functions accordingly. Surprisingly, the additions and tweaks took about 25 minutes, and left me time to add Mask functionality to Fill Mode (something I'd previously neglected to do).
While I was tinkering with Masks, I hit upon the idea of displaying the masked tiles on the map (as opposed to just on the tile panel), which makes it easier to see which tiles are masked and which aren't. After a few tiny adjustments (mainly to ensure that only masked tiles from the current layer are displayed, and in the correct order), the system was in and working beautifully.
The first task on today's list was to tweak the resize function; one of my test pilots pointed out that if a map is smaller than the screen, it's hard to tell where the edges of the map are because it's surrounded by blank tiles. I therefore popped in a small piece of code that resizes the canvas should the map drop below a certain size, and certainly makes editing smaller maps a little more intuitive.
Next up came a tweak to the Mask system; currently the user can activate a simple on/off mask, which allows tiles to be masked (in the same way that DPaint stencils worked) to prevent them from being drawn over. Masks will also be used to quickly generate collision maps and so forth. In response to feedback, however, it became apparent that one Mask per tileset would be preferable to just a single Mask.
This was no simple task, as I not only had to tweak the Mask display routine, I also needed to convert the array-based system to a more flexible bank-based one, and then convert all the drawing functions accordingly. Surprisingly, the additions and tweaks took about 25 minutes, and left me time to add Mask functionality to Fill Mode (something I'd previously neglected to do).
While I was tinkering with Masks, I hit upon the idea of displaying the masked tiles on the map (as opposed to just on the tile panel), which makes it easier to see which tiles are masked and which aren't. After a few tiny adjustments (mainly to ensure that only masked tiles from the current layer are displayed, and in the correct order), the system was in and working beautifully.
Thursday, June 16, 2005
Thursday 16th
Spent the better part of the day finalising the resize routine; the map can now be resized in both the X and Y axes, enlarged, reduced, and cropped properly using the anchor facility.
The rest of the day was spent tinkering with the Mini Map code; this has never really worked precisely as I would have liked, and now that the map sizes can be changed the Mini Map also needs to be able to cope with this.
Part of the problem with going back to old routines is that of familiarity; you can spend far too much time simply working out how a routine works, and getting back into the mindset you were in when you wrote the code originally. Luckily, I want to completely revamp the Mini Map system, so most of the time was spent stripping down the routine to its basic elements ready for some serious tinkering.
The rest of the day was spent tinkering with the Mini Map code; this has never really worked precisely as I would have liked, and now that the map sizes can be changed the Mini Map also needs to be able to cope with this.
Part of the problem with going back to old routines is that of familiarity; you can spend far too much time simply working out how a routine works, and getting back into the mindset you were in when you wrote the code originally. Luckily, I want to completely revamp the Mini Map system, so most of the time was spent stripping down the routine to its basic elements ready for some serious tinkering.
Tuesday, June 14, 2005
Tuesday 14th
I wonder if anyone will notice the 3-month gap between diary entries? After an extremely busy few months getting my life packed into boxes ready for the move to Canada, I'm finally finding time to sit down with Blitz again and finish off the Editor (otherwise known as FishEd, for those who weren't paying attention).
I'm particularly keen to get the Editor finished not only so I can crack on with Citadel, but also because a couple of colleagues wish to use FishEd to put together the maps for their Blitz project. I've already received glowing praise for the Alpha version - now the inconsiderable task of finishing the project is staring me in the face.
Today's task was a bug in the Resize Map routine, which had seen me tearing my hair out for the best part of three days; after discussion with Muttley from the YakYak forums, and after pasting in some of his code to try and trace the problem, it finally dawned on me: in my haste, I'd cut 'n' pasted a PEEK statement and changed it into a POKE statement, but neglected to leave out a set of brackets. Yep, all that fuss that could have been avoided with two deft jabs of the DEL key.
After slapping my head for what seemed like an eternity, I tidied up the code and now the map resizing works like a dream. I still need to properly implement all resizing combinations in all dimensions, and adjust the code so that the maps get cropped properly.
With this in mind, I knocked up a small grid of radio buttons to emulate the "anchor" system (if you've ever resized your canvas in PhotoShop, you'll be familiar with this - it basically allows you to specify where the original portion of the image will wind up once the canvas has been resized).
Getting the radio buttons in and working took mere minutes (such is the beauty of Blitz's GUI functionality), but I'll tackle the code tomorrow when my head is a little clearer.
I'm particularly keen to get the Editor finished not only so I can crack on with Citadel, but also because a couple of colleagues wish to use FishEd to put together the maps for their Blitz project. I've already received glowing praise for the Alpha version - now the inconsiderable task of finishing the project is staring me in the face.
Today's task was a bug in the Resize Map routine, which had seen me tearing my hair out for the best part of three days; after discussion with Muttley from the YakYak forums, and after pasting in some of his code to try and trace the problem, it finally dawned on me: in my haste, I'd cut 'n' pasted a PEEK statement and changed it into a POKE statement, but neglected to leave out a set of brackets. Yep, all that fuss that could have been avoided with two deft jabs of the DEL key.
After slapping my head for what seemed like an eternity, I tidied up the code and now the map resizing works like a dream. I still need to properly implement all resizing combinations in all dimensions, and adjust the code so that the maps get cropped properly.
With this in mind, I knocked up a small grid of radio buttons to emulate the "anchor" system (if you've ever resized your canvas in PhotoShop, you'll be familiar with this - it basically allows you to specify where the original portion of the image will wind up once the canvas has been resized).
Getting the radio buttons in and working took mere minutes (such is the beauty of Blitz's GUI functionality), but I'll tackle the code tomorrow when my head is a little clearer.
Subscribe to:
Posts (Atom)
