Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - fuzzy70

Came across this while searching for a 3D model viewer. Unlike a lot of the search results I got back this one is recent (updated in last couple of months), free open sourced & can export also. Opens a lot of diff formats as it's based on the Open Asset Import Library (assimp) as well.


Have fun

iOS 8 is not far away either & depending on how far Apple push their new Swift language that might cause all kinds of problems for GLB (including another xcode).

I think the topic title is quite apt as he does mention Gernot's presence has been sparse of late.

Hi All, I have some questions with regards to the Windows RT tablets.

I will be taking my Dad & Stepmum shopping the day after Boxing Day to buy a new laptop to replace their 8yr old one & have just learned they want to buy a tablet as well when out & about. The most important thing to keep in mind is neither of them are in any way technology minded, in fact more technophobic than anything else  :D

Basically they use the laptop for email, Facebook, eBay & general browsing like booking holidays etc (& writing the very occasional letter). I have very little Windows 8 knowledge as I follow the "If it ain't broke don't play with it rule" & Win8 offers me nothing I class as needed nor any of my apps require it, besides if it delays the hassle of re-installing all my apps etc then my current Win7 (which works perfectly) is more than good enough.

However the "Simpleness" so to speak of Win8 I think will do well for them & I presume the look & feel of the tablet is near enough the same as the desktop OS. So of anybody has any experience of both of these your comments/help would be useful.

  • Are the main OS & tablet versions pretty much the same in regards to usage?
  • Is transferring pictures etc between the two made more simple due to them both being Win8 based?
The above are the 2 most important questions I have & any help would be appreciated.

I will go Android if need be but seeing as neither of them have any Android experience I don't want to confuse or make things more difficult for them if possible.

For those interested in the specs of the Tablet it has the following

  • NVIDIA Tegra T30 processor (1.4 GHz, quad-core)
  • 32GB Storage
  • 2GB RAM
  • 10.6 inch screen
  • 5 point Multitouch


Off Topic / Useful DEV site
Stumbled across by accident from clicking on a link from another site I visit often

Has lots of tips regarding maths (vectors/bezier etc), using perlin noise in games, colour palettes etc. While none of it is GLBasic obviously the explanations are pretty clear. It used to be distributed as a PDF magazine before being web based but you can download all the 29 issues that where pdf's  :good:

I'm messing about with POLYVECTORS again & my question is about MODE 2 STRIP (incorrectly doubled up as MODE 1 with triangles for as long as I can remember in the help file hint hint lol).

I won't say exactly what I am doing as have a few ideas floating around but can give an example of what I mean.

Imagine say I wanted to show a 6 digit score and all my 0-9 digits are on a simple texture map, getting the texture co-ords for each digit is straight forward enough & that I understand no problem. However because each digit is effectively a quad, after plotting the 1st POLYVECTOR with 4 points the next one shares the previous ones last 2 points which throws the texture co-ords out of sync.

Currently I am using POLYNEWSTRIP after each quad is plotted to basically reset the texture co-ords & draw subsequent POLY's. Basically I'm just after confirmation that I am doing it the right way & not misunderstanding the STRIP mode. If I am then what practical uses are there for STRIP mode using triangles?.

Please don't think I am being ignorant, it's just me wanting a better understanding of that mode using triangles & it's usage with regards to textures as my brain is not seeing it  :D.

Off Topic / PixiTracker
For those of you who have heard of or used SunVox (of which there is a simple wrapper for somewhere in the forum) & also those of you that haven't, the creators website has a host of other goodies which are great fun & also useful.

One of which is PixiTracker(, a very simple tracker that comes in 2 versions (16bit HQ Audio  & 1bit Old computer style audio). I have only played with the Windows one but versions are available for Linux/Mac/iOS/Android. Basically it's a no frills/no fuss tracker that come with quite a few sounds & to me is just perfect for retro style tunes.

The other stuff on the site includes various soft synths which are pretty much unique in my eyes & obviously SunVox. All that I looked at had a video or few showing what each one does & I have linked the 1bit PixiTracker below.

Go visit & have some fun  :D :D

A friend of mine just sent me this link where you can buy a bundle of games cheap.

  • The Bundle consists of
  • Dead Space™
  • Burnout™ Paradise: The Ultimate Box
  • Crysis® 2 Maximum Edition
  • Mirror's Edge™
  • Dead Space™ 3
  • Medal of Honor™
If you pay more than the average donation of $4.91 (currently) then you also get the following games

  • C&C™: Red Alert™ 3 - Uprising
  • Battlefield 3™
  • Populous™
  • The Sims™ 3 + Starter Pack

It seems a legit offer with the money going to charity so I thought I would pass the info on, but hurry as there is only 2 days left from the date of this message.

In the next week I will be buying a new phone to finally replace my ageing HTC Wildfire which has given me solid service for the last 2-3 years  =D

I have the choice of any phone currently on the market & will stick with the Android platform due to quite a few app purchases plus the ability to develop/play around with GLB on it. An iPhone 5 did cross my mind briefly but cannot warrant or justify buying a Mac along with the Apple dev fee etc for developing plus like I said I have the required apps for my needs purchased from the play store.

After browsing online & popping into a shop to look at devices I have narrowed it down to 3 phones, An HTC One, Galaxy S4 & Xperia Z. Out of the 3 the Sony & HTC felt more solid/robust in the hand compared to the S4 which felt cheap & flimsy in some ways, no doubt it is a high quality plastic that is very durable but I'm just going on 1st impressions. I did like the quality of the display along with the hardware buttons on the S4 though which took my mind away from the feel a bit.

So my question is this. I would appreciate any comments from anyone on the above 3 phones as to what they are like to use on a day to day basis, for example any annoying quirks or anything they do which makes you think "I'm glad I got this one because ...". Obviously I could only mess around with each one briefly in the shop & all 3 are more than powerful enough for my needs.

BTW I am not interested in how the camera part performs as I have a digital SLR & no matter how much manufactures claim 13 MP etc etc a tiny little lens on a phone cannot compete with a real camera  :D


Just a quick thing I knocked up purely out of curiosity, some may find it useful  :D

Simple to use with just a call to make_scanlines function with the sprite id you want to use then a call to draw_scanlines immediately before showscreen, although you can call it at a different time for strange effects.

Play around with the alphamode and/or the INTEGER(0xff000000) to alter the effect.

Works best with 2x2 blocky gfx (or normal gfx scaled x2).

Because the mem2sprite part is only dealing with a 1 pixel wide sprite it should be easily modified to provide a shutter like fade effect seen a lot in the 8bit days without to much trouble. Have a play around & see what you can come up with  =D


Code (glbasic) Select

// --------------------------------- //
// Project: Scanlines
// Start: Saturday, August 03, 2013
// IDE Version: 10.283

SETCURRENTDIR("Media") // go to media files

GLOBAL showlines%=FALSE,line_sprite%=1
GLOBAL sw%,sh%



LOADSPRITE "Test1.png",0




IF KEY(2)=TRUE THEN showlines%=TRUE // Press "1" to show scanlines
IF KEY(3)=TRUE THEN showlines%=FALSE // Press "2" to hide scanlines

IF showlines%=TRUE THEN draw_scanlines(line_sprite%)



FUNCTION make_scanlines: spr_id%

LOCAL pix%[],loop%

DIM pix%[sh%]

FOR loop%=0 TO sh%-1 STEP 2



FUNCTION draw_scanlines: spr_id%


POLYVECTOR     0,    0,0,    0,RGB(255,255,255)
POLYVECTOR     0,sh%-1,0,sh%-1,RGB(255,255,255)
POLYVECTOR sw%-1,sh%-1,0,sh%-1,RGB(255,255,255)
POLYVECTOR sw%-1,    0,0,    0,RGB(255,255,255)


Off Topic / Google fonts
Found this by accident  :D

You can select the fonts you like into collections & download them as a zip at

Or you can download the entire collection (around 2.5GB & 651 fonts) using mercurial at
Instructions on how to download via mercurial is provided in the above link for Windows/Mac/Linux etc

Most have an open license but the download includes the relevant license in the zip file so you know where you stand with the font.

The answer to this is probably easy & obvious but it is eluding me at the moment & driving me nuts  :D

I am modifying my fastflood fill routine to make it easier to fill a part of the screen or a sprite & also some optimisations (not to the fill routine itself as that's pretty much maxed as I can get it). When doing a fill on a screen it grabs the entire screen with SPRITE2MEM, does the fill then dumps the entire array back to a sprite. Writing the entire array back then calling MEM2SPRITE is far from optimal if say the area that has been filled is only small (say 50x70 pixels) as the bigger the array the longer MEM2SPRITE takes.

My solution is to copy only the modified area to a new sprite with an ID created with GENSPRITE hence making the call to MEM2SPRITE faster when dealing with smaller areas.

Once the sprite has been drawn how do I delete it from memory otherwise every call to the routine will create a new sprite & end up with loads of basically dead & useless sprites taking up memory. I don't really want 1 sprite left in memory after the routine is called as even that sprite is not needed once it has been drawn.


Just a quick question.

Does anyone else here use the Tapatalk android app for reading this forum & if so do they have problems with it replacing some characters with smilies?, mainly with code that's been posted within a codeblock.

I just wanted to check if it's just my phone or a problem the app has with this forum. If anyone does have they same problem have they reported it to the developer & if not I will send them a post.


I have just updated/cleaned up my Amiga font converter so it is now just 1 extended type & now can load Amiga colourfonts. The way that the Amiga stores it's characters in the font means that there is a generic character graphic for characters that are not used in the font (see attached).

I could iterate through every character & do a pixel-to-pixel check but that seems a long winded way of doing it, along with not being very efficient. There must be a better way but for some strange reason I can't think of one at the moment   :D.

Any ideas would be welcomed.

Math / Number Base convertor
Like it says in the title, A converter for different number bases ranging from base 2 to base 36.

Enjoy  =D


p.s if you use this example I seriously recommend you create a font to view the results, unless eyestrain/headache are your thing  :P
Code (glbasic) Select

LOADFONT "smalfont.png",0


LOCAL num$,loop%

FOR loop=1 TO 20
PRINT "Base="+loop,0,loop*17,1
PRINT "Result="+num$,100,loop*17,1




FUNCTION Base_convert$: number$,frombase%,tobase%

LOCAL loop%,value%,temp%,result$

IF frombase < 2 OR frombase > 36 OR tobase% < 2 OR tobase% > 36 THEN RETURN number$
FOR loop = 1 TO LEN(number$)
value = INSTR(charset$, MID$(number$, loop-1, 1))
IF value < 0 OR value >= frombase THEN RETURN
temp = temp + value * POW(frombase,(LEN(number$) - loop))

IF temp < 0 THEN RETURN number$

result$ = ""

value = MOD(temp,tobase)
temp = FLOOR(temp / tobase)
result$ = MID$(charset$, value , 1) + result$
UNTIL temp <= 0

RETURN result$


// Uncomment for GLBasic V10
//FUNCTION Floor%: value%
This is a bit of a hack to be honest (although it does work) & until I sort out a cleaner method it will do :D

BTW this has been written & tested on Windows 7 only, I have none of the other Windows OS'es available at this time to test it.

Code (glbasic) Select

TYPE Twin_drive

FUNCTION Get_drives:
LOCAL script$="dscript"
LOCAL output$="drives.txt"
LOCAL old_dir$
LOCAL command$="diskpart /s dscript > drives.txt"

old_dir$=GETCURRENTDIR$() // Store the current dir so we can go back when done

WRITELINE 1,"list volume"
SHELLCMD("CMD /C diskpart /s dscript > drives.txt",TRUE,FALSE,rv)

IF DOESFILEEXIST(output$) THEN Process_output(output$)



FUNCTION Process_output: file$

LOCAL line$



READLINE 1,line$
IF INSTR(line$,"----------")<>-1 THEN BREAK // Find the start of the drive info



READLINE 1,line$

DIMPUSH self.drive_letter$[], MID$(line$,15,1)
DIMPUSH self.label$[],        MID$(line$,19,10)
DIMPUSH self.file_system$[],  MID$(line$,32,5)
DIMPUSH self.drive_type$[],   MID$(line$,39,10)



FUNCTION Clean_up: dir$
KILLFILE "dscript"
KILLFILE "drives.txt"
SETCURRENTDIR(dir$) // Go back to whence we came ;)

LOCAL disks AS Twin_drive


FOR d=0 TO BOUNDS(disks.drive_letter$[],0)-1
PRINT disks.drive_letter$[d],0,d*8
PRINT disks.label$[d],10,d*8
PRINT disks.file_system$[d],100,d*8
PRINT disks.drive_type$[d],150,d*8





Have found a way of accessing the drive letters from wrapping a function from the Windows kernel32.dll for those who have a full license . It only gives the drive letters at the moment (no types like disk/cd etc or filesystem) but it sure is cleaner  =D

Code (glbasic) Select

TYPE Kernel32


DECLARE_C_ALIAS(GetLogDrives, "kernel32.dll", "GetLogicalDrives",(void),int);

FUNCTION Get_Log_Drives:
return GetLogDrives();

FUNCTION Available_Drives:

LOCAL bittest% = 1
LOCAL loop%,bitcompare%,result%

result = self.Get_Log_Drives()
FOR loop = 0 TO 25

bitcompare = bAND(result,bittest)

IF bitcompare <> 0
DIMPUSH self.drive_letter$[],CHR$(loop+65)

bittest = ASL(bittest,1)




GLOBAL drives AS Kernel32

GLOBAL loop%,text$


FOR loop = 0 TO BOUNDS(drives.drive_letter$[],0)-1

text$ = "Drive " + drives.drive_letter$[loop] + ": = Found"

PRINT text$,0,loop*8



Like the title says is this possible?.

The reason for asking is that I am currently writing an app & the user may want to load a file that is stored on another partition.

The FILEREQUEST$ command works great & allows me to do it obviously but it does not work in debug mode.

At the moment I am copying files to the media directory for testing which works but would be handy if I could select anyone I wanted no matter what disk it is on.



Sent from my HTC Wildfire using Tapatalk 2

If anyone could help translating this small program to GLB I would be very grateful. All it does is read a dat file & saves it as a bitmap, I am not worried about it saving the bitmap as such as what I was trying to do was read it into an array & then MEM2SPRITE the array.

However my C coding is about on par as elephant running the Grand National & got nowhere fast. I even installed code::blocks & built SDL (not one of my most fun experiences I have to admit) & just got build errors trying to compile the included code.

So any help would be great  =D


Code (glbasic) Select

// gcc -Wall -g dat2bmp.c -o dat2bmp `sdl-config --cflags --libs`

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <limits.h>
#include <errno.h>
#include <string.h>

#include <SDL.h>

#define ERROR_PRINTF(...) { fprintf(stderr, "%s:%s:%u Error: ", __FILE__, __PRETTY_FUNCTION__, __LINE__); fprintf(stderr,__VA_ARGS__); fflush(stderr); }

int main(int argc, char** argv)
uint32_t *tmp = NULL;
const char *bmp = NULL;
const char *dat = NULL;
SDL_Surface * g = NULL;

if (argc < 3)
fprintf(stderr, "Usage: %s file.dat file.bmp\n", argv[0]);
return -1;

dat = argv[1];
bmp = argv[2];

f = fopen(dat, "rb");
if (!f)
ERROR_PRINTF("Unable to open file %s: %s", dat, strerror(errno));
return -1;

short w,h;
fread(&w, sizeof(w), 1, f);
fread(&h, sizeof(h), 1, f);

if (w>1500 || h>1500)
ERROR_PRINTF("Invalid file %s", dat);
return -1;

tmp = (uint32_t *)calloc((int) w * h, sizeof(uint32_t));

uint32_t c = 0;
uint32_t cnt = 0;
int p = 0;
for (p = 0; p < (int) w * h; p++)
if (cnt)
cnt -= 0x1;
fread(&c, sizeof(c), 1, f);
cnt = c >> 24;
if (cnt==255)
fread(&cnt, sizeof(cnt), 1, f);
tmp[p] = c | 0xff000000;

g = SDL_CreateRGBSurfaceFrom(tmp, w, h, 32, w*4,
0xff000000 );

if (SDL_SaveBMP(g, bmp) == -1)
ERROR_PRINTF("Unable to write BMP file %s: %s", bmp, strerror(errno));
return -1;

return 0;

I am having some weird problems with regards to GLBasic which only started the other day.

If I try to rebuild a program I get an error
Code (glbasic) Select
*** Configuration: WIN32 ***
GPC - GLBasic Precompiler V.10.104 SN:fed6c88c - 2D, WIN32
Wordcount:3 commands

Access is denied.

*** ERROR - Can't overwrite program. Is it still running?
*** Finished ***
Elapsed: 13.5 sec. Time: 10:06
Build: 0 succeeded.
*** 1 FAILED ***

This happens on new or old code & I can compile fine the straight after opening or starting a new project but as soon as I make a change (even minor like changing x=x+1 to x=x+2) the above error appears. I am able to rebuild after trying again around 1-2 mins later.

I have uninstalled & manually removed any references to GLBasic in the registry, done a complete virus scan (left running over night) & then re-installed. I have tried PureBasic, Blitz3D & BlitzMax along with other non programming apps & have no problems editing/modifying files with those just GLBasic ones.

Another thing I have noticed, when I do try to rebuild I look at the generated exe & the security tab says "You do not have permission to view or edit this object's permission settings" & the file deletes itself shortly after again around the 1-2min mark.

I have just managed to finally update from 10.202 to 10.283 after 20+ attempts and failing with an "Unable to update Editor_e.exe" error.

Wiping & re-installing windows is not really an option I would like to do if at all possible and seeing as I have only come across this problem with GLBasic as every other program is working fine.

As a note I did try the public beta but only compiled a few examples without doing any changes so not 100% sure when this problem appeared. I know it was within the last week or two as had no problems while messing about with the "Transparency Mask" program in the forum.

Other than the beta the only other downloads I have done was a graphics driver update, Notepad++ update as well as a couple of normal windows updates.

I honestly cannot see that the issue is with or came from GLBasic but at the moment that is the only program that seems to have been effected, I believe it is a windows problem but narrowing down what exactly is doing my head in seeing as everything else works fine.

Any suggestions would be appreciated =D


Has anybody come across any good sites etc with regards to using OpenGL from a 2D aspect & not 3D.

The main type of thing I would like to learn is vector graphics based games like Asteroids,GeometryWars etc as there is something I find aesthetically pleasing about that style. That and the fact that my pixeling skills are about as good as a 2 year old with crayons  :D.

The math side of things is not a problem as I know a fair bit & there is plenty of resources on that subject, but all my searches with regards to "2D" "Vector" & "OpenGL" just throw back 3D basics or just the maths & not using OpenGL for efficient 2D work.

This example uses OpenGL as you can also download the source but the C++ code just confuses me  :x.