New to GL Basic

Previous topic - Next topic

SilentMist

Hiya  =D, new to GL Basic, didn't hear about it until recently and it looks amazing, I can't believe I didn't find it until now as have spent last 6 years or so looking for a language that had proper basic like syntax and was up to the job of games.

Just a couple of questions to help settle a few worries I have.

:-  I know that there is a back buffer/swap screen ability within the language, but if you wanted to write an application or game with say 4 or 5 screens can you gain access/flip between them yourself? I was used to on an old computer being able to do say Screen 3: Display 2 and organize the swapping of the screen manually... is there any way to do this?

:- Can you read a pixel colour  from a loaded pic that acts as the background, for pixel perfect Lemmings/Worm type gaming, but more specifically, if using say 6 screens and flipping (for animated scenery purposes) would the pixel command be able to read from the current screen or merely from 1 fixed screen... really worried about this one.

:- Are there any commands for Amiga style coppers/rasters?  I know we have such a huge palette nowadays you could just have a background with a gradient, but I want to be able to either have moving/bouncing rasters and day/night transitions.

anyway, I'll leave it at that for now, don't want to ask too much yet. Looking forward to playing everyones games and seeing what GLBasic is capable of :D





PeeJay

Okie dokie, let's take these one step at a time ....

1) You can use separate screens (see CREATESCREEN), but, to be honest, there is no need - GL Basic is that fast at drawing, it shouldn't be necessary to predraw screens. If you want, say, 4 totally different screens, I'd be tempted to put each drawing system in it's own function, and then call that function as and when you want it.

2) You can grab an RGB pixel from the backbuffer only - but there is nothing stopping you from drawing to the backbuffer, grabbing your pixel, then redrawing the backbuffer, and then FLIPping the backbuffer into view - GL Basic is easily fast enough for that. However, and this is a biggie - do NOT rely on GETPIXEL to be 100% accurate - especially given that different people will be running their desktops at different colour depths.

3) There is no single command for Amiga style copper bars, but since this effect is very easy to achieve manually, there's not that much point, really!

Welcome to GL Basic - once you start playing around, you'll be hooked - and there's always people around on here for help and advice .....
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Kitty Hello

Amiga Copper lines can be done with a simple loop and DRAWRECT. GLBasic graphics are fast.
YouTube for "WizSticks", to see how I did that on a Wiz.