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

#41
IDE/Syntax / Alt+tab & focus
2008-Nov-27
Would be nice if the editor window would get focus when coming back from alt-tabbing to the help and back again instead of having to click the mouse every time.

Also switching between editor windows (the basic files) with ctrl+tab like you can do in most other programs that uses tabs.
#42
I'm having troubles with the manual that says this should work:
NETWEBGET("www.server.com", "x/y/z.html", 80, local$)
However if you do the below examples you will notice only one of them actually works:

Code (glbasic) Select
ok = NETWEBGET("www.glbasic.com", "main.php", 80, "main.php")    // Not ok, gives the result below
ok = NETWEBGET("www.glbasic.com", "/main.php", 80, "main2.php")  // This works ok


QuoteBad Request
Your browser sent a request that this server could not understand.

Notice that one line has "/main.php" and works but the one that is missing the beginning slash isn't working.
#43
Bug Reports / DIMDATA with %
2008-Nov-09
Isn't it possible to use DIMDATA to fill an natural numbers-array with values?
Code (glbasic) Select
LOCAL ab%[]
DIMDATA ab[], 65, 66, 67, 68, 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86


Gives this result:
Quote*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2008.290 - 3D, NET
Wordcount:189 commands

compiling:
C:\DOCUME~1\devcon\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `int __GLBASIC__::__MainGameSub_()':
C:\DOCUME~1\devcon\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:25: error: no matching function for call to `DIMDATA(__GLBASIC__::DGNatArray&, int, DGInt[22])'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:699: note: candidates are: void __GLBASIC__::DIMDATA(__GLBASIC__::DGIntArray&, int, DGInt*)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:701: note:                 void __GLBASIC__::DIMDATA(__GLBASIC__::DGNatArray&, int, DGNat*)
*** FATAL ERROR - Please post this output in the forum
#44
I just stumbled onto this code that crashes GLBasic, not just my program. Seems DEBUG is limited to 255 characters per line? It will output the complete line in the debug-window but then you get the nice "the program has crashed" message.

Code (glbasic) Select
a$ = "a string that is 252 characters long... cut out for convenience :-)"
DEBUG LEN(a$) + "\n"     // Just to make sure the length is right
DEBUG a$ + "<\n"         // Three more characters makes it 255 total
END


No showstopper, just informing :-)
#45
I made a simple online highscore example that uses PHP, MySQL and GLBasic ofcourse :-) It calls a homepage with the path "http://your.homepage.com/index.php/listgame/highscore/game_name/playername/score/64byte_hash"

The PHP side needs an installation of CodeIgniter to work. http://codeigniter.com/

The 64byte_hash is created from all the other data so if those don't add up when the server gets it all, it won't be added. This should be resonably safe until someone REALY wants to hack your highscore table :-)

To get the list of highscores just call the same routine (Highscores) with an empty name and score and you will download an ini-file that the scores will be loaded from and shown to you.

You can find the code on my homepage under "CODE". Ofcourse you have to change the password in the file, you can find it if you search for "secret code" in both the PHP file "listgame.php" and the GLBasic file "SpaceInvaders.gbas"

Good luck!
#46
music/sound / Music
2008-Oct-26
Non-looping music tracks

A way of positioning playback inside a track (Start at 86.263 seconds into the track and play once or repeat 3.5 seconds forward)

Stop music at next loop

Keep midifiles in memory for usage as soundeffects

mabe even able to play midi sounds directly without going thru midifiles? :-) (I can wish, can't I?)
#47
It would be nice with an ID so you know who sent what message without having to believe the client that sent the message. For example in a chat it's easy to say that some other client sent a chat message but just altering the message sent.

"Moru: Blablabla" - realy sent from "haxor" guy

Also some way of noticing when a client disconnected or to kick a client.

Some way of setting what port the server is listening on and ofcourse the client needs to know what port to connect to if it's not the standard port.
#48
GLBasic - en / netports
2008-Oct-18
If anyone knows how to set PORTS when communicating with the netcode built in to GLBasic I would be very happy to hear how to. Or at least to know what GLBasic is using now? Can't open ports in the firewall if I don't know which ones? :-)
#49
Beta Tests / Scribble beta
2008-Oct-13
A program for scribbling your theories and develope them together with your friends :-)

Scribble Beta

Don't mention the buggs when typing in the DDGui boxes please, I have no idea how to fix them :-)
Also in the chat-box: After pressing shift, pressing a letter and then releasing shift again produces double characters. I will fix that when I can keep my eyes open again :-)

If anyone knows how to set PORTS when communicating with the netcode built in to GLBasic I would be very happy to hear how to. Or at least to know what GLBasic is using now? Can't open ports in the firewall if I don't know which ones? :-)
#50
Hello!

Is implementation of Newton 2.0 planned or do I just have an old version of the samples as usual?

Another question: Is it possible to simulate hovering for a primitive? I can't realy get a good emulation of force by using NewtonBodyAddForce or NewtonBodySetForce, since it just starts floating anywhere. I want to be able to make the body float a certain distance from the ground.

Third question: Will the Vehicle constraint interface be implemented?
#51
When I run \Samples\_Projects_\NewtonSDK\dddCollision\dddCollision.gbap
the ball just passes thru the plane. I know this used to work earlier, is there some problem with my installation?
#52
Is it possible to explicitly declare a dimdata array as global?
#53
When I declare a variable (by mistake) to have the same name both both local and global I get into problems with the compilers if the global is a type and the local is a bool. Example follows:

Code (glbasic) Select
// --------------------------------- //
// Project: Test14
// Start: Sunday, August 24, 2008
// IDE Version: 5.360


TYPE TEST
cd = 1
ENDTYPE

GLOBAL k AS TEST

WHILE TRUE
PRINT "Hello world", 50, 50
SHOWSCREEN
WEND

END


FUNCTION a:
LOCAL k

k = KEY(208)
ENDFUNCTION


Compiler output:
Quote
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2008.210 - 3D, NET
Wordcount:6 commands

compiling:
C:\DOCUME~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::a()':
C:\DOCUME~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:26: error: no match for 'operator=' in 'k = __GLBASIC__::KEY(2.08e+2)'
C:\DOCUME~1\LOCALS~1\Temp\glbasic\gpc_temp_class.h:12: note: candidates are: __GLBASIC__::TEST& __GLBASIC__::TEST::operator=(const __GLBASIC__::TEST&)
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 0.5 sec. Time: 07:05
Build: 0 succeeded.
*** 1 FAILED ***
#54
Finaly made it to convert DDgui to proportional fonts, download on my homepage including source for Bitmap fonts.
Usage is just like the old DDgui, only the font and widths has changed. Let me know if you find something strange since I don't realy know how to use much of it, just know that the example is working fine what I can see.
Known problems include the select text and type text into textboxes. You don't have a cursor but it still works :-)

DDgui
Update 2008-08-18: it can now handle \n in text strings, you get a proper line-break now.
#55
When I set the Screen size to 1680x1050 and multisampling to 4, fullscreen I get low FPS in certain areas. If I go to the south edge of the left big corridor (on the screenshot below) and look a bit to the left I get 60 FPS. If I look straight ahead I get 30 fps. If I move forward to the point indicated in the screenshot it switches back to 60 FPS. Why could this be? It works fine in 1024x768.

Graficscard: GF 6600 GT, fresh drivers
Windows XP sp3


[attachment deleted by admin]
#56
I have been reworking PeeJays Bitmap Font routines for using more than one font, colors and scrolling messages. The source code can be downloaded from my homepage together with examples of how to use it.

A short example how to use the library:
Code (glbasic) Select

// First we add two fonts and put the font-id into variables
// We need to tell it the size of the grafic, the desired space
// between characters and what sprite-number to start
// importing at but only the first time. The routine expects the
// grafic to be 16x16 characters, if not you need to specify the size
big = AddFont("smallfont.png",  336, 368, 2, 1000)
small = AddFont("smallfont2.png", 160, 224, 1)

// Main color and alpha-mode of the text (r, g, b, font, alpha)
TextColor(128,255,128, big, 0)
TextColor(128,255,128, small, 0.7)

DrawText("This text is kerned.",0,50,TRUE)
DrawText("This text is not kerned.",0,80,FALSE)

WrapText("Sometimes we just want to be able to type long strings and not have to worry about when to stop - this is where word wrap comes in.",0,50,640,TRUE,2,big)

CentreText("This text is centralised on the screen",320,50,TRUE,2,big)

TextColor(0,0,255)
RightText("This text is right justified and blue",640,50,TRUE,2,big)

JustifyText("And finally, we have the ability to call a function to allow us to fully justify text. This allows for text to be displayed filling the entire area, and evenly spaced.",0,50,640,2,small)



You can change the color of each corner of all characters and those will blend smothly.

Code (glbasic) Select

TextColorCorner("d", 0, 128, 0) // change the lower two corners (Default font 0 if we don't specify)
TextColorCorner("u", 255, 255, 255) // change the upper two corners (Default font 0 if we don't specify)

Use these codes to choose corner:
"ul", "dl", "dr", "ur" (UpLeft, DownRight and so on)
"u" for up, "d" for down and "l" and "r" for sides

Update 2008-08-20: Finally figured a workaround for the blending feature of POLYVECTOR so now we can use Multisampling which enables italic styles too. Bold has always worked though.

So this gives us one more command: FontStyle(fnr, bold, italic)
Bold is how many pixels to add to the thickness and italic is how many pixels to scew the font to the left (negative) or right (positive)

For examples of everything, run the exefile :-)

[attachment deleted by admin]
#57
Setting comments on blocks with ctrl + K sometimes deletes the last line.

To reproduce:
Paste the following code into an empty document and select the text from after the last ENDIF (just after the F at the end of the line) and up to the start of the line before and press ctrl + K.

Code (glbasic) Select

IF x = y
ENDIF


It's important that you have two (or more) <tab> characters before the ENDIF, otherwise it won't work.
#58
I'm getting a warning that c will be declared global with this code:
Is it supposed to do that?

Code (glbasic) Select
// --------------------------------- //
// Project: Test8
// Start: Monday, July 28, 2008
// IDE Version: 5.337


LOCAL x

x = test(5, 3)

DEBUG "x = " + x + "\n"

END



// ------------------------------------------------------------- //
// ---  TEST  ---
// ------------------------------------------------------------- //
FUNCTION test: a, b, c = 5

RETURN a * b * c

ENDFUNCTION // TEST


#59
I'm having troubles opening the helpfile from GL-Basic, nothing happens. So I tried opening it from the explorer shell and then I get the errormessage:

Quotehh.exe - Entrypoint not found
The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll

And an OK button. I get this message twice before it gives up.

Windows says I have this version of the file:
7.0.2600.5512 (xpsp.080413-2111)

Anyone have any ideas what's going wrong? This is after reinstalling Windows XP and SP3 but I haven't used the help for a while so don't know when it started.
#60
Is it possible to move the shoutbox to the upper right corner of the startpage, left aligned and smaller text? It is dominating the page right now and doesn't look too good with centered text and bold here and there.

Would also be nice if something could be done about the dates on the list, they take up more space than the actual message most of the time.

Wich one looks more tidy? :-)
Quote

Yesterday at 22:26:37 WPShadow - Verflixt! Vertippt!
Yesterday at 15:33:04 Schranz0r - meinst gbal 
Yesterday at 15:25:45 WPShadow - *.qbal finde ich genial! Auf sowas hab ich immer gewartet!!! *freu*
Yesterday at 14:29:28 Schranz0r - Bin im Chat !
2008-07-26, 18:51:53 Schranz0r - öhm Bilder folgen noch 
2008-07-26, 18:50:11 Schranz0r - Ging ja Fix.... Gernot, Hut ab   Achja, Hochzeit war SUPER 
2008-07-26, 17:35:10 D²O - Das Update mit der Bibliothek : Geil, Danke.
2008-07-24, 22:30:49 Kitty Hello - ChatMan
2008-07-24, 19:50:44 Schranz0r - also : Deckelcut 
2008-07-24, 18:57:04 trucidare - Ne war ein ich mach ne glasflasche auf und schneid mich am deckel situation.

Yesterday at 22:26:37 WPShadow - Verflixt! Vertippt!
Yesterday at 15:33:04 Schranz0r - meinst gbal 
Yesterday at 15:25:45 WPShadow - *.qbal finde ich genial! Auf sowas hab ich immer gewartet!!! *freu*
Yesterday at 14:29:28 Schranz0r - Bin im Chat !
2008-07-26, 18:51:53 Schranz0r - öhm Bilder folgen noch 
2008-07-26, 18:50:11 Schranz0r - Ging ja Fix.... Gernot, Hut ab   Achja, Hochzeit war SUPER 
2008-07-26, 17:35:10 D²O - Das Update mit der Bibliothek : Geil, Danke.
2008-07-24, 22:30:49 Kitty Hello - ChatMan
2008-07-24, 19:50:44 Schranz0r - also : Deckelcut 
2008-07-24, 18:57:04 trucidare - Ne war ein ich mach ne glasflasche auf und schneid mich am deckel situation.