Menu

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 - doimus

#21
I think I ran into a problem with GLB's 3D converter.

When importing/converting OBJ  file, UV map gets distorted/flipped/strange stuff.

If I open the same OBJ file with AC3D and then export it as ddd, no problem.
OBJ was originally exported from Lightwave 9.6

edit: I've included simple model, with ddd's from GLB and AC3D.

[attachment deleted by admin]
#22
When using gensprite() function in a project that has "Explicit declarations" turned on, exe crashes immediately.

Everything works fine until I turn on expl.d. After that it crashes no matter whether it's turned on or off subsequently.
It's like turning it on jinxes the compiler... >:D

GLB v7.206
#23
Does GLB draw stuff that's not on screen? Stuff that's not visible to camera etc?
Is this taken care of automatically, or do we have to deal with it manually?

I did some tests with 200 512x512px PNG "sprites" (mighty huge),all drawn at each frame. While the memory usage was ridiculously high, GLB drew it almost flawlessly.
I am wandering if I could leave it this way, or should I optimize it so it will draw only what's visible on screen?

There was some problems when I tried to load jpg images instead of PNG. It loaded first few images and then drew the rest in black, ie. didn't load them. Changed to png, all went fine.

Also, is there a way to force vsync/antialiasing and that stuff in GLB code? There is some tearing visible when scrolling huge images and enabling vsync in video card properties fixes it.
#24
I have trouble using 256-character fonts with squared size, made with DiNGSFont.

GLB prints completely different characters when using it. This only happens when using the n^2 option AND 256-character option at the same time.



#25
Is it posible to force GLB into using software rendering instead of OpenGL?
I would like to test how my game would run without hardware acceleration, and if it runs decently in software, I would like to keep it that way.
#26
Is it possible to read numbers (float, integer, etc) from an .ini file?
So we could read number values for variables, for example.

INIGET$() returns a string - is there a reason there is no INIGET/INIGET% command?

And tying directly into the above question, is there a way to typecast string into integer? Sort of reverse FORMAT$().
#27
2D / DirectX support?
2009-Jul-13
Is there any chance of GLBasic supporting DirectX API anytime soon?

Not that I prefer it over Open GL (on contrary, I actually prefer OGL) but I am in the position to suggest GLB as framework for development of casual PC games. The only thing that prevents GLB from being ideal casual framework is lack of support for DirectX. And no, I do not think of DX9 with shaders 3.0 - I'm talking about basic DirectX support, like DX7.

Some discussion we had in PSP thread made me think about GLB and casual games market.
At the moment most if not all casual portals do not accept games which aren't DirectX compatible. There are multiple reasons for that and most prominent is that many Windows installations run on default Microsoft graphics drivers, which have horrible OpenGL support.

It would be nice if we had some kind of DirectX wrapper for GLB. Even the most basic, 2D only, DX7 support. Somethin like what BlitzMax does - runs on OpenGL, but reverts back to DX7 on Windows.

Yes, I know that DX sucks, but anyway....
#28
I have written a simple image parser which extracts data from a bitmap using GETPIXEL and stores values into an array.

Although I haven't used LIMITFPS command in my case, it seems GLB is locked to 60 FPS unless told otherwise.

GETPIXEL command is affected by LIMITFPS as well, so it runs much slower at default value than if I set LIMITFPS to some crazy number like 5000.

So, it would be nice if, for example, LIMITFPS 0 turned off frame per second limitation completely.
#29
Would it be possible to implement the function of screen filters in GLB?
Kind of like it's done in almost any retro game emulato - filters that process the whole screen, making it look different, scaled 2x, with scanlines, etc...

Here's an example I googled out, to illustrate the usage of those filters. Pay attention how the Yoshi's island looks for example - it's amazing!
http://www.neogaf.com/forum/showthread.php?s=4269ccbc52dc1d8dc6b8a4dac401229f&t=221725

Here's another example of PAL filtering for the Amiga emulator. Really brings out the charm in retro graphics.
http://eab.abime.net/showthread.php?t=29206

#30
I'm mondering how something like this can be done in GLBasic:
(sorry for a bit large images)

Example is from Bioware's Baldur's Gate, RPG from 1998.
Running on Infinity Engine, one of the finest 2D engines ever made.


On image A we got our character (guy at the bottom) in front of a tree.
On image B the character is behind the tree, and is drawn shaded, to appear obscured by the tree.
On image C character is only partially obscured by the tree.

What is interesting here is that background is completely static all the time. Background is made from a single image, it's not like the tree id drawn after the character - it's only character's sprite changing it's shade.

Here's how it's done in Infinity Engine:


The white outline here depicts the mask which determines shading of the character pixel. When any part of the character is inside that mask it gets shaded (it's actuall drawn with every odd pixel left out).
That mask is sorted by vertical axis too, as shown in image A. Although the part of the character is inside the mask, it's still drawn, since the character sprite is lower on vertical axis (ie. "in front" of the tree).

I know this is basically specific software-2D technology here, but could something similar be done in GLB? Some kind of invisible polygon that would affect the shading of the character sprite/polygon).
Of course, it could all be done in pure 3D, or by drawing specific sprites in specific order (kind of 2.5D), but I'm interested in this particular approach, with single background with masks.
#31
Would it be possible to have functions inside TYPE, something like this:

Code (glbasic) Select

TYPE animal
        size
        weight
        health
        FUNCTION eatsomegrass: a
            for i =  1 to a
                   print "Yum,yum!!",0,a*10
            next
        ENDFUNCTION
ENDTYPE


GLOBAL sheep AS animal
sheep.eatsomegrass: 12




This would be a step towards object oriented approach in GLB.
I guess there's a lot to be done "under the wraps" and things probably aren't as simple as I'm trying to make them look... but still, it would be nice to have this feature.
#32
Google is developing this new opensource plugin which wraps native C/C++ code and makes it deployable to web browsers. It already supports SDL - Quake has been ported.

There's obviously a huge potential for GLBasic to develop browser-based executables.

Here's what's it all about:
http://arstechnica.com/news.ars/post/20081209-safer-than-activex-a-look-at-googles-native-client-plugin.html
http://google-code-updates.blogspot.com/2008/12/native-client-technology-for-running.html
#33
By now everybody must have played or at least heard about the great 2d isometric RPG's of the late 90s/early 2000s which were all the rage on the PC back then.To be precise I'm talking about games that used Infinity Engine, the series of games that started in 1998 with Baldur's Gate and ended in 2002 with Icewind Dale 2.
You may read about them here: http://www.mobygames.com/game-group/graphics-engine-infinity-engine and also here: http://en.wikipedia.org/wiki/Infinity_engine.

What I'd like to discuss is actual technical implementation of the engine if done in GLBasic. I'm not thinking of complex RGP game mechanics in general (inventory, dialogue and combat system) but just of graphical part of the engine.
In Infinity they used 2d sprite masks basically for everything. They started with prerendered background image, then there were smaller bitmaps drawn in solid colours to define walkable areas, height maps, shadow maps etc. There were masked aread for animations such as streams of lava or fountains and most importantly, masks that defined walk-behind areas (for example when a character walks around the back of the house and is covered by it).
It is important to mention this is not an tile-based isometric engine (like in Fallout or Ultima series), although it seems like it. This is technically more common to 2D adventure games of early 90s.

I was wondering how would this be possible to implement in GLBasic, considering it uses 3D as base for 2D graphics. We may start with solution to displaying huge backgrounds (that went up to 8000x8000 pixels or more) - some kind of tile-engine would be logical to use. Then we may go on to masking areas (this could be done with polygons, since I don't believe pixel maps are viable in an OpenGL engine). Then to pathfinding etc etc.
Discuss!!


ps. Oh, and you got great language and community going on here, nice to meet you all.  :good: