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

#101
How steady is your hand?

Play a fun E maze game  O_O

http://www.maniacworld.com/maze_game.htm
#102
Code (glbasic) Select
ok=DOESFILEEXIST(FileName$)
PRINT ok,10,10
SHOWSCREEN
MOUSEWAIT


if my FileName$ is Particle.png then it will return 1

if the FileName$ is Particle2.png then it will return 0

Both files are properly named, and exist in the correct directory.

It seems the problem is: when a number is in the filename, it wont find the file.

#103
In the IDE, using "File"(alt-f), and selecting the "Samples..." option:

This opens a windows explorer window, in the root directory, of my main harddrive.
#104
GLBasic - en / 2d world size
2009-Jul-18
Is there a size limit - + to the 2d world....

i was firing some particles at lightspeed and i got shot in the back lol.

Does it wrap, or is my rounding function flipping the sign of the coordinate?




#105
Hi Gernot,

Getpixel....   i read the documentation, and obviously im very familliar with it (hence 3d font creator and image2object programs)


The thing is, it reads 4 times larger a dot than actually exists.
For instance if i put one single white dot and use this command:

ok=GETPIXEL(x,y)
IF ok<>RGB(0,0,0)

If this sees the single dot, it is reading into my dim 4 dots, one above the original one to the right and one below.
like this pattern:

0
00
0

I need to know exactly how it works internally, or maybe you can release the source in form of an inline?

Could this be why it is so slow: it is reading 4 times more info than actually exists?

Is there a way to tune the appeture of the cemera "eye"?

         
#106
gernot here is the test ...

i put a small project in test.rar too...attached to this message

Code (glbasic) Select
LIMITFPS 40
// use up and down arrows

WHILE TRUE
IF KEY(200 ) THEN gravity=gravity + 0.1
IF KEY(208 ) THEN gravity=gravity - 0.1
IF gravity >=1.0 THEN gravity =1.0
IF gravity <=-1.0 THEN gravity =-1.0
PRINT "gravity="+gravity,10,10
SHOWSCREEN
WEND




[attachment deleted by admin]
#107
I made a new Shader, for increasing the brightness of an object by 50%.
I will add more in this thread later on.


Example for using GLSL:
Code (Load the shader in head of program) Select

X_LOADSHADER(0, "Bright.vert", "Bright.frag")

-
Code (2d renderings) Select

X_SETSHADER 0;
DRAWSPRITE
X_SETSHADER -1

-
Code (3d renderings) Select

X_SETSHADER 0;
X_DRAWOBJ
X_SETSHADER -1


-Hemlos

EDIT: This post is updated with the proper shader.
===============================================================
EDIT: COLOR SHADER BELOW:
I made a color shader, it adds color to your texture in the gpu.
This can also be used as a "brightness".
To use as brightness, increase R G B the same amount.
Remember, this is additive, so if your texture is already bright...itll push the color closer to white.

This will add some red:
Code (RGB(128,0,0)) Select

X_COLORSHADER( 0.5, 0.0, 0.0 )


The colors in GLSL ranges from 0.0 to 1.0 which is the equivilant of 0x00 to 0xff


Put the shader files with the exe, and use this function to declare and set the color.
You call this function right before X_SETTEXTURE.

Code (glbasic) Select

X_COLORSHADER( 0.5, 0.0, 0.0 )
X_SETTEXTURE Texture0 ,-1
X_DRAWOBJ Object0, 0
X_SETSHADER -1



You can reduce cycles by preloading the shader instead of putting it in the function.

Code (Preset to shader #11) Select

FUNCTION X_COLORSHADER: R,G,B //RGB Addition

STATIC Initialize, Test
IF Initialize<>TRUE
Initialize=TRUE
Test=X_LOADSHADER(11,"Color.vert","Color.frag")
ENDIF

X_SETSHADER 11
X_PUTSHADER "R",R
X_PUTSHADER "G",G
X_PUTSHADER "B",B

RETURN Test

ENDFUNCTION


edit July 2012:
I reupload the colorshader.rar, it wasnt correct.



[attachment deleted by admin]
#108
Bug Reports / STDOUT STDIN
2009-Jun-28
The STDOUT example in help files, causes the program to crash for me.

#109
Drawline has a fixed alpha of 1.0 ?

I cant get it to blend. :S
#110
Which one is faster? Sprcoll() or Boxcoll()?
#111
ASL() is in german

and


in X_PUTSHADER example in help file, the loadshader command says toonvert...it should be test.vert

   IF X_LOADSHADER(13, "test.vert", "test.frag") = FALSE
      PRINT "Shader failed to load: ", 100,100
      SHOWSCREEN
      MOUSEWAIT
      END
   ENDIF
#112
Uhm....Gernot, this isnt good..

Something happened...i have no idea what happened; a message keeps telling me to reinstall.
All my projects are doing this, the editor crashed and lost information somehow?
I didnt go into the glbasic root directory at all...i was staying isolated within my projects directories.

Heres some things i did:
I used the editor to link to the forums..
Editor was working fine today, i even debuged some code for peejay. The highscores function...it was missing % in the declaration.
I moved an old project...2d gravity, opened it from the project.gbap icon in windows....and all worked fine.


Some time after these events...this happened:
When i select to open "Project Options", the editor responds in a message; "Cannot find platform informations. Please reinstall?"
This message has an ok button, and when selected, the editor opens "Project Options", and all these parameters are blank. Press apply and it gives another error..."Incorrect parameters"

It does this even when i try to make a new project.
What happened? How do i prevent this in the future? How do i fix it?

[attachment deleted by admin]
#113
If the file doesnt exist...crash.

Code (glbasic) Select
ok=OPENFILE(0,"filelist.txt",TRUE)


And if the the file does exist, and the file is extremely large(around @10meg) , this will not find the file:
Code (glbasic) Select
ok=DOESFILEEXIST(fname$)
ok returns false, which is incorrect.         
#114
Bug Reports / drawrect?
2009-May-24
i used fillrect in my old 2d gravity simulation.
the pixels were placed to the screen very smoothly, using floating point numbers for x/y coords.

I tried to recompile with the latest editor, and it seems the drawrect is placing pixels at integer steps now.
This makes the animations look rough and "choppy".

What has happened??
#115
Hello, i found Windows 7 beta final pre-release ISO today, and its free till mid-2010.
I saw some screenshots....looks pretty cool imo, with some new windows browsing features.
The reviews i read were very interesting.
Personally im not putting it on my PC, I get an error when trying to download it from MSN.

Before anyone goes installing it, make sure you read about it, thoroughly...it is beta.
I dont recommend this beta OS to anyone, this review is neither a rant, nor is it a promotion.
Just a thread for this OS, as a source of information.

Here are 2 links to reviews and more information:
http://news.cnet.com/8301-19518_3-10233855-238.html
http://blogs.zdnet.com/Bott/?p=958



WARNING: FOR HIGHLY EXPERIENCED COMPUTER USERS ONLY
If you arent a computer technician, i strongly recommend against using this beta software.
Note: Windows 7 anonymously sends update information to microsoft software engineers, for thier update fix requirements.
Here is the Windows 7 download page:
http://www.microsoft.com/windows/windows-7/download.aspx
#116
Tools / 3d converter for ddd
2009-Jan-25
Convert DDD to 3ds  :)
#117
Heres an intro movie i made to use fullscreen at program startup for GLMidi.
Its called with MCI_Library


Have a demo intro you want to show off? Post in this thread!

Intro demo zip attached here:

[attachment deleted by admin]
#118
In order for SETCURRENTDIR to work i have to add SLEEP 1
Is this normal?

SETCURRENTDIR("sounds"); SLEEP 1

#120
Make the ide auto link smalfont.png, or smalfont.bmp, (If one is present.)..in GLBasic ROOT directory.

To make this obsolete, during testing(we do alot of this) etc:

LOADFONT"smalfont.png",0
SETFONT 0

LOADFONT"smalfont.bmp",0
SETFONT 0