BBC BASIC for Windows
« GFXLIB »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:41pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 ... 6 7 8  Notify Send Topic Print
 veryhotthread  Author  Topic: GFXLIB  (Read 2214 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: GFXLIB
« Reply #114 on: Jul 4th, 2010, 09:54am »

on Jul 3rd, 2010, 11:30pm, David Williams wrote:
Why would you want to press Alt+F4 (two keystrokes) to exit the program when you can simply press Space Bar?

  1. Because by that time I've forgotten that it said to press the Space Bar (if I ever noticed in the first place!).

  2. Because Alt+F4 is a standard way of quitting a program (there's a standard for a single-key exit too, but it's Esc not Space).

Quote:
The other reason is that this particular version of the program might not exit cleanly if you press Alt+F4

I'm surprised. Normally Windows does a good job of cleaning up after itself when quitting an executable (of course Alt+F4 might not work when running the program in the IDE, but I don't have the opportunity to do that!). But, as I said, in that case you should include ON CLOSE RETURN in your code, not rely on the user reading the instructions!

Richard.
« Last Edit: Jul 4th, 2010, 09:57am by admin » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #115 on: Jul 4th, 2010, 9:44pm »

on Jul 4th, 2010, 09:54am, Richard Russell wrote:
But, as I said, in that case you should include ON CLOSE RETURN in your code, not rely on the user reading the instructions!


Thanks.

If only I'd known about the ON CLOSE RETURN trick when I was making Alien Eliminator. smiley

The updated version of the flying pink worm demo (which has replaced the old) now ignores Alt+F4 and has the user exiting the program either by pressing Escape or by clicking a mouse button.


David.
User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #116 on: Jul 8th, 2010, 07:45am »

I'll be releasing an updated version (2.01) of GFXLIB on Friday (9th July),
but in the meantime here's a 'mini-game' which will be included in the
GFXLIB package. Not much of a game, admittedly, however the
source code is meant to be instructive:

http://www.bezu.co.uk/filesdump/temp/progs/cowboyshootout.zip (283 KB)

(The ZIP package only contains the compiled EXE, not the source.)
« Last Edit: Jan 18th, 2012, 5:01pm by David Williams » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #117 on: Jul 9th, 2010, 10:08pm »

GFXLIB version 2.01 has just been released:

http://www.bb4wgames.com/gfxlib/gfxlibpage.html


Happy game-making. grin



----------------------------------------------------
2.01 09-Jul-2010

- Most of GFXLIB routines have been modified to read
the dispVars.flags.paint& and dispVars.flags.flipY&
flags. A few routines remain, however, to be similarly
modified. This will be done in due course.

- Added new routine GetQuarticBezierCurvePoint, and
made some example programs for it.

- Made some example programs for GetQuadraticBezierCurvePoint.

- Added new routine PlotGetCumulativeAlphaBits and
ShapeGetCumulativeAlphaBits and wrote an example program
for each of them.

- PROCWait (as employed by PROCdisplay - you don't normally
call this subroutine directly yourself) now much more efficient.

- Added PROCFlipBmFont subroutine which vertically flips
all bitmap characters in a GFXLIB bitmap font definition
file.

- Re-introduced parameterless PROCInitGFXLIB call.
Calling simply PROCInitGFXLIB is equivalent to
PROCInitGFXLIB(dispVars{}, 0).

- Added new core routine: SetDispVars2

- Core routines now documented -
(see "Core GFXLIB routines.TXT").

- GFXLIB package now includes Michael Hutton's
GFXD3D9LIB.BBC (with some minor modifications by D.W.),
and wrote an example program for it.

- Modified some old GFXLIB demos to make use of GFXD3D9LIB
(see the DX9 subfolder in the GFXLIB_demos folder).

- Corrected or otherwise modified some of the GFXLIB
routine documentation. Still quite a bit of correcting and
modifying to do!

- Included a new mini-game "Cowboy Shootout" whose purpose,
apart from entertaining for a few seconds, is to demonstrate
the use of a number of GFXLIB routines.

- Several other minor changes here and there.
----------------------------------------------------
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: GFXLIB
« Reply #118 on: Jul 10th, 2010, 09:18am »

on Jul 8th, 2010, 07:45am, David Williams wrote:
the source code is meant to be instructive.... (The ZIP package only contains the compiled EXE, not the source.)

ROFL!

Richard.
« Last Edit: Jul 10th, 2010, 09:20am by admin » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #119 on: Jul 10th, 2010, 09:34am »

on Jul 10th, 2010, 09:18am, Richard Russell wrote:
ROFL!


If you insist.

I should have stated that the source program (for "Cowboy Shootout") comes with the GFXLIB package, whereas the ZIP folder (cowboyshootout.zip) contains only the compiled executable.

The GFXLIB package contains an updated (i.e. slightly better) version of Cowboy Shootout.
User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #120 on: Jul 14th, 2010, 01:38am »

I've been working on a new bitmap rotation routine for GFXLIB.

Despite still partially being in BASIC(!), this one is significantly faster than "my old one",
and yet it's still very far from optimal. In fact, until I can get my Sutherland-Hodgman polygon clipper
working properly, this routine will remain very inefficient.

Here's a preview:

http://www.bezu.co.uk/filesdump/temp/progs/bitmaprotator.zip


Use the left and right mouse buttons to zoom in and out.


David.
« Last Edit: Jan 18th, 2012, 5:00pm by David Williams » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #121 on: Jul 21st, 2010, 12:09am »

New routine (alpha-blend with master opacity control) as recently requested by a BB4W user who's developing a GFXLIB-based game.

Here's a quick demo of PlotAlphaBlend4:

http://www.bezu.co.uk/filesdump/temp/progs/plotalphablend4demo.zip

Notice the nice smooth sprite edges? Use the left/right arrow keys to decrease/increase the number of sprites.

This routine will be included in the next release (v2.02) of GFXLIB due out in a month or three.


David.
« Last Edit: Jan 18th, 2012, 5:00pm by David Williams » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: GFXLIB
« Reply #122 on: Jan 18th, 2012, 5:23pm »

NOTE: Most of the web links (URLs) in this thread (prior to this post) are no longer valid.


~ ~ ~


I have modified an old GFXLIB example program to display a rotating 3D toroidal ring donut:

http://www.bb4wgames.com/gfxlibdemos/progs/exe/donut.zip


I was 'inspired' by this little DarkBASIC demo (YouTube video):

"Oldschool Demo - Shaded vector balls"
http://www.youtube.com/watch?v=XUGHoqM7myk

EDIT (21/01/2012): Here's my attempt so far (using above YouTube video as a reference).
It only runs at half the 'optimum' frame rate on my laptop (30 fps instead of 60 fps):

http://www.bb4wgames.com/gfxlibdemos/progs/exe/donut2.zip


Bear in mind that the DarkBASIC program will have been compiled to native x86 machine code, whereas donut2.exe is still actually interpreted BASIC.


Other GFXLIB demos:

http://www.bb4wgames.com/gfxlibdemos/gfxlib_demos_index.html


David.

« Last Edit: Jan 20th, 2012, 11:45pm by David Williams » User IP Logged

Pages: 1 ... 6 7 8  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls