NEWS ARTICLES


PlayBASIC DevBlog Battle testing Ray Intersect World

In this video, I walk through the implementation and results of a replacement ray casting engine for the `RayIntersectWorld` commands in PlayBASIC.

After a frustrating week of debugging, this update addresses long-standing issues where certain rays could intermittently *leak through walls*, causing missed intersections and visible world errors. While perfect accuracy in ray traversal remains a tradeoff against performance, this new implementation significantly reduces ray misses while maintaining practical real-time speed.

The core change is an improved method for traversing rays across the underlying tile-based world map. The previous shared traversal logic, while faster, introduced subtle edge cases—particularly around floating-point rounding and tile boundary overlap—that caused unreliable intersections in some scenarios. The new approach more carefully steps rays through tile boundaries, accounting for cases where multiple tiles must be evaluated even during very brief crossings.

The demo shown runs at roughly 10 to 20 FPS faster with characters active in the world, demonstrating a better balance between accuracy and performance. While edge cases can still exist (especially when pushing precision), the new system greatly improves consistency and robustness over the previous caster.




Along the way, I also touch on:

* Why fully eliminating ray leaks is extremely difficult in practice
* The inherent accuracy vs. speed tradeoff in ray-based world queries
* How this work feeds back into a shared mapping library, enabling future optimizations elsewhere in the engine

Overall, this update stabilizes `RayIntersectWorld`, reduces visual artifacts, and lays the groundwork for further performance gains across PlayBASIC’s world and mapping systems.

#PlayBASIC #RayCasting #RayIntersectWorld #GameEngineDevelopment
#GameDev #IndieGameDev #TileBasedWorld #CollisionDetection #RayTraversal
#EngineProgramming #GameProgramming #2DGameEngine
#PerformanceOptimization #FloatingPointErrors #Devlog

PlayBASIC Development Program A Look Back at the Last Year




PlayBASIC Development Program – A Look Back at the Last Year


Hello everyone,

As the year wraps up, I wanted to take a moment to reflect on the PlayBASIC development program over the past year and share some context around what’s been built, explored, and learned.

This year has been very hands-on — driven by technical demos, experimentation, and using real projects to push the language, libraries, and tools forward.




🧪 A Strong Focus on Tech Demos

A major theme throughout the year was building practical, visual demos that explore specific techniques while also stress-testing PlayBASIC itself. These demos weren’t just about the end result — they were about understanding how and why things work.

Here’s a snapshot of some of the demo threads from this year:




🎮 Rendering, Effects & Visual Techniques

TheGameCreators Banner Animation Rendering Code (TGC)
(https://www.underwaredesign.com/forums/index.php?topic=4832.0

Jelly Sinus Terrain – How It Works (Step-by-Step Guide)
(https://www.underwaredesign.com/forums/index.php?topic=4855.0

Plasma Scrolling / Tile Map Examples
(https://www.underwaredesign.com/forums/index.php?topic=4879.0

Parallax Sunset Terrain Demo (PlayBASIC Example)
(https://www.underwaredesign.com/forums/index.php?topic=4899.0

These demos focused on classic real-time effects, clarity of implementation, and breaking techniques down in a way that’s approachable and reusable.




🧱 PolyWOLF & Software Shadows

- PolyWOLF Engine (mid-year)
(https://www.underwaredesign.com/forums/index.php?topic=4852.0

- Shadow Casting Demo – PlayBASIC Source Code
(https://www.underwaredesign.com/forums/index.php?topic=4861.0

PolyWOLF was a major highlight of the year — pushing into software-based 3D rendering with real-time software shadows. This work explored not just rendering, but the structure, performance costs, and trade-offs involved when everything is done on the CPU.

The shadow-casting demos grew directly out of this work and helped refine the math, visibility testing, and scene logic used later in the year.




🔦 Ray Tracing & Math Libraries (Late Year)

- Simple Ray Tracer (2nd Dec 2025)
(https://www.underwaredesign.com/forums/index.php?topic=4911.0)

Later in the year, the focus shifted toward real ray tracing demos, supported by the addition and refinement of new math libraries. These demos covered ray casting, intersections, camera control, and shadow rays — and served as real-world validation for the math and vector code being developed.




🎄 Seasonal & Creative Demos

- Christmas Tree Demo
(https://www.underwaredesign.com/forums/index.php?topic=4916.0)


Not everything needs to be serious — this was a fun, visual demo to wrap up the year, but still built using the same principles of clarity, structure, and reusable code.




🧠 Why This Matters

While many of these projects look experimental on the surface, they play an important role in shaping PlayBASIC’s future:

- They expose real performance and API issues
- They guide the design of math and intersection libraries
- They generate concrete, educational examples
- They keep PlayBASIC grounded in real use cases


This year was very much about building foundations through doing, rather than adding features in isolation.




🚀 Looking Forward

With a solid set of demos, improved math libraries, and a clearer understanding of where things work well (and where they can improve), the focus moving forward can shift toward refinement, consolidation, and making these techniques more accessible to everyday PlayBASIC projects.




❤️ Thanks

Thanks to everyone who followed the threads, tested code, gave feedback, or simply stayed engaged. PlayBASIC has always been about experimentation, creativity, and learning by doing — and that’s exactly what this year has been about.

More to come.

Kevin!

PlayBASIC End of Year Round Up




Welcome back, PlayBASIC coders 👋
This video is an end-of-year wrap-up covering what’s been happening inside PlayBASIC over the past several months — from new math libraries and ray tracing experiments, to documentation improvements, performance work, and a look at where things are heading next.

We kick things off with a small festive tech demo (a procedural “Christmas tree” built from math), then dive straight into one of the biggest ongoing areas of work: *software ray tracing*. You’ll see the classic ray tracing approach, followed by a newer *Potential Visibility Set (PVS)* optimization that dramatically reduces unnecessary intersection tests — making scenes with hundreds of objects and shadows actually usable in real time.

From there, the focus shifts to the growing *math and geometry libraries* inside PlayBASIC:

* Vector and matrix libraries
* Ray, sphere, box, plane, and triangle intersections
* Shared intersection result structures
* Practical use cases like lighting, collision detection, UV coordinates, and spatial reasoning

A big theme throughout the video is **preparing PlayBASIC users for 3D concepts** — even before full 3D rendering arrives. Understanding vectors, matrices, intersections, and geometry isn’t optional if you want to move forward, and these libraries are designed to ease that transition.

There’s also a candid look at the current state of **documentation** — what’s been added, what still needs cleanup, and why concept-level documentation matters just as much as tutorials.

Later in the video, we explore:

* Improvements to map systems and memory allocation
* Ink modes, blending, and alpha support
* Why certain older commands behave differently now
* Ideas for future 2D and 3D rendering features
* Why mesh libraries are a critical missing piece
* A look back at older software-rendered demos and what they teach us

This isn’t a hype video — it’s an honest, technical walkthrough of what’s been built, what works, what still needs work, and how all of it feeds into the long-term direction of PlayBASIC.


PlayBASIC Math Libraries Early Preview

PlayBASIC Math Libraries – Early Preview




New core math features originally planned for PlayBASIC 2 have been pulled forward and are now nearing completion.




This gallery entry showcases recent work on a set of new PlayBASIC libraries focused on **math, geometry, and data handling**. These additions include a **Vector3 library**, a **Matrix library**, and an **Intersection library** designed to handle common geometric tests such as ray–sphere and ray–plane intersections.

These features were originally scheduled for PlayBASIC 2, but development realities made it clear they needed to be finished sooner. Rather than delay everything, the decision was made to bring them forward and integrate them properly into the current runtime.

A large part of this work involved solving long-standing issues with **floating-point accuracy**, particularly when comparing values during intersection tests. Floating point math is notoriously imprecise, and careless comparisons can easily lead to incorrect or unstable results.




Pointer-Based Structures

One of the key enabling changes behind these libraries is updated support for **typed pointers**. PlayBASIC can now safely:

• Declare pointers to specific types
• Allocate and assign structure data
• Copy entire structures from right to left
• Clear structure fields by zero-assignment
• Use raw memory pointers (including arrays) as data sources

This functionality was either broken or unavailable during much of the long transition from version 1.64 to 1.65, and several hard-to-track crashes have now been fully resolved.




Why This Matters

These changes allow PlayBASIC code to be:

• Cleaner
• Safer
• More expressive
• Closer to modern programming styles

They also explain why recent updates were made to the `linkdll` system — these libraries depend on passing and manipulating structured data through pointers, something older versions simply couldn’t do reliably.




Looking Ahead

In PlayBASIC 2, vectors will become far more natural to use — almost as utilitarian as integers and floats. This opens the door for cleaner syntax, multiple-value assignments, and fewer lines of boilerplate code overall.

The goal remains the same:
Keep PlayBASIC simple, powerful, and fun — while letting retro languages do increasingly crazy things.




More updates soon.




How a generation of kids kick started to the video games industry

Remember when a whole generation of kids kick-started the games industry by digging through 8-bit hardware manuals?

I do.

Back then, we made things simply because coding was how you made things.

Nobody cared how it looked on a CV. Nobody waited for permission, or worried about “best practices” or “the perfect engine.” We experimented. We shared ideas. We read magazines (ask your parents what a magazine is!). We broke things and fixed them. We layered idea upon idea until the impossible suddenly wasn’t.

People called it talent.

It wasn’t.

It was curiosity, consistency, and a methodical approach to building skills.

Today? We’re drowning in information. Thousands of tutorials, hundreds of languages, endless opinions echoing in your head: Do this. Don’t do that. You must learn this first. No, learn that.
It’s no wonder beginners freeze before they even start.

But here’s the truth:


If you want to learn to code, pick a language — any language — and give it a shot.

The specific language matters far less than people claim.
Once you understand the basics in one, those skills transfer. Moving to another becomes easier. Concepts repeat. Patterns reappear. You build momentum.

Start small.

Be proud of the little victories.

And if your first attempt doesn’t stick? That’s normal. Try again later. You’ll be surprised how much your brain held onto.


Where you start isn’t where you’ll finish — and that’s the whole point.

Just keep going!



#LearnToCode #CodingJourney #ProgrammingMotivation #GameDevBeginners #CodeNewbies #StartCoding #KeepCoding #ProgrammingLife #RetroCoding #OldSchoolComputing #IndieDevLife #GameDevCommunity #SoftwareDevelopment #DeveloperMindset #ProgrammingBasics #CodingTips #CodeEveryday #STEMEducation #TechInspiration #GamedevHistory #8bitComputing #CreativeCoding #BuildInPublic #FutureDevelopers