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.

Topics - Hemlos

Pages: 1 2 3 [4] 5 6 ... 10
Bug Reports / FILEREQUEST$ and MOUSEAXIS[3,4]
« on: 2012-Jul-11 »
When my program(window mode, not tested fullscreen) calls FILEREQUEST$, the mouse buttons are pressed to open this command.
As usual the main window disappears and loses focus, then the next focus is on the dialog file window.
When you click cancel or ok, the focus is returned to the main program window, proper.

This is when the problem happens, MOUSEAXIS[3,4], do not update with the proper information when the focus is returned to the program.
The program thinks the mouse buttons are still pressed, and the only way i know how to get around this, is by clicking the mouse again.

This is a problem unknown to the program, and therefore is certainly bug.

One other observation about filerequest..
On first call to filerequest, the window disappears, however, not 2nd 3rd etc, it remains visible.

GLBasic - en / Congratulations from softpedia
« on: 2012-Jul-11 »
I was checking my email, and found this message.
The interesting thing here is, i never sent this program to them.
However, i did make it.
RangeFinder, one of your products, has been added to Softpedia's database
of games and gaming tools. It is featured with a description text,
screenshots, download links and technical details on this page:
The description text was created by our editors, using sources such as text
from your product's homepage, the PAD file (if available) and the editor's
own opinions.
"RangeFinder" has been tested in the Softpedia labs using several
industry-leading security solutions and found to be completely clean of
adware/spyware components. We are impressed with the quality of your
product and encourage you to keep these high standards in the future.
To assure our visitors that RangeFinder is clean, we have granted it with
the "100% CLEAN" Softpedia award. To let your users know about this
certification, you may display this award on your website, on boxes or
inside your product.
More information about your product's certification and the award is
available on this page:
Feel free to link to us using the URLs above. If you choose to link to the
clean award page for your product, you may use the award graphic or a text
link: "100% CLEAN award granted by Softpedia".
We're also providing download mirrors for your product on our dedicated
servers. If you want to link to our download page please do so by using the
URL below:
We have some buttons (GIF format) if you want to provide an image-based
link to that page instead of a text-based one. You can download a small ZIP
archive (16KB) that contains various size formats of these buttons at the
address below:
If you feel that having your product listed on Softpedia is not a benefit
for you or simply need something changed or updated, please contact us via
email at and we will work with you to fix any
problem you may have found with the product's listing.
The Softpedia Team
Softpedia is a library of over 400,000 free and free-to-try software
programs for Windows, Mac OS and Linux, games and gaming tools, Windows
device drivers, mobile devices and IT-related articles.
Softpedia - the encyclopedia of free software downloads

Hello gang,

This tutorial is written to help 3d games with consistant object movement, regardless of FPS.
Think about it, some computers are slow and things can move too slow on those screens.
Furthermore, some computer systems are fast, and will move too quickly.
So you need to regulate physical movement in 3d space.

This formula is derived from a physics paper, from a stanford university student.
In this article i found it says distance squared and time is a movement size for an instance of time.
So this got me can move that square function around and calculate movement in 3d space :)
I tried this with good results on my 3d particle engine SpriteZ3d, which is coming along great now btw!
This is a success story and i had to share it with everyone, as this can improve any 3d game performance!

This is the magic formula i devised:

Code: (glbasic) [Select]
MovementUnit = 1.0 / MAX(1.0, FPS )
I call FPS with this group of commands together, for maximum performance of the program:
Code: (glbasic) [Select]
FPS = MyFPSTimer()
//Keep in mind you can only call this once per loop: FPS=MyFPSTimer()
//If you need frame time, its FrameTime%(milliseconds)
MOUSEAXIS() //here below frame time to prevent divisions by zero in your algorithms, and to make mouseaxis accurate.

// ShowFpsBOOL print to screen option TRUE FALSE
// Usage: myfpsvalue=FPS(FALSE)
// Updates a stable FPSValue Every One Second Interval:
STATIC TimeBuffer , FrameCount , FPSVALUE
FrameTime = GETTIMER(); TimeBuffer = TimeBuffer + FrameTime; FrameCount = FrameCount + 1
IF TimeBuffer > 999; TimeBuffer = TimeBuffer - 1000; FPSVALUE = FrameCount; FrameCount = 0; ENDIF
SystemTime = SystemTime + FrameTime //total time in milliseconds

And to use this Movement size in 3d space, you must factor it with the movement and acceleration vectors:

Code: (glbasic) [Select]
//this doesnt include an acceleration algorithm, but you use it for that too.
PosX = PosX + VectorX * MovementUnit
PosY = PosY + VectorY * MovementUnit
PosZ = PosZ + VectorZ * MovementUnit

PosXYZ is your position matrix, and it is updated with your vector each frame.
VectorXYZ is your vector direction of movement.
Here you can apply the same formula to accelerations also, not just velocity.

And thats it!

I tested this on the particle engine, measuring the actual distance with a grid.

I tested with these parameters:
ParticleCount = 1000, ParticleCount = 10, ParticleCount = 10000

And the resulting movement was identical, no matter what fps it was running!
Heres a screenshot, showing what the fountain looked like, at any frame rate:

[attachment deleted by admin]

Hi gang,

I just made an interesting dicovery about the glbasic ambient light system.
Not only does it rotate inversely, it rotates double of the rotation of the cam.
In the screnshot below you can see the ambient light on the right side of the sphere.
That light is fixed to that vector no matter which way the camera turns.
Also you can observe my spotlights shining to the top of the object.
No matter which way the cam turns, the light is fixed to the camera view of the object.

Note: X_AMBIENT_LT may not function like this in the future, as it may change due to updates in V11.

EDIT: The solution for proper looking ambient light, can be emulated with GLBasic:
Code: (glbasic) [Select]
IF Ambient
X_SPOT_LT 1, 0xffffff, cx,cy,cz,-cx,-cy,-cz, 360

This is proper looking, yet, it is not really ambient is emulated.

This image below shows how glbasic is using the x_ambient currently without any code fixes.

[attachment deleted by admin]

MOUSEAXIS[0..1] & SYSTEMPOINTER in Window mode
When the mouse exceeds the X limit of the window, to the right of the window.
And when the mouse exceeds the Y limit of the window, below window.
The commands report these values:


Using windows xp mind you..

Everything is fine if the mouse is to the left, or above the window...mouseaxis reports proper velocity.

« on: 2012-Jun-27 »
Wow this one was a real M**********R

when you set X_SETTEXTURE -1, -1
and then you call FILEREQUEST$

When the window comes back......CRASH

the fix .... X_SETTEXTURE 0,0 //even if nothing is assigned to this ID, its ok

Bug Reports / X_DRAWOBJ X_NUMFACES bug
« on: 2012-Jun-27 »
bug with X_NUMFACES
If i dont call X_DRAWOBJ right before X_NUMFACES, the program crashes.
Is this normal?

= this is ok
Code: (glbasic) [Select]
  X_LOADOBJ "name.ddd",0
  X_DRAWOBJ 0 , 0
  Count = X_NUMFACES( 0 )

= this crashes program
Code: (glbasic) [Select]
X_LOADOBJ "name.ddd",0
 Count = X_NUMFACES( 0 )

Bug Reports / declare help
« on: 2012-Jun-23 »
not a bad one, declare missing from help file.

Bug Reports / ide function list
« on: 2012-Jun-20 »
if you declare a function with %, it adds an empty function to the list on the jumps page.


function helloworld%:

GLBasic - en / irc is active today
« on: 2012-Jun-19 »
irc is active today, locals are discussing 3d etc, testing stuff, and chating
anyoine welcome to join is in the ide web thingy

Bug Reports / IDE
« on: 2012-Jun-17 »
This thread is need for fixers from here


SpriteZ -2d particle engine updated June 15, 2012

Theres a new command (friction), API has multiple options improved.
Also, 4 good working samples, and a new help file.
Download is in the top message in the link above, or found in the 2d snippet section.

GLBasic - en / minimizing PLAYSOUND?
« on: 2011-Jul-04 »
When a glbin is minimized PLAYSOUND isnt audiable.
Is there a way around this aside from focus on the exe?
Maybe a different feature?

GLBasic - en / Console Q's
« on: 2011-Jul-03 »
Hi Team,
Ive been tinkering with console output..

1. I want to keep refreshing the console output, Is there a way to clear the STDOUT stream buffer?

2. Is there a way to change the default window settings at runtime in code?

3. How do you activate popups, or drop menus, or buttons?

Pages: 1 2 3 [4] 5 6 ... 10