New demo uploaded: Assembly Vector Graphics Demo

All aspects of programming on the Commander X16.
Post Reply
gavinhaslehurst
Posts: 47
Joined: Thu Jan 07, 2021 11:37 am

New demo uploaded: Assembly Vector Graphics Demo

Post by gavinhaslehurst »




Assembly Vector Graphics Demo




View File






This is a quick demo of a 2D graphics library I've been working on recently. It's written in assembler, and aims to make life a bit easier when it comes to drawing vector graphics. You can define individual polygons which can be moved about and rotated. The source code looks fairly daunting, but when it comes down to it, building, transforming and rendering the polygons is very straightforward. Hopefully this will form the basis of a game at some point soon. (Perhaps an Asteroids clone?) Once I sink my teeth into interrupt handling, I should be able to "vsync" everything so it's flicker-free. 

All comments and suggestions welcome! 

Short screen capture of this demo on YouTube (featuring my tunez!!): 

Commander X16 Demo - Vector Graphics in 6502 Assembly - YouTube

WARNING: For those who are sensitive to flickering/strobing, please be aware that this may cause problems for you. 

--

See below for a quick preview of the game I'm working on, retro flickering and all! 

Desktop 2021.02.07 - 20.15.07.01.gif






 
Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

New demo uploaded: Assembly Vector Graphics Demo

Post by Ender »


This is pretty neat! Just curious, is this much different from screen 128 mode?  Is it doing a similar thing where the resolution is 320x200?

gavinhaslehurst
Posts: 47
Joined: Thu Jan 07, 2021 11:37 am

New demo uploaded: Assembly Vector Graphics Demo

Post by gavinhaslehurst »



11 hours ago, Ender said:




This is pretty neat! Just curious, is this much different from screen 128 mode?  Is it doing a similar thing where the resolution is 320x200?



I'll be honest, I didn't know there was a screen 120 mode!  I'll look it up!  This is mode 80. 

Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

New demo uploaded: Assembly Vector Graphics Demo

Post by Ender »


Screen 128 mode ($80) is a bitmap mode where you can do various BASIC drawing commands that have been added in the X16.  You can also call them from assembly.  It has a lot of 2D drawing functions similar to yours such as drawing lines, rectangles, text, images, etc.

gavinhaslehurst
Posts: 47
Joined: Thu Jan 07, 2021 11:37 am

New demo uploaded: Assembly Vector Graphics Demo

Post by gavinhaslehurst »



4 minutes ago, Ender said:




Screen 128 mode ($80) is a bitmap mode where you can do various BASIC drawing commands that have been added in the X16.  You can also call them from assembly.  It has a lot of 2D drawing functions similar to yours such as drawing lines, rectangles, text, images, etc.



Ah, gotcha. Yeah I'm referencing some of those in my code. But the transformation stuff is all from scratch. 

Post Reply