NEWS ARTICLES


PlayBASIC Devlog Primitive Drawing Tests, Collision Updates and Documentation

PlayBASIC Devlog – Primitive Drawing Tests, Collision Updates & Documentation

Welcome back, PlayBASIC coders!

In this devlog, we're continuing the gradual process of replacing parts of the original PlayBASIC command sets with newer implementations from the PlayBASIC 2 development work. This time, we're looking at primitive drawing functions, comparing performance against the built-in commands, testing some replacement world collision code, and working through the ongoing documentation updates.

The early benchmarks are interesting. Some of the replacement drawing commands are already showing performance improvements, with dot drawing running almost twice as fast in certain tests. Interestingly, the actual drawing code hasn't changed in those cases — the difference comes from how the runtime dispatches commands and calls the underlying functions.

We also take a look at sticky collision testing, comparing the existing implementation with the replacement code while thousands of objects bounce around a test world. There are still some collision quirks to iron out, but the replacement is showing improvements.

On the documentation front, I'm filling in missing command descriptions, adding examples, updating tutorials, and removing references to obsolete technologies. It's not the most glamorous part of development, but it's necessary work if we're going to get the next free edition of PlayBASIC out the door.

There's also a closer look at how the original runtime handles command calls, why some small built-in functions can actually be slower than their replacements, and how these findings feed into the design of the next-generation runtime.

Progress isn't always about adding new features. Sometimes it's about pulling apart the old machinery, understanding where the overhead comes from, and making the next version a little better.

Thanks for watching, and I'll see you in the next devlog!



#PlayBASIC #GameDevelopment #BASIC #Programming #IndieDev #PlayBASIC2

PlayBASIC Devlog Worlds Sliding Collision and Transition To PlayBASIC2

In this PlayBASIC devlog, I'm continuing work on the World command set, including recreating the existing sliding collision system and looking at how its internals can be improved.

The red ball in the demo shows the replacement collision code running alongside the original implementation. It's a useful way to compare the two, expose their limitations, and work through the awkward cases where multiple walls influence an object's movement. Most of the World functionality has now been replicated, with sticky collision still on the to-do list.

But this work is about more than replacing an old command set. It leads into a bigger discussion about the future of PlayBASIC, the current 1.65 development branch, and the road towards PlayBASIC 2.

Rather than attempting another huge rewrite where the compiler, runtime and command sets all change at once, the plan is to migrate PlayBASIC one subsystem at a time. This gives us the opportunity to keep a working foundation, test each replacement properly, and gradually remove the old DirectDraw dependencies without needlessly breaking the existing language.

I also talk about the new platform-independent display system, the Scene Buffer, legacy font commands, and why some of PlayBASIC's older graphics architecture needs a rethink. There's a look at asynchronous rendering too, including how background work can help keep classic 2D graphics running efficiently.

The goal is simple: small steps of migration rather than massive steps of innovation.




PlayBASIC v1.65C3 Beta #92 Released


There's been quite a bit happening behind the scenes in PlayBASIC over the last few months.

While the individual beta releases haven't always looked particularly dramatic from the outside, Beta 80 through to Beta 92 represent a fairly substantial amount of work under the hood — particularly around the rendering and 3D side of PlayBASIC.

So, rather than simply listing the changes in Beta 92, it's probably worth taking a look at what has been happening across the last dozen or so revisions.

A lot more work on 3D

The biggest area of development has been the **Vertex Object** system.

Vertex Objects have been expanded considerably, with new support for:

* Vertex batching
* Improved clipping
* Vertex lighting
* Ambient lighting
* Fog
* Mesh generation
* Simple primitive meshes
* OBJ and MD2 mesh loading

New libraries have also been added to make working with meshes easier, including VertexObjectMeshes for creating simple primitives and VertexObjectLoader for loading basic OBJ and MD2 models.

This is still very much PlayBASIC's flavour of 3D — lightweight, accessible and intended to be useful from BASIC rather than attempting to turn PlayBASIC into something it isn't.

But underneath that simple interface, the rendering system is becoming considerably more capable.

TranslateMeshToScene gets rebuilt

A large part of this work centred around `TranslateMeshToScene()`.

Rather than continuing to patch the existing implementation, much of the routine has now been replaced.

The new implementation includes its own clipping system, texture surface caching and polygon subdivision, with support for both triangle and quad modes.

It also gained support for:

* Point sprites
* Wireframe rendering
* Frame writing/capture
* Gouraud support for point sprites
* Custom surface types for mesh capturing

The polygon capture system used by `TranslateMeshToScene()` was also replaced as part of this work.

This has been one of those pieces of development where the visible feature list doesn't really tell the whole story. A lot of the work has been about replacing the machinery underneath the existing commands so that it has a better foundation to build on.

More control over projection

Beta 83/84 also introduced the new camera projection origin commands:

PlayBASIC Code:
CameraProjectionOrigin CameraIndex, Xpos, Ypos

Xpos = GetCameraProjectionOriginX(CameraIndex)
Ypos = GetCameraProjectionOriginY(CameraIndex)
COMMANDS USED:


These provide direct control over where the camera's projection originates, giving a little more flexibility when working with the rendering system.

Making the renderer harder to break

Alongside the new features, there has also been quite a bit of work on the less glamorous side of rendering: finding the strange cases that make graphics code fall over.

There have been fixes for things such as:

* Polygon fillers underflowing on extremely small polygons.
* Gouraud polygon spans overlapping their final pixels.
* Polygon subdivision encountering a zero Z value during projection.
* Integer `MOD()` crashing when dividing by zero.
* Typed array parameter matching becoming stuck when supplied with an invalid type.

These aren't necessarily bugs you're going to encounter while drawing a box on screen, but they're exactly the sort of edge cases that tend to show up when you start pushing the renderer harder.

A new line clipper

The latest work in Beta 91/92 also introduces a new line clipping implementation behind the line drawing functions.

This is now being used by:

PlayBASIC Code:
LINE
LINEC
LineIntersectRect()
COMMANDS USED: LINE | LINEC | LINEINTERSECTRECT |


Early testing has shown the new implementation to be considerably more stable, particularly for `LineIntersectRect()`.

There was also a fix for a particularly nasty Sprite Debug rendering case where an offset sprite handle could result in a shape being rendered incorrectly outside the expected clipping conditions — and, in some circumstances, cause a runtime crash.

Replacing some of the older infrastructure

Not everything has been about rendering.

Beta 90 replaced the PlayUFF library and the PlayMapperClassic loader, continuing the gradual process of replacing some of the older supporting infrastructure around PlayBASIC.

There's also been plenty of testing and general cleanup happening alongside the larger changes.

So, what's actually changed?

Quite a lot, really.

The last few months have been less about adding a long list of isolated BASIC commands and more about strengthening the machinery underneath PlayBASIC.

The 3D side has received the biggest push, with the Vertex Object system gaining lighting, fog, clipping, batching, mesh generation and model loading, while the underlying mesh rendering and polygon processing code has been substantially reworked.

And that's really what Beta 92 represents.

It's not a new 3D engine suddenly appearing overnight. It's PlayBASIC's existing rendering system being progressively rebuilt and extended, one piece at a time.

There's still plenty more to do, but the foundations are considerably more interesting than they were a few months ago.

Website Updates & Repairs

Website Updates & Repairs

We're making some repairs and style changes to the site:

Fixed PRODUCT download pages (Retail / Updates / Betas)

you can,

     - now download the latest editions directly from your account
     - Layout updates (condensed text on blogs)
     - New product banners

A few navigation issues remain, but the site is gradually becoming easier to use. Thanks for your patience!

PlayMAPPER Classic V1.19

PlayMAPPER Classic V1.18/V1.19

PlayMAPPER Classic V1.18 is another pass at bringing the classic map editor up to date with the current PlayBASIC environment.

This update is largely focused on usability and refinement rather than adding a huge collection of new features. The block palette is now resizable, making it much more practical when working with tilesets arranged in different layouts. The screen-mode dialog has also been updated with a selection of common presets as well as a custom resolution option.

The editor's cut-and-paste selection has been updated, allowing map regions to be copied and pasted as temporary brushes, while the existing brush and undo systems remain in place.

There's also been a collection of smaller GUI improvements, including new custom anti-aliased controls, direction arrows and a transparency indicator. These graphics are generated by the GUI library itself rather than relying on text characters.

The video also takes a look at some of the ideas that could make PlayMAPPER more useful as part of a game-development workflow — including entity placement, spawn points, trigger layers and using additional map layers to describe things such as player starts, pickups and other game events.

Later on, I dig into some of the code behind the GUI changes, including the pixel filtering used to create the anti-aliased controls, drawing icons from geometric shapes, surface pixel access, and some of the limitations of the older GUI code.

There are also a few thoughts on possible future improvements to the editor and GUI system, including better level navigation, more flexible control storage and cleaning up some of the older global state.

Overall, V1.18 is about bringing PlayMAPPER Classic a little closer to the current PlayBASIC experience. It's not intended to turn the classic editor into a completely new application — just to make the existing tool more usable, consistent and practical.