(http://underwaredesign.com/PlayBasicSig.png)
PlayBASIC V1.64 Learning Edition Update ( March 26, 2010 )
This thread documents the changes made for the PlayBASIC 1.64 revision L learning edition upgrade.
The V164L Learning Edition was released (April 25, 2010) (http://www.underwaredesign.com/forums/index.php?topic=2396.msg22513#msg22513)
Upgrade Intro:
If you're running the current PlayBASIC V1.63 Learning Edition and haven't bothered following through the upgrade history of PB in recent years, then you might be horrified to discover that V1.63 is actually two or more years older than the current retail versions of PlayBASIC. That means you're missing out on loads of new features and improvements made to the PlayBASIC in this time. Hence, it's time we updated the learning Edition.
The tasks of the upgrade are two fold,
1) First is building the LE compiler
2) Upgrade the documentation & example packs.
So far i've been working upon building the LE compiler. The learning editions are built from retail version, using our propriety builder software. While this makes the job of building a specific versions much easier, the builder isn't as fast as it could be. In fact, yesterday it was taking 22 /23 minutes to build & compile. Nothing worse than eating through 20 minutes only to find a typo and have to rebuild it all. Obviously, this was just not acceptable, as I need to build it each time for testing. The drama turns out to be some lazy nested code in the pre-parsers routines. So I spent much of yesterday afternoon/evening writing an implementation of the parser based upon the technique used in the Debugger Prototyping (Syntax Highlight) (http://www.underwaredesign.com/forums/index.php?topic=3264.0) -The resulting in version of the parser that's some 10 times quicker. Which is acceptable..
Anyway, now the builder is running find I can focus on tweaking the compiler/runtime.
What's New In V1.64 Learning Edition ? Rather than type out a huge list of new features, why not see for yourself..
PlayBasic V1.64k WIP Gallery (http://www.underwaredesign.com/forums/index.php?topic=3216.0)
PlayBasic V1.63 -> PlayBasic V1.64 Gallery (http://www.underwaredesign.com/forums/index.php?topic=2610.0)
PlayBASIC Retail Upgrade History
For newer upgrade work in progress see,
See [plink]PlayBASIC V1.64P (http://www.underwaredesign.com/forums/index.php?topic=4089.0)[/plink] - Convert PlayBASIC To Machine Code Dll's (http://www.underwaredesign.com/?l=PlayBASIC-To-DLL-Development-Blog)
See PlayBASIC V1.64O (http://www.underwaredesign.com/forums/index.php?topic=3988.0)
See PlayBASIC V1.64N2 & V1.64N3 (http://www.underwaredesign.com/forums/index.php?topic=3833.0)
See PlayBASIC V1.64N (http://www.underwaredesign.com/forums/index.php?topic=3651.0)
See PlayBASIC V1.64M (http://www.underwaredesign.com/forums/index.php?topic=3440.0)
PlayBasic (V1.64) Work In Progress
I've had a lot less time to tinker with PlayBASIC this week than normal, due to a combination of an overheating power supply and some baby sitting. But anyway, the progress that has been made between crashes (P/S issues are fixed now) has mainly been on address some older bugs. While none of which we're show stoppers, it's always good to get those things cleaned up.
The V1.64 learning edition is being built from the V1.64L sources, these are latest versions of the PlayBASIC language. That doesn't mean the LE version will be able to do everything the RETAIL editions can, but there are some changes such as the addition of DLL support in LE editions. So users can use 3rd party libraries with the LE edition (Ie. Physics), Which should prove interesting.
PlayBasic V1.64L - New Features
The spec's for the RETAIL versions of this upgrade we're outlined a few months ago, however that's the Retail edition, the LE is being scaled back some. However one of the area's that was tagged for updates was the Mapping library. Namely adding some helper functions to aid users detect impacts on maps using various methods. PLus perhap some commands to help reduce scene overdraw. Such as something like the methods outlined in here (http://www.underwaredesign.com/forums/index.php?topic=3364.msg22361#msg22361)
Atm, i'm working on collision functions. Important one's are detecting if a Point/Line hits the Map (rect & at pixel level) as well as sprite a few others. The attached picture is a demo where the user can scroll through the xenon maps and the mouse pointer has collision (pixel level) against the foreground map layer. Although it's a bit hard to see in this pic.
PlayBasic V1.64L -line Hit Map Tile/Pixels
Been working on detecting if a line intersects with a PB map, which is the logical extension from detecting if a dot impacts with a map. So far, i've just been looking at a few different techniques, but I think i'm going to go with the following. Which is a sort of customized ray trace. This should perform pretty well and be pretty accurate.
While the current version doesn't handle pixel level impacts, you can happy find the first impact along the ray with the map at vector level. Which is nothing that new if you're familiar with worlds commands, which are designed for this very purpose. But anyway, the picture bellow is showing the ray being traced through the map space. The demo currently shows the first impact point (the circles) plus it highlights if the ray is passing over any solid tiles in the map.
This will be mostly used (i would think) in keep characters walking around a map. So you'll cast a ray down from the character position to detect ground height. Then adjust the characters position accordingly. Much like the (Walking on Sprite Collision Map (http://www.underwaredesign.com/forums/index.php?topic=3339.0)) examples.. For the best results, it's recommended that you use two maps though. One map for display and another collision version, commonly called a collision mask. The collision one would be a 2 colour version basically. This allows means you can tweak the block sets better than running collision on the actual map data.
PlayBasic V1.64L -Moving to Example /Help Files phase
Haven't had anywhere near enough time to implement the handful of mapping features as i'd hoped this week. So they'll have to be shelved for the time being, really don't want to this blow out into a long winded affair. I'd much rather get a update out now, so we can hopefully (if there's enough user demand) get back to releasing updated LE versions on a more regular basis.
While I haven't been writing much code, I have been running though the example pack the last couple of evenings. Not much to do really, mostly just making the odd the change here and there, as well as adding some of the more recent tidbits. The temptation is to add everything, but then there's too many examples.
The main thing I've been wanting to take a look at really is the doc's builder. Se if adding sub categories is viable.. Should be, i'm hoping to get out of it with the lease amount of work possible.
PlayBasic V1.64L Help Files -> Sub Category Support in Doc Builder V0.62
The Help files are important, we know that. However, arranging them, so they're easy to navigate isn't something that we can do by hand. So the doc's are created from a specifically designed program (pictured bellow). The program does all the grunt work (cross linking, parsing examples, highlighting etc etc) for us, allowing us to add pages to the main categories with relative ease. While this was OK back in the day, when PlayBASIC had only a 1/3 of the commands and command sets it has today, over time lt had become obvious that we need to split up the main categories into sub-categories.
So in the past couple of days i've updating the DOC Builder to incorporate some type of basic sub-categories functionality. it's a bit tricky, as it has to fit inside how it currently works. But, after a little bit of messing around, it's finally starting to behave itself. At the moment the only section i've been testing is the About section. So far, all i've done is cut into 3 sub categories (pictured bellow). While i'm not too crazy about how it looks, the separation should help people find whatever functionality they're after.
How can you help ? By contributing to this topic -> Documentation Request - Help Sub Categorize Command Set (http://www.underwaredesign.com/forums/index.php?topic=2414.0)
Do you make the Docmaker public?
no.
PlayBasic V1.64L Help Files -> Adding Sub Categories To Help
While the doc builders now handle the sub category stuff inside command set categories, the real work is running through the entire command set and assigning the sub-categories to them. Was initially doing this by hand, but with over 1200 command & libraries to got through manually, this gets old real fast. So of course, the lazy man's solution was to knock up a little tool that'll take a list of commands and add each commands category definitions to the individual command files database. The doc files are just formatted text files with various fields in them. So adding the cat's just means loading/parsing & saving them out. All of which is trivial in PlayBASIC...
The little category tagger program is only part of the problem though, you still have to create a main command lists with the sub categories in them (like these (http://www.underwaredesign.com/forums/index.php?topic=2414.0)) - For that, I just threw another bit of code together to create the global list of the commands in their commands sets. Equally trivial (see bellow), but a real time saver.. These couple of junk app's have saved me days of manual work. Not bad for less than hours investment :).
[pbcode]
Function ListAllCommands(Path$)
Dim files$(0)
GetAllFilesInDir(Files$(),path$)
Dim Row$(100)
LastCommandset$=""
For lp=1 to Getarrayelements(files$())
f$=files$(lp)
ext$=getfileext$(f$)
if lower$(ext$)=lower$("PBDoc")
f$=replace$(f$,path$,"")
f$=replace$(f$,".PBDoc","")
Count=SplitToArray(f$,"\",row$(),0)
if Count=2
CommandSet$ =row$(0)
Command$ =row$(1)
if CommandSet$<>CurrentCommandSet$
#print ""
#print ""
#print "["+CommandSet$+"]"
CurrentCommandSet$=CommandSet$
endif
#print Command$
endif
endif
next
Endfunction
[/pbcode]
outputs
[Worlds]
CameraGrabWorldAt
CaptureToWorld
CreateWorld
DeleteWorld
GetFreeWorld
GetWorldClosestPoint
GetWorldElements
GetWorldElementVisible
GetWorldQuantity
GetWorldStatus
NewWorld
PartitionWorld
QueryWorldRegion
RayIntersectWorld
WorldElementVisible
[Time & Date]
CurrentDate$
CurrentDay$
CurrentHour
CurrentMinute
CurrentMonth$
CurrentSecond
CurrentTime$
CurrentYear$
Timer
Wait
[Text]
CenterText
CursorLineFeed
CursorMargin
GetCursorLineFeed
GetCursorMargin
GetCursorX
GetCursorY
GetTextHeight
GetTextWidth
Print
SetCursor
SetCursorX
SetCursorY
Text
etc tec tec
Sub Categories Are Go
The sub-cat pass over the documentation is complete for the most part. I say the most part, as I haven't bothered with standard libraries. Since most of these will soon be officially discontinued anyway. What I would like to add some controls in the doc's builder to tag command sets type. This should allow built in commands and optional libraries to be separated in the documentation, much the same way the commands can have associate categories now.
All in All it's coming along, we really need some USER CREATED CONTENT though in the forum of examples.. So head over the Source Code board (http://www.underwaredesign.com/forums/index.php?board=12.0) and get posting...
V1.64L Help Files Beta #1
Here's the current work in progress release of the PlayBasic V1.64L documentation. This edition is suitable for use with PB V1.64L (Retail) and of course the upcoming Learning Edition. The main changes (apart from another round of tweaks) are the categories /sub category support. There's a few other changes that were added yesterday. Namely that documents now have a type. Types are limited to either a command dizzy or a tutorial page currently. Pages default to a command if no type is assigned. The purpose of this is that when the HTML pages are created, the documents can have sections optionally included/excluding depending upon the document type. So on tutorial pages the parameter stuff is now removed (finally). Another parser change is that the commands that don't have a associated example projects attached to them, it'll automatically remove that section from the template. Which just stream lines the page a bit better. A little more to the point...
Download
DELETED
Installation
The file above is a zip of the HELP folder. To install this version either unzip, or drag the HELP folder from this over your existing one.
What's Next ?
Well, this version is a pretty reasonable step from the last version of the docs, but there's still a few things that i'd like to add. Mainly adding a tutorial section, as well as adding some (rough most likely) doc's for more of the standard libraries.
Blit Image Help
Still pottering away on the Help files, tonight's little session has seen the addition of the Blit Image library into the help.
More Help
Adding a few more libraries to the help, namely the clipboard and dialogs libraries. There's still a number of them to get done. Dunno if they'll make it in this revision or not.. Only a few more days allocated to this before testing the package..
Learning Edition V1.64L features Frame Sheet Anims V0.03
Been putting this library into the documentation over the past couple of editing sessions. Progress is moving a bit slower than i'd like, mainly due to the need to make more new examples for the functions as I go. Thankfully, most of them are fairly self explanatory, so some examples can double up. In terms of the help aspect, i'm about 90% of the way through adding the updated library to the doc's. Only a few commands left to document.
The new version of the library just includes a few extra functions and makes better use of some new compiler features found in PlayBasic V1.64. Such as optional parameters. Which is handy when loading a frame sheet, when you've no idea how many frames it contains. There's definitely a need for a tool to quickly throw frame sheets together though. If only I could find the source for PlayANIM.. I know i've got it... somewhere :)
Release On Schedule ?
Yes, this snap shot of the package will be released on the 24/25th of April 2010, regardless.
great job!!!
these features appear in the retail version???
Quote from: ATLUS on April 20, 2010, 04:14:21 PM
great job!!!
these features appear in the retail version???
What features are you talking about ?? Stuff like optional parameters is already in it.
Learning Edition Update Of AXIS DEMO
Given the release is only a couple of days away, my attention has turned to rounding out what's there rather than adding anything new at this late stage. While i've been over the example pack already, most of the game examples are a really outdated. So I've been quickly picking over some of the games code tweaking them up.
The current focus is the AXIS demo. This is one of the oldest PB examples and dates back some 4 years ago. While it's certainly not much of a game, all i've been doing is a quick tweak up the sprite modes to help clean up some of the visuals. Can't do much about the graphics as sadly it's one of those examples built from a collection of random bits of media. Anyway, the changes thus far are the addition of the sprite tinting and some sprite (bi linear) filtering. Which just helps it look a little more dynamic and smoother in places.
Testing PlayBASIC V1.64L Learning Edition Installer
At the time of writing, it's the morning of the 24th of April, which is release day ! - Yay! - Anyway, so last night I downed tools and started work on the the loooonnnnggggg and tedious process of the building the new installer. Ran into a few small issues, like the doc's builder was losing track of the some files when exporting the help. Ended up spending some quality time improving the builder again. Which appears to have solved the problem.
All in All the new installer, version seem to be working OK. It just needs a good picking over later in the day (after some sleep), can't foresee any major issues. So i'll certainly be appearing on the site sometime today. Which will mean this version is virtually 2 years newer than the current release. Which was built on the 20th, April,2008.. oh how time flies
PlayBASIC V1.64 Learning Edition Released ( April 24, 2010 )
Well, without much fanfare the new LE edition is available from the download page. There's a few things that I'm still not too happy about, but all in all it's certainly a progression from the old V1.63 based edition. Which was released about this time two years ago. An awful lot has changed since then..
What's New In V1.64 Learning Edition ?
Rather than type out a huge list of new features, why not take a bit of journey around the boards and see for yourself..
PlayBASIC V1.64k WIP Gallery (http://www.underwaredesign.com/forums/index.php?topic=3216.0)
PlayBASIC V1.63 -> PlayBASIC V1.64 Gallery (http://www.underwaredesign.com/forums/index.php?topic=2610.0)
Download
Download PlayBASIC V1.64L Learning Edition (http://playbasic.com/downloads.php)