UnderwareDESIGN

PlayBASIC => Show Case => Topic started by: kevin on February 17, 2008, 10:26:49 PM

Title: Play Mapper (WIP)
Post by: kevin on February 17, 2008, 10:26:49 PM

Play Mapper (Work In Progress)

PlayBasic Map Editing Tool



     Many, many  moons ago we decided to replace the original Play Mapper tool.  So after suffering through a few failed 3rd party attempts,  we decided we'd throw a tool together ourselves.  The job of course falls into my hands.   Which is ok, but it's not like have loads of free time to be producing 'free' add on tools. 

     Having written a few editors in my time,  my objective in creating this one, was to keep it simple as possible and try and give the user some subtle flexibilities when mapping.   If you've ever had to map out levels before, you'll be familiar just how tedious a lot of these tools can be.   By that i mean, we load in our block image and then are then forced to manually move the tiles from the block palette individually.  To make this worse, often the block palette doesn't retain it's original shape.    Which is a form of water torture i'm sure.

     To counter this I wanted the user to be able select individual or rects of blocks directly from the block palette.  For example, if the artist draws a tree that used say a 6*4 block area, then we should be able to grab this region directly and plonk it directly upon the level as the current tile brush.  Rather than having to grab each fragment of the tree shape individually.   Moreover,  for more complex shapes you can grab regions from the level as brushes.  You've and unlimited supply of these can cycle through them at will while editing.  What this means is that you can make sets of prefabs basically,  then run though and and paste these brushes through out the level.    Brushes are saved with the map project, so you can come back to it later.   

    Anyway, that's about it for the moment.  Will post a few ALPHA's later.  Really need some Artistic people to make some maps.   


  Download

   Play Mapper V0.46 (alpha) (http://www.underwaredesign.com/forums/index.php?topic=2279.msg17207#msg17207)  (29th June 2008)

   Play Mapper V0.45 (alpha) (http://www.underwaredesign.com/forums/index.php?topic=2279.msg17162#msg17162)  (27th June 2008)

   Play Mapper V0.43b (alpha) (http://www.underwaredesign.com/forums/index.php?topic=2279.msg17150#msg17150)  (26th June 2008)

   Play Mapper V0.37 (alpha) (http://www.underwaredesign.com/forums/index.php?topic=2279.msg15516#msg15516)




  Related Source Code Examples

    Load Play Mapper Maps (http://www.underwaredesign.com/forums/index.php?topic=2539.0)

    Loading Exported Play Mapper Level Pack Files (http://www.underwaredesign.com/forums/index.php?topic=2280.0)




Old WIP Thread

   PlayMapper Mini (http://www.underwaredesign.com/forums/index.php?topic=847.0)
Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 18, 2008, 11:27:32 PM
Play Mapper V0.27 (Alpha)

 Here's the curentt warts'n' all public alpha of Play Mapper Mini. Like all of the revisions thus far,  I've been focusing more on the feel of the application than features.  While many of the core features are implemented, it's still missing custom dialogs and keyboard short cuts.

 Control wise the editor functions completely from the mouse.


Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)
 

To Do List (only if there's demand)

 * Animation Support
 * Shift/optimize layers
 * Import Layer/brush
 * Export Blocks/layers
 etc etc


Download

   Old alpha removed

Title: Re: Play Mapper Mini (cont)
Post by: nrasool on February 20, 2008, 03:05:58 AM
Hey Kev, Had a quick run on this, and looks good, I like it. Very simple to use, One thing I would add to the wishlist would be to do a full preview of the map. I think that is the only thing missing from this release :)
Title: Re: Play Mapper Mini (cont)
Post by: ATLUS on February 20, 2008, 04:45:37 AM
+1
Yea its cool program!!!!!!!!!!!!!!!!!!!!!
Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 20, 2008, 05:14:29 AM

nrasool,

    So preview, as in showing/saving scaled down version of the map ?    I guess the only question really is how the scaling is done.  Probably easier to scale  the blocks to size, than scaling the map to particular size.

Title: Re: Play Mapper Mini (cont)
Post by: nrasool on February 20, 2008, 05:51:54 AM
Hey Kevin, Yeah, similar to Mappy really they show a full screen preview, or maybe a scaled down bitmap, similar to Gale. That is really the grip, but apart from that, got to say it is really good for producing maps quickly :)
Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 20, 2008, 06:50:28 AM
  So it scaled the world to a screen sized image then ?
Title: Re: Play Mapper Mini (cont)
Post by: nrasool on February 20, 2008, 06:57:17 AM
Yes exactly, so it gives you 'the user' the full picture of the world
Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 20, 2008, 11:18:56 AM
Play Mapper V0.29 (Alpha)

  Here's the current warts 'n' all public alpha of Play Mapper Mini.   This version is a little cleaner than the previous alpha and has the project load/saving fleshed out some more and a new block properties dialog,   This dialog lets you change the block width / block height and block maskcolour (which it can also guess for you) outside of the 'new project' dialog.



  The next dialog addition will allow the user to edit project info in a re-loaded project. Currently once you set that stuff, there's no way to change it.   That will give the tool a functional base.  Far from perfect, but functional.


  Control wise the editor functions completely from the mouse.   Left button select, right button de-select/abort


Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)
 

To Do List (only if there's demand)

 * Map Preview / Overview
 * Animation Support
 * Shift/optimize layers
 * Import Layer/brush
 * Export Blocks/layers
 etc etc


Download

  old alpha removed.



Note

   Maps saved in this version should be ok to import into future editions.  So feel free to have go at laying out some test maps.  You never know when this will be updated again.


Title: Re: Play Mapper Mini (cont)
Post by: reno on February 20, 2008, 11:46:26 AM
I didn't play with maps, but I thank you for your efforts to give to the PB community a great and "simply" tool to make maps.

I'll test it in a few days.

;)
Title: Re: Play Mapper Mini (cont)
Post by: basil99 on February 21, 2008, 01:25:57 AM
Strange thing, but on office and home PC font size seems to be extremly small -  i can't read nothing  :o
Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 21, 2008, 07:37:18 AM

   What size is the desktop ?  as it uses the default PB font (couier) / default sizing & style. 

Title: Re: Play Mapper Mini (cont)
Post by: kevin on February 21, 2008, 09:50:48 AM

Testing Map Scaling

   Tinkering with making a overview image of the map.   In this one i was toying with filtering the tiles (at fixed sizes) in the hope it'd smooth out the end result a little.  Sorta works but the mask colour is leeking through in this example.  But ya get that :)

   I'm using the xenon map/blocks purely because it's the biggest one I have.   Feel free to send me something to test !

Title: Re: Play Mapper Mini (WIP)
Post by: basil99 on February 22, 2008, 02:17:59 AM
Quote from: kevin on February 21, 2008, 07:37:18 AM

   What size is the desktop ?  as it uses the default PB font (couier) / default sizing & style. 



1024x768x24

8 is too small for me :-((
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 22, 2008, 07:29:18 AM
  24 ? how old is the video card ?

  I'm running 1440x*900y here and don't have a problem.
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 22, 2008, 08:02:17 AM
 Testing Threaded Map Scaling

     While I've added a few more dialogs tidbits to PlayMapper, I've been tinkering with a few scaling methods .   Scaling a map is tricky, the code it trivial, just linear scaling the level to the output size.  But since you're reading map pixels (well blocks) you inevitability hit upon one of the wonderful features (cough) of the PC wonderful architecture.    That being the bottle neck of reading pixel data with the cpu from the video memory.   Which puts the brakes on the routine rather significantly.

     Clearly the solution is either not pre-fetch (read it on the fly) the bock data or pre-cache when it's first loaded it.  But if you pre-cache it on loading then there's a big dead wait for big block maps.  In the Xenon Map,  the routine pulls some 4meg of data from back from the video device.   There's actually a tipping point when it can be  quicker to read directly from the blocks, rather than pre-caching them,  providing the image you're outputting is small enough.    I,e.  Like you're making a thumb nail for example.   But if you ask me that's pretty unlikely, so i'm not going to bother :)

     So the solution i've settled upon is a threaded version of the original routine.  This hybrid version is interleaved in the app's refresh, so it actually grabbing map blocks while you're editing.  This way, when you go to preview a map,  most, possibly all the grunt work is done, and all that's left is the pixel plotting work.  Obviously the large the map the more pixel fetches the more stress the routine it under.  But the tests seem to only a few hundred milliseconds on big maps and 4meg tile data.   

   Anyway the picture bellow is the standard Xenon 2000 map demo i've testing various the methods in.  You can see the draw map with a scale overview, which looks like a big purple strip as the layer is massive 20x*1000 and mostly blank... But ya get that.
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 22, 2008, 10:31:16 PM
Play Mapper V0.31 (Alpha)

  Here's the current warts 'n' all public alpha of Play Mapper Mini. This version includes some important bugs fixes as well as all the basic required dialogs. So project names etc can be changed after it's been saved.

  PlayMapper keeps track of the creation date/last update date and revision number of the map for you. You can't change those, even though they appear as input boxes.  PlayMapper will update revision stuff for you.

  I've also added a layer shifting tool, so you can scroll the layers around and are working on implementing the Map overview/preview window.   The preview window is currently threaded into the programs update.   I'd done this to avoid the app stalling completely when building a preview (Since it's not quick).   You can test the preview window by hitting the ENTER key.  Be WARNED THOUGH, once you enable it, you can't disable it at the moment.

I'm still tinkering with it. What i'll probably do add and extra over window and use it for quick navigation as well around bigger maps.  (If there's time)
 
  Unfortunately  this round of updates will have to conclude this Sunday, so whatever state it's in then will be it for the time being.    What I'm hoping to get done is the overview window and some import/export stuff.  

  Control wise the editor functions completely from the mouse.   Left button select, right button de-select/abort



Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Layer Tools (Resize/Scrolling)
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)

 * Map Preview / Overview   (TESTING IN THIS VERSION)

 

To Do List

 * Mini Map Preview window
 * Import Layer/brush
 * Add some future proofing for PB1.7x map libraries


Future (only if there's demand)

 * Animation Support
 * optimize layers
 * Block Export (combine, stream/optimize)



Download
  Old alpha removed.



Note

   Maps saved in this version should be ok to import into future editions.  So feel free to have go at laying out some test maps.  You never know when this will be updated again.



Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 23, 2008, 12:41:34 PM
Mini Map Example V0.32

    Here's a bit of picture of the progress on mini map feature. The mini map is show through a flexi window, so you can resize the view while it refreshes. The refresh is threaded, so it's not instant, but it's ok for what it is. Still got a few issues left to iron out, mostly with maps with more than one layer. Although I'm not too sure they're worth worrying about. Anyway, here's a piccy.

Title: Re: Play Mapper Mini (WIP)
Post by: ATLUS on February 23, 2008, 02:14:46 PM
Excellent work!
in the following version will possible do different size tiles on one map?
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 23, 2008, 02:17:24 PM
Quote from: ATLUS on February 23, 2008, 02:14:46 PM
Excellent work!
in the following version will possible do different size tiles on one map?


Not possible.
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 24, 2008, 12:22:13 AM
Play Mapper V0.33 (Alpha)

  Here's the current warts 'n' all public alpha of Play Mapper Mini. This version adds support for the MiniMap overview as well brush pack loading/saving.

  Brush Packs are PlayMappers internal brush format and be loaded from either a PlayMapper Bush pack file, or from other PlayMapper maps.



Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Layer Tools (Resize/Scrolling)
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)
 * Mini Map Preview / Overview

 

To Do List

 * Import Level as Layer/Brush
 * Add some future proofing for PB1.7x map libraries


Future (only if there's demand)

 * Animation Support
 * optimize layers
 * Block Export (combine, stream/optimize)



Download
  old alpha removed.




Note

   Maps saved in this version should be ok to import into future editions.  So feel free to have go at laying out some test maps.  You never know when this will be updated again.


Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 24, 2008, 10:22:40 PM
Play Mapper V0.35 (Alpha)

  Here's the current WIP alpha of Play Mapper Mini. This version corrects some bugs with the previous edition, and includes some importing features, auto backup (on save project),  more dialogs (brush info/naming) and helper messages or the user.   Making this version about 95% fully functional (Apart from from cosmetic/design things :)).  There are some black holes (missing features) but it's now is pretty useful state.    I've only  got one thing more to add which is the Level import to layer feature.  Which will hopefully be added later on today.  Then it's up to you guys to Beta test it.



Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Layer Tools (Resize/Scrolling)
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)
 * Mini Map Preview / Overview
 * Import Level (packs) as Brushes

 

To Do List

 * Import Level as Layer
 * Add some future proofing for PB1.7x map libraries


Future (only if there's demand)

 * Animation Support
 * optimize layers
 * Block Export (combine, stream/optimize)



Download

  old alpha removed.   Try the Play Mapper  (http://www.underwaredesign.com/forums/index.php?topic=2301.0) Tools board.




Note

   Maps saved in this version should be ok to import into future editions.  So feel free to have go at laying out some test maps.  You never know when this will be updated again.



Title: Re: Play Mapper Mini (WIP)
Post by: kevin on February 26, 2008, 10:06:38 AM
Play Mapper V0.37 (Alpha)

  Here's the current WIP alpha of Play Mapper.   This version corrects some bugs (delete layer + incorrect map sizes issues)  from the previous edition, and includes the more importing features, such as Import Level As Layer.      Which means V0.37  includes  the core functionality I was aiming for in this update   The main thing missing really is a good tweak of  the cosmetics, .


  Note:  While it's functional,  it hasn't really been tested in real world scenarios.  So I'd expect some bugs (big & small) , but we won't know until you get road testing it !  - If you don't,  we'll never know !  




Included Stuff
 * Basic tools (Tile,Line,Box,Circle,Brush)
 * Block import
 * Multi tile Selection
 * Multi Layer Support
 * Layer Tools (Resize/Scrolling)
 * Brushes
 * Context driven pop up menus (right click)
 * Load/Save Format (hunk based.)  
 * Undo support (100 or so levels)
 * Mini Map Preview / Overview
 * Import Level (packs) as Brushes
 * Import Level (packs) as Layers




Future (only if there's demand)

 * Animation Support
 * optimize layers
 * Block Export (combine, stream/optimize)
 * Add some future proofing for PB1.7x map libraries



Download

  old alpha removed.   Try the Play Mapper  (http://www.underwaredesign.com/forums/index.php?topic=2301.0) Tools board.

Title: Re: Play Mapper Mini (WIP)
Post by: Zenn on April 30, 2008, 03:09:48 AM
Since animation is still on your to do list, does anyone know how I can simulated basic animated tiles, (without consuming to much processing).
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 15, 2008, 11:07:52 AM
Play Mapper V0.38 (WIP)

   So after a 4 month break from the this project, I'm back tinkering away at it.  My first priority is to add some animation support, since it's missing from the last alpha.  Beyond that,  I'm hoping to get some collision,  entity and possibly paths support implemented if there's time.  But we'll see.


Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 17, 2008, 11:56:35 AM
Play Mapper V0.38 (Animation WIP)    

    Animation is the first port of call.  While adding it shouldn't be difficult, the worry at this point it's more about fleshing out the functionality to make it the end result easy on the user.   Thus far, all I've got is a few new windows and bunch of drawings on paper.   The current idea is to add a second tile palette for animations.    You'll be able to select tiles from either.  Given that tiles are individual, this means that multiple selection won't be viable from the animation palette.    But there's nothing stopping you from dropping any combination you want onto the map, then grabbing it as brush. 

    The main drama is going to building the animations i think.  So we'll need a special window to let the user manage each animations tile sequence, as well as speed and anim type.  Given that the tile palette supports multiple tiles,  then in theory the user could simply grab the selection area over the animation sequence (assuming the tiles are drawn in order ) then drop it on the Animation editing window.  Making creating an animation almost a one click affair.    Would still need some tools to manage insertion & deletion though.   

    Previously I mentioned adding entities support.  What's that ?  -  An Entity is an object or character descriptor within the games world.   So users will be able to define (hopefully) a list of entities, then place them through out each map.    What this means is that you can initialize character starting positions at design time.  This information will either be housed inside the map or externally.   The map loading frame work will take care of loading it. All you need to do is run through the object list and initialize your game objects.     Turning PlayMapper into a crude one stop game design tool. 

Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 17, 2008, 01:56:19 PM
Quote from: kevin on June 17, 2008, 11:56:35 AM
Play Mapper V0.38 (Animation WIP)    
Great that you're back on Play Mapper Mini. Just in time for the competition me thinks  ;)

Quote
    Previously I mentioned adding entities support.  What's that ?  -  An Entity is an object or character descriptor within the games world.   So users will be able to define (hopefully) a list of entities, then place them through out each map.    What this means is that you can initialize character starting positions at design time.  This information will either be housed inside the map or externally.   The map loading frame work will take care of loading it. All you need to do is run through the object list and initialize your game objects.     Turning PlayMapper into a crude one stop game design tool. 
Good idea!
As usual I have one more proposal: individual attributes for entities. I know that it will complicate creation of entities but it's a nice feature to have.
Say you place a bunch of monsters in your map. But the first monster should have a health of 100, the second a health of 80 and the last a health of 200.
So instead of just running through the object list and initializing my game objects it would be perfect to run through the object list, iterate over the attributes of each object and use all informations to initialize my game objects.

The same mechanism would also be great for the map itself. You could put the playing time for this map into an attribute, or attributes like gravity to use in this map, score for finishing and so on.

Just my 2 cent,
Tommy
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 17, 2008, 02:04:32 PM
QuoteAs usual I have one more proposal: individual attributes for entities. I know that it will complicate creation of entities but it's a nice feature to have.
Say you place a bunch of monsters in your map. But the first monster should have a health of 100, the second a health of 80 and the last a health of 200.
So instead of just running through the object list and initializing my game objects it would be perfect to run through the object list, iterate over the attributes of each object and use all informations to initialize my game objects.

   That's the objective.    Each entity will be a block of data.   How the user interprets this is up to them.  Some could be tagged as characters, some events, timers, zones,  path trigger etc.. 

Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 17, 2008, 02:13:52 PM
 ;D  ;D  ;D

Sounds perfect!

Thanks,
Tommy
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 19, 2008, 02:40:47 PM
  Play Mapper V0.39 (Animation WIP)

      Still tinkering away at animation code between other jobs.  The good news is that's actually working, well,  to a point.  While you can't select what animation you what to draw with,  you can actually add new animations  from the tile selection window to the anim buffer.   Even in it's current state,  it feels surprisingly straight forward to do. You just left click on the first block (on the Tile section palette) then right click to the size it.  Just like you would when drawing.    So If the animation blocks are in order.    Then all you need to do is hit the as add animation drop down and it's done.

     To display the animated map, you use the layer controls.  These are little green lights.  Just right click on those and the layer properties will appear.  Here you can select is the layer is visible, transparent  or animated. 

       So far i'm mainly working on the back end code, the stuff that lets Play Mapper manage the animations,  which is mosty done now. The next task is to hook it up the gui components.   While it's not going to win any beauty competitions any time soon,  it should feel ok to use.  Could be better, could be worse... :)
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 20, 2008, 01:43:54 PM
  Play Mapper V0.39b (Animation WIP)

    Work continues on the building in the actual animation sequence editor.  Pretty much making this up as i go along at this point :),   but the pieces are largely falling into place easy enough.    The pic bellow shows a rough as guts version the edit anim window and the anim running on the map (not that you can see in a picture).  The controls mostly work,  you can move through the different anims, name them (you don't have to), change the anim types and frame rates.    But i'm still tinkering with the manual frame ordering.  Hopefully that'll fall into place in the next edit session.

    While I think of it,  the animations frame rate are depend upon games refresh, so the editor needs to simulate users required refresh rate in order to get an idea of how the anims should run.   It'd be nice to have a 'viewport' or hud view also.  So the user can see view the map and geta  sense of what it'll look like in the game.  This is often helpful when designing maps that contain secret rooms for example. 
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 22, 2008, 02:37:00 PM
  Play Mapper V0.40 (Animation WIP)

       Finally solved the mysterious animation resetting bug mentioned in the dev blog.   Turned out to be the result of some lazy cut and paste, as always :)  -  Bellow we see the editing window working.  So now you and create an animation, add frames, insert and delete frames.  As well as naming it,  setting the animation mode and speed.  All that remains is to tweak the Window Init and resize code.  Which is the slowest thing about adding new controls.   But ya get that...

      To manage the frame list, you click on point you have to insert at, then hit <>  to insert or - to delete.   The inserts the current tile section from the tile palette init the anim sequence.  Ideally if the animations are set out upon the original block picture in a linear order.   Then adding most animations will be a one click affair.   The only time you'll have to manage the frames is of course if the frames are not drawn in sequence.  Even so,  it's only going to be a few clicks to set up an anim.   It might not look it, but it's pretty painless.

   
Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 23, 2008, 02:15:12 AM
Just realized after re-reading your last entries:
Animations in maps are frame based. This implies that the whole map is somewhat frame based - means that it should be displayed at a specified frame rate when included animations shall work properly.
Is the "mandatory" frame rate a field/variable of the map file? If so, can I read it and use it to call SetFPS() anytime in the game to adjust the frame rate to the map?

Do you specify frame changes for an animation in frames that have to pass before the next frame is drawn (every 15th frame for example)? Or do you specify fractions of the map frame rate (next frame each quarter of the map frame rate)?

What about time based games? Could they use animated maps from Play Mapper Mini?

Cheers,
Tommy
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 23, 2008, 07:25:41 AM
QuoteIs the "mandatory" frame rate a field/variable of the map file? If so, can I read it and use it to call SetFPS() anytime in the game to adjust the frame rate to the map?

    Currently the animations just run at whatever speed the editor is running at.  To keep the demand a bit lower on the system, about 40or 50 from memory.

    However,  In the project properties there will be a control designers can set for the games ideal refresh rate.   The editor will simulate this refresh rate,  regardless of how fast the editor is actually running.


QuoteDo you specify frame changes for an animation in frames that have to pass before the next frame is drawn (every 15th frame for example)? Or do you specify fractions of the map frame rate (next frame each quarter of the map frame rate)?

      It's frames.


QuoteWhat about time based games? Could they use animated maps from Play Mapper Mini?

   Yep,  you step the simulation forward, by translating the TimePast (since the last redraw) into a frames past value, then updating the animations.  A bit like this.


FramesPast=TimePast/TicksPerFrame
For lp=1 to framespast
     UpdateMapAnims
next

Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 23, 2008, 01:34:14 PM
Play Mapper V0.40b (Alpha)

    After a long break from PlayMapper here's the current WIP alpha.     While this version corrects a few bugs found in the previous edition, the objective here is just to give you a bit of look the current state of the Animation controls.   So far, my focus has been entirely on getting the animation editing window set up.   Had a few unexpected drama's along the way, but for the most part it's functional now.    The next addition will be another window that holds a list of animations.  These will be the animation palette.  It's from here you'll you select the tiles when drawing.           

  Note: While it's functional, it hasn't really been tested in real world scenarios. So I'd expect some bugs (big & small) , but we won't know until you get road testing it ! - If you don't, we'll never know !


Current WIP
* Animation Support


Included Stuff
* Basic tools (Tile,Line,Box,Circle,Brush)
* Block import
* Multi tile Selection
* Multi Layer Support
* Layer Tools (Resize/Scrolling)
* Brushes
* Context driven pop up menus (right click)
* Load/Save Format (hunk based.)
* Undo support (100 or so levels)
* Mini Map Preview / Overview
* Import Level (packs) as Brushes
* Import Level (packs) as Layers




Future (only if there's demand)

* optimize layers
* Block Export (combine, stream/optimize)
* Add some future proofing for PB1.7x map libraries



Download
  Old Version Deleted

Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 25, 2008, 11:34:15 AM
Play Mapper V0.42 (Alpha)

      This version comes pretty close to finishing off Animation Support.  The editor now lets you build animations and select them from the animation palette.   The down side is that you can't save maps with animations as yet. 


Current WIP
* Animation Support


Included Stuff
* Basic tools (Tile,Line,Box,Circle,Brush)
* Block import
* Multi tile Selection
* Multi Layer Support
* Layer Tools (Resize/Scrolling)
* Brushes
* Context driven pop up menus (right click)
* Load/Save Format (hunk based.)
* Undo support (100 or so levels)
* Mini Map Preview / Overview
* Import Level (packs) as Brushes
* Import Level (packs) as Layers




Future (only if there's demand)

* optimize layers
* Block Export (combine, stream/optimize)
* Add some future proofing for PB1.7x map libraries



Download

   Old Version Deleted

Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 25, 2008, 03:19:50 PM
Play Mapper V0.43b (Alpha)

      This version officially includes basic Animation Support.  Not only can you build animations & render animation blocks from the Anim palette you can save/reload the maps files also.   So you can now actually test it.

      Be forewarned however, this is an pretty early Alpha.  There's bound to be bugs with the animation stuff.  So take it easy initially,  If you notice some sequence of events thats causes an error with Anims, then make sure you mention it bellow!




Included Stuff
* Basic tools (Tile,Line,Box,Circle,Brush)
* Block import
* Multi tile Selection
* Multi Layer Support
* Layer Tools (Resize/Scrolling)
* Brushes
* Context driven pop up menus (right click)
* Load/Save Format (hunk based.)
* Undo support (100 or so levels)
* Mini Map Preview / Overview
* Import Level (packs) as Brushes
* Import Level (packs) as Layers
* Animation Support




Future (only if there's demand)

* optimize layers
* Block Export (combine, stream/optimize)
* Add some future proofing for PB1.7x map libraries



Download
OLD FILE REMOVED

Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 25, 2008, 08:32:18 PM
Play Mapper V0.44 (Map Conversion)

          Map conversion is another one those little tidbits that's been on the to-do list for ages,  but getting around to it is another thing.  Anyway, it's here now.  What this new feature does,  is it lets you import a map created with the original PlayMapperClassic tool into PlayMapper.   So far it it seems to work ok,  although it doesn't support the importing animations (now that i think of it)

         Bellow you'll see the good old standard soccer field map that comes with PlayMapClassic, imported and ready to rock in PM...  Too  easy.

 
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 26, 2008, 12:57:50 PM
Play Mapper V0.45 (Alpha)

     This version adds the new map conversion features.  These can load a map from PlayMapperClassic into PlayMapper.  

     Be forewarned however, this is an pretty early Alpha.  There's bound to be bugs with the animation stuff.  So take it easy initially,  If you notice some sequence of events thats causes an error with Anims, then make sure you mention it bellow!



Included Stuff
* Basic tools (Tile,Line,Box,Circle,Brush)
* Block import
* Multi tile Selection
* Multi Layer Support
* Layer Tools (Resize/Scrolling)
* Brushes
* Context driven pop up menus (right click)
* Load/Save Format (hunk based.)
* Undo support (100 or so levels)
* Mini Map Preview / Overview
* Import Level (packs) as Brushes
* Import Level (packs) as Layers
* Animation Support
* Map Conversion




Future (only if there's demand)

* optimize layers
* Block Export (combine, stream/optimize)
* Add some future proofing for PB1.7x map libraries



Download
  old alpha removed.   Try the Play Mapper  (http://www.underwaredesign.com/forums/index.php?topic=2301.0) Tools board.
Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 27, 2008, 02:27:59 AM
I just tested the PB mapper 0.45 and I have problems using the animation stuff.
I managed to create two block animations. I then selected one animation in the Animation Palette window where the animations are running.

Clicking onto the map just put a blue square onto the map but no animated tile...see the attached screenshot.

What am I doing wrong?
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 27, 2008, 08:24:15 AM

  You'll need to turn animation on.  To do so,  Right Click the Layer you want to change in Layer Select control (the green balls represent each layer) to bring up the layer properties.  Then click animated.



Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 27, 2008, 09:00:03 AM
Aah, now it's working. Not so easy to discover how that works  ;D

The information that a layer is animated is not stored in the map file, right? I'll have to switch it on again manually...

How can I specify the size of a map? For example I want to create a map with 32x32 tiles and have 20 by 15 tiles (640x480). Of course I want to start PlayMapper Mini in a 1680x1050 resolution to have all palettes open and so on. How does that work?

Can I create a map with a background image as the lowest layer? Or do I need to deal with background images on my own?

Looking good so far!

Cheers,
Tommy
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 27, 2008, 09:25:44 AM

QuoteThe information that a layer is animated is not stored in the map file, right? I'll have to switch it on again manually...

  No, you just load the map.

QuoteHow can I specify the size of a map? For example I want to create a map with 32x32 tiles and have 20 by 15 tiles (640x480). Of course I want to start PlayMapper Mini in a 1680x1050 resolution to have all palettes open and so on. How does that work?

  Resize the layer(s).  The dialog is currently under  EDIT/LAYER/RESIZE

QuoteCan I create a map with a background image as the lowest layer? Or do I need to deal with background images on my own?

   Some basic back/foreground controls are on the To-Do list.  But unless you edit in the same resolution, there's not much point.  As the backdrop and the map won't be in sync.
Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 27, 2008, 09:50:57 AM
Quote from: kevin on June 27, 2008, 09:25:44 AM

QuoteThe information that a layer is animated is not stored in the map file, right? I'll have to switch it on again manually...

  No, you just load the map.
Does not work for me with the Play Mapper Mini 0.45. I have to open the Layer Info dialog and activate Animations again. So although it might be stored in the map it is not activated in Play Mapper Mini as soon as it is detected. Maybe just misinterpretation as I was thinking of Play Mapper Mini but not the general information in the map file...

Quote
  Resize the layer(s).  The dialog is currently under  EDIT/LAYER/RESIZE
Yup, found it. And it's working fine.

Quote
   Some basic back/foreground controls are on the To-Do list.  But unless you edit in the same resolution, there's not much point.  As the backdrop and the map won't be in sync.
I don't agree. The backdrop is just an image with a certain size starting at 0,0 (or maybe a given offset). You could add options to tile the backdrop to match the map size or not. Should be completely independent of the rest. I think  ;D
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 27, 2008, 10:53:53 AM
QuoteDoes not work for me with the Play Mapper Mini 0.45. I have to open the Layer Info dialog and activate Animations again. So although it might be stored in the map it is not activated in Play   Mapper Mini as soon as it is detected. Maybe just misinterpretation as I was thinking of Play Mapper Mini but not the general information in the map file...

      Probably.. But for clarification, so when you load the example maps animations aren't enabled ? - or are you talking about exporting and importing layers ? 
 
QuoteI don't agree. The backdrop is just an image with a certain size starting at 0,0 (or maybe a given offset). You could add options to tile the backdrop to match the map size or not. Should be completely independent of the rest. I think

      It's be out of sync in the edit display.  What I mean, is it's only a valid representation of one portion of the editor view. Since the editor will (more than likely) to be running in a higher resolution than the final game display (and the backdrop image).   Hence the discussion about a 'game' view port view.

Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 27, 2008, 05:31:54 PM
Quote from: kevin on June 27, 2008, 10:53:53 AM
      Probably.. But for clarification, so when you load the example maps animations aren't enabled ?

That's what I meant. Animations are disabled in PBM when I load my own map. 

Quote
      It's be out of sync in the edit display.  What I mean, is it's only a valid representation of one portion of the editor view. Since the editor will (more than likely) to be running in a higher resolution than the final game display (and the backdrop image).   Hence the discussion about a 'game' view port view.

Yup. You know what I mean and you'll get it working, I'm sure  ;D
Title: Re: Play Mapper Mini (WIP)
Post by: kevin on June 28, 2008, 02:15:35 PM

           
       
QuoteThat's what I meant. Animations are disabled in PBM when I load my own map.

           This should work in V0.46.   However when you export a layer,  all that's exported is the layer properties and the array of tile data.    So if you export/import layers from some other source manually, then you lose the animation definitions.   Since they're not stored in a layer, they live in the map

          Currently tacking some limited backdrop support into it.   See piccy.

Title: Re: Play Mapper Mini (WIP)
Post by: thaaks on June 28, 2008, 02:21:02 PM
Oh yes!  ;D
Title: Re: Play Mapper (WIP)
Post by: kevin on June 28, 2008, 03:32:27 PM
Play Mapper V0.46 (Alpha)

     This version corrects the layer properties problem when importing levels in previous.   It also includes a very basic 'WIP' backdrop/game prop's window which is currently titled GameScene properties.  It's only about %10 implemented, so it preview only.. (ie naff)


     Be forewarned however, this is an pretty early Alpha.  There's bound to be bugs with the animation stuff.  So take it easy initially,  If you notice some sequence of events thats causes an error with Anims, then make sure you mention it bellow!



Included Stuff
* Basic tools (Tile,Line,Box,Circle,Brush)
* Block import
* Multi tile Selection
* Multi Layer Support
* Layer Tools (Resize/Scrolling)
* Brushes
* Context driven pop up menus (right click)
* Load/Save Format (hunk based.)
* Undo support (100 or so levels)
* Mini Map Preview / Overview
* Import Level (packs) as Brushes
* Import Level (packs) as Layers
* Animation Support
* Map Conversion




Future (only if there's demand)

* optimize layers
* Block Export (combine, stream/optimize)
* Add some future proofing for PB1.7x map libraries



Download

  old alpha removed.   Try the Play Mapper  (http://www.underwaredesign.com/forums/index.php?topic=2301.0) Tools board.


   Play Mapper Reload Library (http://www.underwaredesign.com/forums/index.php?topic=2539.0)



Title: Re: Play Mapper (WIP)
Post by: kevin on November 30, 2012, 11:03:54 PM
PlayMAPPER Awakenings  

    Being one of the oldest PlayBASIC tools around i've been meaning to update this for contemporary editions of PlayBASIC, but haven't had the time.   Mixed feelings about at today,  for an alpha there's a lot of stuff in it, things I'd long since forgotten.  My favourite would have to be focus on brushes, but the controls are somewhat hampered by the mixture of custom and windows gui together.  The only solution would be to remove the legacy WinGUI stuff just as the other tools have long since done.    

    From a code perspective, it's a relatively clean program, but parts of it could be reduced though by swapping methods to more modern approaches.  All of the  PB helper tools moved away from WinGUI stuff long ago.  But it's a lot more ingrained in this program.  So can't just chop it out and roll a few replacement functions and hey presto.    There's a lot of code tied up in gathering where the input comes from and how to react to it.   Consolidating everything into one system would make it a lot easier.  

    I think this is a situation where something like the Action GUI (http://www.underwaredesign.com/forums/index.php?topic=3899.0) framework would work better.   It's a far cry from flexiGUI in scope, but the input / response processing is much easier.    You create a 'window' of a particular class and the GUI calls your methods on demand.   Hiding much of the classic creation/trapping  and GUI resource management away.    That'd probably be a 25% reduction in size straight off the bat.  

    Only issues that come to mind handling the gadgets and building a replacement menu.    The menu stuff is really interesting as moving to a CallFunction approach would again reduce the code footprint by incorporating  the catch and call process into the GUI directly, or via a message.    It's just a matter of defining a destination function that exists.  The refresh will call it.   Really like the idea of  externalizing the definitions of much of that stuff.  

    So menu  could be a simple as


[File]
->New Map onclick="GUI_NewMAP"
->Load Map onclick="GUI_LoadMAP"
->Save Map onclick="GUI_SaveMAP"

[About]
->PlayMAPPER onclick="GUI_ShowABOUT"



  etc..  


Title: Re: Play Mapper (WIP)
Post by: BlinkOk on December 02, 2012, 05:28:01 PM
download link doesn't work
Title: Re: Play Mapper (WIP)
Post by: kevin on December 04, 2012, 11:34:16 AM
  PlayMAPPER - Menu Mock Ups  

   PlayMapper uses the discountinued WinGUI library with the window menu, right click popup menu and scroll bars.   So to get rid of it, means coming up with replacements for at least those components, all of which I've got sitting around (in one state or another) from other tidbit projects over the years.    The menu stuff is  standard one used in all the PB tools bits, but the popup menu had to be harvested from the IDE prototypes.   Took a little bit of messing around to convert, but ended up Frankenstein all the bits into something that feels like a replacement.

   The classic drama when building GUI stuff in code, rather from some designer before hand (which then builds the code/data for you) is you've not only got to create the 'things',  but trap any interaction with those things.      So if you have a menu, you've not only got to define the structure of the menu, but write some code to react to any clicks those buttons.     Which is generally nothing more than a Select / Case statement, but it's still another little chore to program and maintain.   The replacement menus use the callfunction behavior.   So once defined, the render function calls target function for you.  Which will mostly remove the need for manual interaction.   I say mostly, as there's bound to be some situation where some alternate behavior is preferred.  Always is.  
 
   Bellow is just a mock up of the components running together.  



Form Issues

   All the forms in the old version are created in code on demand.  As such, tweaking the cosmetics is tedious as all hell.    Starting to have ideas of using legacy visual basic as make ship form designer for GUI stuff PlayMAPPER.   The VB6 forms seem pretty easy to parse really, they're just a list of variables after all. it wouldn't look anything like the VB form, but laying them out code is not a lot of fun.    The benefit also is the form and be edited at later date.  

   Update: An hour or so ago it was a theory and now there's a very basic VB6 form parser up and running.  The parser just runs through the VB form and grabs the fields that are useful in the PlayBASIC world.  Doesn't support controls, but you can get the form easy enough.    Controls aren't any more difficult, there just more parsing.   The parser dumb and dog poo, but will do the job.   The current thinking is that it'll spit out a some type of square bracket markup to store the fields in.   Then the host program loads the texts and calls a decoder.  The decoder could make the flexi window and controls etc.    Dunno well that'd work, but it should be viable. 

    The second picture shows the VB6 form designer and the PB app running in front. The parser skims the form and gets cherry picks the caption, back ground colour, size etc from it.

     
Title: Re: Play Mapper (WIP)
Post by: ATLUS on December 04, 2012, 03:36:59 PM
Looked very nice!
Title: Re: Play Mapper (WIP)
Post by: kevin on December 05, 2012, 01:06:36 PM
  Simple Vb6 Form Conversion V002

        Yesterday the Vb6 form parser was only able to parse basic info about a single form.   The next step has been to include support for some controls.   So far,  it's limited to only Picture &, Label controls.   The Picture control turned into a little more work than I was expecting,  since VB6 stores the actual picture data in a binary pack file.  Luckily with a little guess work about the structure,  it's able to rip the included pictures out and save them back to disc.   Otherwise you'd have to do this by hand, no thanks..  The ripper is pretty dumb, it simply assumes the pack file formats, rather than knows it.  So any  other type of data and it'll  have no idea about.  But it shouldn't matter for this.  

         Bellow we can see the VB6 form designer and PB parser with a mock render of the dialog.    


Form Conversion V003

          Got a bit further with this tonight,  ran into a few snags with some of the properties in the controls being a right mess.  So weeding out the stuff  I don't need, which is about 75% of them really.   You could probably knock together a placement tool and get much the same result.   None the less, it now supports LINE, TEXTBOX, BUTTON and some alignment do dads.   

         The display routine is purely mock up in these demos.    Undecided about what it'll export today.  It'd be easier to keep FLEXI GUI in PlayMAPPER, since it's all ready done, but as with any GUI change, this means a lot of tweaking or down right replacing slabs of GUI code.    The other option,  would be to build (mostly harvest) the gadget controls from FLEXI and drop them into an ActionGUI styled framework, then pull the 'editor' code out of current PlayMAPPER and drop it into a fresh new project, bit by bit.    They're both pretty time consuming, but can't help feeling the latter would give a better result, but probably  be just a shakey in the short term.   
 
         If we stay with Flexi, then to get the most out of the dialog builder it needs to export 'gui code' as is.  So it'd basically spit out a set of functions that create the window, trap the events and manage the properties for you.    Which is basically would visual basic does for you, effectively Hiding the mandate nature of trapping clicks.   

Title: Re: Play Mapper (WIP)
Post by: kevin on December 07, 2012, 10:28:06 AM
PlayMAPPER - Menu Test

        Had some time tonight to try dropping the menu parts into the existing project.  It's not until you really dig through the entire projects source, that the size of it really hits home,  weighing in somewhere around 23->24,000 lines.    Since the Menu is string based, the defines are set out in some data statements with a little routine to construct it.    Even though it's less code than the old WinGUI setup, there's still a LOT of data/code to set up.   So just making the table alone, probably took and hour or so.  

        Patching the rendering together is pretty straight forward, the problem has always been working out the context of the click(s) in relation to the various components.  As such, there's all this man handling wedged into the trapping to try and guide the response.  It sorta works, but there's combinations where it's more work than it need be. A by product of that, is some things that I wanted to include,  just didn't work properly, like the key controls.   The main components used in the project were built long before to the V1.64K though, so the methods the code uses, really reflect this.  

        Anyway, here's a bit 'as is' shot of the menu running in PlayMapper.  In this version, only the main File menu options are actually hooked up to the action functions (the code that actually does the thing).   So it's even less useful than before, but it does work.   The PopUp menu replacement doesn't seem to want to display for whatever reason and there's the same click catching issues in this version.        


Form Conversion V004

        The form parser works good enough for the time being, supports pretty much the basic properties of all the standard VB6 controls.  Form Labels, TextBox, Buttons, Check/Option Boxes, Vertical & Horizontal Sliders, Pictures/Image boxes and some primitive controls.    It can't render all these accurately in the display mockup, but it parsers the properties into the structures ready to do something with them.   For most PB tool styled projects,  Labels, TextBox, Buttons, Checkbox , Sliders and pictures are more than enough really.  

Title: Re: Play Mapper (WIP)
Post by: kevin on December 12, 2012, 12:10:08 AM
 PlayMapper - Menu / Dialog Conversion

   The project is simmering along,  since last time all the menu stuff has been hooked up and pretty much most of the legacy WinGUI stuff removed.  Been able to strip it all back to about 20K lines, and pretty happy with that.  There's  seems to be  a reasonable amount of  legacy code that could be removed also.    The program uses a much older version of the Flexi library (whatever revision it was back in 2008).   Flexi's had various key additions since then,  most to how it works, such as call backs to user defined functions and stuff like support for the treating the screen as special window.    They're both very handy, the latter removes a big part of the 'click' and focus issues from multi windowed apps.  

    So my first port of call has been swap to the most recent addition of flexi, this is where all the parts collide.  Current all dialogs are hand programmed in PlayMAPPER.  Building everything in code is tedious.. very tedious.. Since the newer version of Flexi support call backs,  it'd be much easier to define the form in VB6 and run the importer app and have it spit out the required data/code.   Doing this means translating the parsed form /control dialog info into Flexi gadgets.  Flexi wasn't meant to be map to Windows GUI one to one, so something won't translate over.   But ideally the closer the better.      

    In today's little experiment, we're importing the VB6 form, then  building a working flexi window with controls from it.  The styling is different, but the basic functionality is much the same.  What's missing the behaviors behind the interactions with the Clicking the various gadgets.  These will have to be programmed, much as they are in VB.   But If with the call back system, it should be possible to stream line much of this code.    But anyway, bellow we have piccy of the VB6 form editor and flexi window next to it.  



     Go here (VB6 Form to Flexi Conversion (http://www.underwaredesign.com/forums/index.php?topic=3980.0) ) for more stuff about the VB6 to Flexi form conversion.