|
Post by angros47 on Oct 21, 2012 17:36:33 GMT -5
A new version of the sprite library: www5.zippyshare.com/v/95754956/file.htmlNew features: - it should detect if your driver supports hardware accelerated collision detection: otherwise, it use a fallback method - Bounding boxes collision detection is also available: just use SprOverlap (Sprite1, Sprite2): you don't need to use SprSetType (as in pixel perfect collisions); the method used check even if the bounding boxes are rotated (it's a simplified SAT algorithm, not just overlapping Cartesian rectangles!) -you can load an image made of "slices", just as you load an animated image, and then you can use slices to build an isometric sprite (demo included) Oh, yes, a win32 binary is included. Since the name "Sprite library" is too generic, I called it OpenB2D, because it works, at least in FreeBasic, in the same way of OpenB3D: my goal is to use both libraries, building a mini-framework for game development.
|
|
|
Post by panoramic on Feb 7, 2013 7:35:25 GMT -5
I am surprised to find in open2d.bi this mention:
Does open2d belong to FreeBasic ? Can you explain, the source of OpenB2D being writen in C ?
|
|
|
Post by angros47 on Feb 12, 2013 13:34:16 GMT -5
The source of OpenB2D is written in C++, it used parts of OpenB3d (a fork of MiniB3d made by me) and parts of Basic4gl. Since both of them are free and open source softwares, and OpenB2D is free and open source, too, no license is infringed.
The demo has been written in FreeBasic. To compile it, I translated the header file in FreeBasic, using SWIG, and it automatically added the lines you noticed (I forgot to delete them).
OpenB2D is aimed mainly to Freebasic, but it can be used in other languages, too. Oh, you might like to know that the runtime library and the graphic library of FreeBasic are written in C.
|
|
|
Post by dw817 on Feb 22, 2013 12:00:37 GMT -5
Hi Angros.
Since you're writing DLLs do you know of one existing or can you write one to read direct pixels in B4GL ?
So if my screen resolution was 1024x768 I could read all 1024 pixels across and 768 down in Red, Green, Blue, values 0-255 for each ?
This would greatly help my work !
|
|
|
Post by angros47 on Mar 1, 2013 13:40:03 GMT -5
|
|
|
Post by dw817 on Mar 1, 2013 19:05:32 GMT -5
Hi Angros:
I wrote that post before I found it.
Actually, I was informed of a way to do it with the, "OpenGLPlugin" library but it was not listed in the examples or help files so this information might help others seeking the same:
It plots directly to the image.
Here is the program I wrote, classic STATIC:
Rather clumsy I think, but it does work.
Hope This Helps !
|
|