GLBasic forum

Main forum => Beta Tests => Topic started by: com_1 on 2009-Dec-03

Title: Hello, people.
Post by: com_1 on 2009-Dec-03
> Google Translate

A good game - "Grid Wars".
Who play one to know.

So.
I try to repeat this game.
I propose to watch what I got about a week.

http://www.zshare.net/download/693319492b9e69af/

Of course this is not the original - "Grid Wars".
This is just my attempt.

Enjoy.


The question.
People who make games for - "IPhone".

Your game someone buy ?
Title: Re: Hello, people.
Post by: bigsofty on 2009-Dec-03
The programmer of Grid wars was served with a "cease and desist" order  by the BizarreCreations as its a Geometry Wars rip off. He removed it form his own site under the threat of legal action, surprised the demo is still floating about.

I would not choose it personally for a project for the same reasons but the choice is yours.  :noggin:

Not my type of iPhone game but there are none like it on the iPhone though, maybe because because this type of game requires a lot of controls(two sets of directional controls on the 360 and PC) with a large screen area and screen area/input on the iPhone is limited. Actually there's not many good Shmups for the same reason. :(

Defence games seem to be the most sellable now... I buy mainly puzzlers.
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-03
> Google Translate

I just wanted(want) to ask ?
Gernot build on "GLBasic" games for - "IPhone".
He had something to sell ?
Title: Re: Hello, people.
Post by: bigsofty on 2009-Dec-03
Yes, here is Gernots iPhone games pluse a few more...

http://www.glbasic.com/forum/index.php?topic=3857.0

My advice, go on the App Store, you can list the most popular sorted by sales for that week easily.

In reality, its a gut instinct, if you feel it will be popular or you really want to make a game in a certain genre for yourself then just go ahead!  :good:
Title: Re: Hello, people.
Post by: Kitty Hello on 2009-Dec-04
My games don't sell to well, though. I'm bad at marketing.
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-04
> Google Translate

2 questions.

1.
Gernot - may(can) I ask, but why IPhone ?
There are other models.
NOKIA - for example.

2.
I search but did not find "C++"(audio) code.
Anyone can help me with "C++" code for GLBasic ?

For example.
Playmusic, Stopmusic - in "GLBasic" ok.
But rewind the music forward or backward not possible - in "GLBasic" without "Inline" code.

Somebody help.
Title: Re: Hello, people.
Post by: Moru on 2009-Dec-04
1. Everyone and their grandma has iPhones = more to buy your stuff

2. No idea, would like to be able to position playback in a sample on any OS.
Title: Re: Hello, people.
Post by: Kitty Hello on 2009-Dec-07
For music on windows, theres a FMod (BassMod??) DLL wrapper. Wait...
http://www.glbasic.com/showroom.php?site=games&game=fmodPlayer (http://www.glbasic.com/showroom.php?site=games&game=fmodPlayer)
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-07
> Google Translate

http://www.glbasic.com/showroom.php?site=games&game=fmodPlayer
Just playing music and nothing happens.
How to use it ?

Look this:
http://www.nodevice.com/dll/AUDIO_DLL/item2120.html
http://www.blitzforum.de/forum/viewtopic.php?t=24527

Without your help - "people".
I can nothing.
Title: Re: Hello, people.
Post by: MrTAToad on 2009-Dec-07
QuoteJust playing music and nothing happens.
Yes, thats all it does - play music.

Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-07
> Google Translate

I'm sorry.

No good - "Inline" tutorials.
And the examples that exist in other projects are not working.(and examples of other projects do not work.)

I just wanted(want) to create a audio player on - GLBasic.

"Inline", not for me.

All thanks.
Title: Re: Hello, people.
Post by: MrTAToad on 2009-Dec-07
So the playmusic and playsound examples dont work for you ?
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-08
> Google Translate

I need a simple - "Inline" code.
Because, I do not understand in - "Inline".

(connection(insert) dll and glbasic) - "Inline" code.
(for music Timeline) - "Inline" code.
(for visualization) - "Inline" code.

All for music management.

About - Visualizations.
I can do so that anyone can assemble(create) and insert your visualization(picture) in the(this) program.
As here(look here):
http://www.glbasic.com/showroom.php?site=games&game=audio_explorer&lang=de


I need a simple working - "Inline" code.
Title: Re: Hello, people.
Post by: Kitty Hello on 2009-Dec-08
Oh. You need a FFT to get the equalizer or visualization of what sounds you play. I have no idea how to do that :(
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-08
On this address is an interesting program:
http://www.blitzforum.de/showcase/260/

Creator simply plugged(connect) - "Bass.dll" and all.

I thought(think) what this possible and in "GLBasic".
Title: Re: Hello, people.
Post by: MrTAToad on 2009-Dec-08
It is - but you need to use IMPORT or DECLARE in order to get access to the BASS API.  Its quite simple really.
Title: Re: Hello, people.
Post by: com_1 on 2009-Dec-09
I tried to connect "Bass.dll" and GLBasic, but nothing.

> DLL - Funktionen ansprechen

> Von Hand laden:
> // Lädt die Funktion "foo" aus my.dll in den Zeiger: foo
> void (__stdcall* foo)(int, char); // Deklaration
> void LoadDllFunction()
> {
>    DLLCALL("my.dll", "foo", (void**) &foo);
> }

How it can be understood ?

> Automatisch laden lassen:

> // ausserhalb von Funktionen:
> // DECLARE(name, "dll", (parameter), rückgabetyp)
> DECLARE(foo, "my.dll", (int, char), void);

> // DECLARE_ALIAS(name, "dll", "echter_name", (parameter), rückgabewert)
> DECLARE_ALIAS(foo, "my.dll", "foo@4", (int, char), void);

How it can be understood ?

> Wenn die Funktion eine __cdecl Funktion ist (also kein __stdcall), hängt man an DECLARE ein _C an:

> DECLARE_C(foo, "my.dll", (int, char), void);
> DECLARE_C_ALIAS(foo, "my.dll", "foo@4", (int, char), void);

How it can be understood ?


I need a simple working - "Inline" code.

Please, help.
Title: Re: Hello, people.
Post by: MrTAToad on 2009-Dec-09
Most people here use FMOD (as it supports more operating systems), and there is a small sample program on using FMOD in the samples directory.

Put simply the DECLARE statement allows the GLBasic program to access a DLL by defining the function name, parameters it takes and the return value (if any)
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-01
Gernot - a question ?

"Include" - is that possible on GLBasic ?
If yes then - how ? (example, please)

And thanks for GLBasic (SDK version) - Gernot.
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-01
include works in inline. You must, however, get the headerpack. But I fear you won't like to link libraries as they must match the compiler. What are you trying to wrap? FMOD?

Please post a link to the FMOD API. I'll make you an example wrapper.
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-01
Gernot - I just want to build "Media Player" on GLBasic.

I have no time, no desire, to learn "C++" and "DLL" in GLBasic. (I thought that would include easier and faster.)
I need only Tutorials. (How does one reconcile FMOD with GLBasic)

Only Tutorials - Gernot. (maybe this can help)
http://www.genesis3d.com/~wog/tutorials/prog_gtestfmodsound/gtestfmodsound.htm



Gernot - Wir möchten nur "Media Player" auf GLBasic bauen.

Wir haben keine zeit und lust ("C++" und "GLBasic DLL" structure) lernen.
Wir haben gedacht - "include" wird besser und schneller.
Wir brauchen nur Tutorials. (wie kann man FMOD in GLBasic einfügen)

Nur Tutorials - Gernot. (Vielleicht das kann helfen)
http://www.genesis3d.com/~wog/tutorials/prog_gtestfmodsound/gtestfmodsound.htm
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Feb-01
Have a look at the FMOD gbas file...
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-02
Yes. Why aren't you trying the FMOd wrapper:

Samples/_Projects_/fmod_player was it.
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-02
Er(com_1) hat schon "FMOD - beispiel" gesehen.
Versucht was umbenennen oder überschreiben aber .....

GLBasic - ist seine(com_1) erste sprache.

Er spricht kein "C++".
Wie kann man was schreiben, wenn wir verstehen nichts.

Wir brauchen nur antwort von Ihnen.
Haben Sie lust " (FMOD in GLBasic) Tutorial (seit 0)" schreiben oder nicht ?

If "keine lust" then
print "Das ist die letzte FMOD frage"
endif


Sonst, er(com_1) macht nächste "kub" version.(erscheinungstermin: hoffentlich bis sommer)
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Feb-02
Take a look at this topic ;) -> http://www.glbasic.com/forum/index.php?topic=2678.msg19891#msg19891

I can help you a bit. If you have some problems, let me know that on a PM ;)
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-03
com_1: Schau das Beispiel "fmod_player" an. Bitte schließe die Datei "fmod.gbas", das ist die Bibliothek dazu. Diese Datei muss nur im Projekt sein. Die andere Datei "player_interface" ist ein Beispiel wie man FMOD startet:
Code (glbasic) Select

snd$ = "rb_1.it"
good = FMod_Load(snd$)
FMod_Play()
FMod_SetMasterVolume(1.0) // full volume / Volle Lautstärke


WHILE TRUE
PRINT "PLAY: "+snd$ + " returns: "+good, 100,100
PRINT "IsFinished: " + FMod_IsFinished(), 100, 120

PRINT "click mouse to stop", 100,140
IF MOUSEAXIS(3) THEN BREAK
SHOWSCREEN
WEND

FMod_Stop()

Title: Re: Hello, people.
Post by: Schranz0r on 2010-Feb-03
Ja das mag gehen Gernot, nur hast du keinen MP3 Support mit drin ;)
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-03
hat FMod kein MP3?
Ja... blöd.

Welche DLL hat denn MP3? Kann mir bitte einer so eine DLL mit SDK zeigen, dass wir das kurz wrappen?
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-03
http://www.un4seen.com/

http://www.autoitscript.com/forum/index.php?showtopic=83481&st=160&p=755560&hl=bassdll&fromsearch=1&#entry755560
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-03
OK, read this tutoral here:
http://www.glbasic.com/forum/index.php?topic=2129.0 (http://www.glbasic.com/forum/index.php?topic=2129.0)

I'll wrap one function for you, so you get the point.

1. Open the file BASS/VB/Bass.bas <-- visual basic wrapper for BASS.dll
2. See the function declaration
Code (glbasic) Select

Declare Function BASS_Init Lib "bass.dll" (ByVal device As Long, ByVal freq As Long, ByVal flags As Long, ByVal win As Long, ByVal clsid As Long) As Long


3. Start a new gbas file (the wrapper)
4. Type:
Code (glbasic) Select

INLINE
DECLARE_C(BASS_Init, "bass.dll", (long device, long freq, long flags, long win, long clsid), long)

ENDINLINE

FUNCTION GLB_BASS_Init%: device%, freq%, flags%, win%, clsid%
INLINE
return BASS_Init(device, freq, flags, win, clsid);
ENDINLINE
ENDFUNCTION



That's the wrapping of one function. It would be cool to extend IMPORT so it can make use of DLLs...
But for now, you have to do it manually as said.

If the visualBasic wrapper says "ByVal", the value is passes as in GLBasic.
Title: Re: Hello, people.
Post by: MikeHart on 2010-Feb-03
Quote from: Kitty Hello on 2010-Feb-03
hat FMod kein MP3?
Ja... blöd.

Welche DLL hat denn MP3? Kann mir bitte einer so eine DLL mit SDK zeigen, dass wir das kurz wrappen?

Klar hat FMod MP3 Support (http://www.fmod.org/index.php/products/fmodex)!

QuoteFMOD Ex includes advanced support for compressed sample formats such as mp2, mp3, ADPCM and XMA.
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-03
Vielen Dank für die hilfe.

Ich habe gar nichts verstanden.
Hoffentlich, er wird alles verstehen.
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Feb-03
Gernot, klar kann FMod MP3 abspielen. Nur hast du das in deinem Wrapper nicht drin :) ...

Ich werde morgen mal ein beispiel posten vom neuen FModEx, mit kleinem HowTo.
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Feb-04
 :nw:
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Feb-05
Leider gestern nicht dazu gekommen!
Werde es heute, wenn ich von der Arbeit zurück bin machen.  :good:
Title: Re: Hello, people.
Post by: com_1 on 2010-Feb-27
My next - demo.
http://www.zshare.net/download/7310531915fc53ed/
Enjoy.
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Mar-01
Cool. Very nice menu.
Title: Re: Hello, people.
Post by: com_1 on 2010-Mar-11
A question ?

"AutoIT" & "GLBasic" - possible ? (can combine ?)
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Mar-12
I don't know.
Why are you trying so many different sound libraries? Is BASS not enough?
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Mar-12
AutoIT is a scripting system.
Title: Re: Hello, people.
Post by: com_1 on 2010-Mar-12
"Media Player" on AutoIT - possible without "BASS.DLL"

For example.

Step 1
AutoIT <> (media player) project - as include

Step 2
GLBasic <> import (this project) include - in GLBasic

Is this possible ?
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Mar-12
Ah. Well, if AutoIT has a DLL, wrapping is no problem at all.
Title: Re: Hello, people.
Post by: com_1 on 2010-Mar-13
Ok. These is are - include
http://www.zshare.net/download/736573912ab5683e/

>> test.au3

Global $a = 10
Global $b = 20


>> test2.au3

Func test2()
Global $a2
$a2 = $a2 + 1
EndFunc


I need - help. (wrapping please)
Title: Re: Hello, people.
Post by: com_1 on 2010-Apr-20
My next - demo.
http://www.zshare.net/download/7518930216fbf99f/

Enjoy.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Apr-21
Thats very nice.  There is a slight but noticable stutter at 97 and around 200 objects and then it continues as normal, but aside from that its very smooth.

By the way, what happened to your box moving game - its no longer in the Showroom...

Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Apr-21
If you change the bitmap, it looks as if it was raining dollars... :D
Title: Re: Hello, people.
Post by: com_1 on 2010-Apr-21
>>  By the way, what happened to your box moving game - its no longer in the Showroom...

I do not want problems with - Sony Music Entertainment
I was warned, so I deleted everything that had happened with music including

In any case - "Kub 3" will be better.


My next - demo.
http://www.zshare.net/download/75214624b28a4ef7/

Enjoy.
Title: Re: Hello, people.
Post by: bigsofty on 2010-Apr-21
I pretty amazed that the mighty Sony had to hit you with a warning, was it the music or the game they took offence to?
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Apr-21
Very nice - does seem to be stuttering much more than the other one though.
Title: Re: Hello, people.
Post by: com_1 on 2010-Apr-21
Thank's for comments.

Next (Map)Demo, may be next week.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Apr-21
Look forward to it!
Title: Re: Hello, people.
Post by: com_1 on 2010-Apr-25
My next - "Map" Demo.
http://www.glbasic.com/showroom.php?site=games&game=mapdemo&lang=de

Enjoy.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Apr-26
Must say its very nice!
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Apr-26
Another nice demo com_1!  :good:
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Apr-26
Awesome. You're really talented.
Title: Re: Hello, people.
Post by: com_1 on 2010-May-09
Hello people.

This my next - Demo. (Audio Explorer on AutoIT)
I create(build) Explorer and connect with Media Player on - AutoIT

http://www.zshare.net/download/75874456a7863cef/

Possible wihtout - Bass.dll and Fmod
Only These -

_SoundOpen ( $sFile )
_SoundPlay ( $aSnd_id [, $iWait ] )
_SoundPos ( $aSnd_id [, $iMode ] )
_SoundLength ( $aSnd_id [, $iMode ] )
_SoundPause ( $aSnd_id )
_SoundSeek (ByRef $aSnd_id, $iHour, $iMin, $iSec )
_SoundClose ( $aSnd_id )


Enjoy.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-May-14
Very nice!
Title: Re: Hello, people.
Post by: com_1 on 2010-May-17
If I understand correctly is going(build) to a (GLBasic) scripting language.

A question ?
When we can count on - 1 Demo (version) a new language ?
Title: Re: Hello, people.
Post by: MrTAToad on 2010-May-18
Not that I know of - V8 will have extended types and other things, but I dont think scripting support will be included in any form.
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-04
My next - Demo.
http://www.zshare.net/download/768866699a49bfbd/

Enjoy.
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Jun-04
Oh. ow did you make the windows controls?
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-05
I do not understand the question.
What you mean ? (Oh. ow did you make the windows controls?)

This create on AutoIT. (not on GLBasic)

If someone wrote a "FMod" wrapper on GLBasic.
Would long ago have gathered(create) "media player".

Gernot - try with a wrapper for AutoIT.
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-08
A question ?

Someone earned on GLBasic ?
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Jun-09
Look at the Iphone release Thread ;)

http://www.glbasic.com/forum/index.php?topic=3857.0
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-15
A question ?

Today I see this - Latest Member: TanjaNavarro
This is really a woman or just so ? (anyone knows ?)
(I am in my life seen only one woman who was interested in programming)

If so then congratulations and good luck in this matter.
Title: Re: Hello, people.
Post by: Moru on 2010-Jun-15
Believe it or not but there are several women programming GLBasic, but most of them don't advertise about it :-)
Title: Re: Hello, people.
Post by: Moru on 2010-Jun-15
Quote from: com_1 on 2010-Jun-08
A question ?

Someone earned on GLBasic ?

I haven't published anything written in GLBasic but the company I work for bought a license because I use it to write small tools for cleaning data-lists and other things. We have saved loads of money on GLBasic because of ease of use and fast developing :-) No, not the intended market for GLBasic but it works well here too :-)
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jun-24
Like your latest demo!
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-24
Thanks for comments.

I want to talk (would like to talk), but a "Google Translate" have bad translation. (translates poorly)
So I kept silent. (so silent)

Foreign languages are not for me.
Title: Re: Hello, people.
Post by: Slydog on 2010-Jun-24
Since I don't speak German, I use Google translate often on these forums.
Would there be a way to automate that from the GLBasic forums?! 
(ie. Choose your language, plus have each forum post flagged as to what the original language was or something, then pass that phrase (forum reply) through Google translate.?!)

Recently, some German text looked interesting, so I translated it.
So, I found out that the soccer World Cup is happening. 
Ha, damn, I'm from Canada, how was I to know!?  :-[  (Do we even have a team!?)

Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jun-24
Yes, you do - but not in this year's tournament.  :nana:

Title: Re: Hello, people.
Post by: Slydog on 2010-Jun-24
I've got conflicting emotions!  I feel like I'm being dissed!  Trying to care . . .  :blink:
ha, but just don't talk trash about hockey!
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jun-25
Quotebut a "Google Translate" have bad translation
Yes, it can be bad :) 

Dont forget you can always hang around in the German forums - if its good, we'll find it!

Quoteha, but just don't talk trash about hockey!
What, that non-sport ?
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-25
I do not speak German.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jun-25
Thought you did, from your profile :)
Title: Re: Hello, people.
Post by: com_1 on 2010-Jun-25
I've already said(I said) I am from Russia.
And joined(login in these site) my brother because he spoke(speak) in German.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jun-25
Sorry - must have missed that bit  ;/
Title: Re: Hello, people.
Post by: com_1 on 2010-Jul-21
A question ?

Today bought(to buy) new Laptop.("Win 7")

Simple code:

WHILE TRUE
SHOWSCREEN; WEND

compiled for(maybe) 20 seconds !!!!!!!!!!


Where is the problem ?

Is it really all (who has "Vista" or "Win 7") so or just only I (on my "Win 7") ?
May have something to do in(on) - Systemoptions ?


Please, help me.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jul-21
Is it 32-bit or 64-bit ?  I have no problem with Windows 7 x64

Possible problems include recursive entry in %PATH%

Compiling over a network will be slow...

Any chance of being able to record it with, say, Fraps ?
Title: Re: Hello, people.
Post by: com_1 on 2010-Jul-22
1. Systemtyp: 32 Bit

2. GLBasic project - FPS 60

3. I found the problem. ("Mini Internet Security")

Without "Mini Internet Security" compiled for - 2.8 sec. (finally)


Thanks for participation - MrTAToad
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jul-22
Seems like it was checking each and everything new file :)
Title: Re: Hello, people.
Post by: com_1 on 2010-Jul-22
You are right. (bad "Security")

Thanks again.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Jul-22
No problem!
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-25
Sorry - MrTAToad


A question ?
How about the acceleraton (speed) in "GLBasic - ver.8".
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Aug-25
For use with the iPhone ?  Never used it.
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-26
A question ?

What about the "Compiler" speed in "GLBasic - 8". (faster, or .....)
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Aug-26
Thats an interesting question.  I made a post somewhere about timings with V8 - cant find it now though.

Anyway, the idea is that if your program keeps executing code within an extended type you should be able to gain a respectable amount of speed.  However, if you keep flitting in and out of an extended type, then there will be no speed gained.

As for program size :

Code (glbasic) Select
TYPE THello
FUNCTION hello%:
PRINT "Hello",0,0
SHOWSCREEN
KEYWAIT
ENDFUNCTION
ENDTYPE

LOCAL hello AS THello

hello.hello()


compiles to 927K in V8 (release mode) and 928K in debug mode, whilst with V7 its 908K in release mode.  An extra 18K isn't that much.
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-26
I use "GLBasic - version 6".
Create a "large" project it is simply impossible. (RTS for example)

Therefore I asked.
The situation has changed in the new version ?
Title: Re: Hello, people.
Post by: Slydog on 2010-Aug-26
How large is large?
My current project is 3300 'commands', and contains 18 .gbas files (10 are my libraries).
It compiles and runs just fine.  (slow sometimes when it has to recompile everything)

Prior to version 8, I had to move my TYPES and CONSTANTS and GLOBALS to my main .gbas file because I had a hard time with my libraries accessing other libraries and constants, and didn't realize GLOBALS were global only to that module.  Plus I was just starting out with GLBasic.  Much has been improved since version 7 in regards to TYPEs, but I have yet to try to move everything back to how I would like it (ie. my TYPES to their corresponding library).
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Aug-26
Update to V8 !
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-26
All thanks, but nobody understood me.

Better to download and watch.
Title: Re: Hello, people.
Post by: Schranz0r on 2010-Aug-26
If you recompile the whole large project it can take his time...
Thats on all compilers the same!

RTS are posible on GLB, im sure ;) ( You do something like League of Legends? )
How many files(gbas) contains your project? ( Maybe there is a problem/bug? )

cheers
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-26
>>  You do something like League of Legends ?
"Command & Conquer" - good game. (for me)

>>  How many files(gbas) contains your project ?
Only 1 ".gbas" file, but (+- 8000 commands)

Press F5 and you can go tee drink.
Title: Re: Hello, people.
Post by: Slydog on 2010-Aug-26
Try breaking your .gbas file into multiple files, each with a specific function / purpose.
Then when recompiling, only the modified .gbas files will recompile, saving time.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Aug-27
The bigger the project the longer it will take.  I believe Gernot has made sure that it multi-tasks better, so doesn't interfere so much with other programs.

Of course, it helps if you have a fast computer, the source code is on an internal hard drive and you have plenty of RAM.

I dont see why a commerical sized program cant be compiled in GLBasic.  Yes, it will take a while, but I suspect it would take a while to compile C&C too...
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Aug-27
V6 did not have increadibuild. Som yes second time compile is faster now. If you have that long times, consider getting a faster PC.
Title: Re: Hello, people.
Post by: com_1 on 2010-Aug-27
Thanks for help, people.
Title: Re: Hello, people.
Post by: matchy on 2010-Aug-27
Ya - that's a good tip, Slydog. I use a temp.gbas file to move big or complex functions that require a series of running and modifying for quick compiles. :)
Title: Re: Hello, people.
Post by: com_1 on 2010-Oct-01
I compiled (create) this program for yourself, maybe you'll need (too) for your "GLBasic" projects, enjoy.

(http://img153.imageshack.us/img153/4695/autoitscript.png)

http://ul.to/a34z4j (http://ul.to/a34z4j)
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Oct-01
Very clever - like the animation...
Title: Re: Hello, people.
Post by: com_1 on 2010-Dec-03
Sorry "Gregory Atlas".

I want to ask.
Has anything changed in the "GLBasic" latest version for the better ?
I mean speed. (press "F5" and what)

"GLBasic" very good language, but his speed just kills. (may still change ?)

Repeat, "GLBasic" is very good language. (no matter what language it is a good)
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Dec-03
I haven't noticed an increase nor decrease in speed...
Title: Re: Hello, people.
Post by: Gregory Atlas on 2010-Dec-04
Quote from: com_1 on 2010-Dec-03
Sorry "Gregory Atlas".

:blink: For what are you sorry?
Title: Re: Hello, people.
Post by: com_1 on 2010-Dec-04
Very sorry that a rate(speed) has not changed.


Quote
Quote
Quote from: com_1 on Yesterday at 03:00:24 pm

    Sorry "Gregory Atlas".

:blink: For what are you sorry?

For the fact that interrupted your topic.
Title: Re: Hello, people.
Post by: Gregory Atlas on 2010-Dec-04
Quote from: com_1 on 2010-Dec-04
Very sorry that a rate(speed) has not changed.


Quote
Quote
Quote from: com_1 on Yesterday at 03:00:24 pm

    Sorry "Gregory Atlas".

:blink: For what are you sorry?

For the fact that interrupted your topic.

I doubt that it bothered anyone here, everyone is welcome to post and can look for help here. :)
We are all helping eachother and it´s okay for everyone. :D
Title: Re: Hello, people.
Post by: Kitty Hello on 2010-Dec-06
If you talk about the compile times, there's no way to speed that up. I did my best already. Get a faster PC, maybe?
Title: Re: Hello, people.
Post by: com_1 on 2010-Dec-06
Very sorry.

You have done so much, but "compiler times" spoiled it all.
Title: Re: Hello, people.
Post by: Slydog on 2010-Dec-06
Compile times are only an issue the 1st time you compile after starting GLBasic. 
Then after that, only the files that you have changed require recompiling.
If your project is fairly large, and is still only in one file, break it into multiple smaller files, each with a common theme, like graphics routines, level routines, sound, input, etc.

My project is getting fairly large (over 4400 commands as reported by the compiler) but I have it spread over 15 files. 
My initial compile time may be around 40 seconds, but after that it is under 15 seconds.
Title: Re: Hello, people.
Post by: bigsofty on 2010-Dec-06
Yes, split your source into as many separate files, incredibuild only compiles the files that have been changed. Also, debug mode compiling is at least 50% slower, turn it off unless it's need.
Title: Re: Hello, people.
Post by: Moru on 2010-Dec-07
When I compile GLBasic recompiles everything now and then, even if I didn't change anything. Haven't found any pattern yet but haven't been looking for a while. I always run with debugging on so it's not that either :-)
Title: Re: Hello, people.
Post by: Slydog on 2010-Dec-07
I find that also, but rarely.

I took me a bit to realize it also fully compiles whenever you change / add a global variable anywhere, or modify / add a TYPE, or modify / change a CONSTANT anywhere.  This makes sense I guess because the change can affect all code.

But, what I still find is happening is that if I change a file, Incredibuild thinks that file hasn't changed.  It happens repeatedly with certain files, and never with others.  I have to hit the Debug button twice to force a full compile.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Dec-07
Odd - I've not had it happen since V8...
Title: Re: Hello, people.
Post by: com_1 on 2010-Dec-27
I'm sorry for interrupting "MrTAToad", but i have a question.

People who have the latest version "GLBasic".
As there is with the video command ? (you can play the video during the game or not ?)

I have "GLBasic 6.111", and there can only reproduce(playing) video file.
Everything (game) else is automatically stopped.

Why I do not use the new "GLBasic" version ?

Everything is very simple.
Everything works great without a "global", "local" or "static" commands in "GLBasic  6.111"
Title: Re: Hello, people.
Post by: Ian Price on 2010-Dec-27
TBH, you are losing a lot by not having the latest update of GLB - there are so many new additions and bug fixes over the 6.XX versions. There aren't however any additions to the movie playing side of things (IIRC), so you probably still won't be able to play a game over a movie backdrop (not that I've tried - I had success implementing a movie, but it wouldn't play on another machine due to a lack of codec, so this is iffy from the offset).

There is no logical reason to be so far behind with the updates/upgrades. It's just as stable now as it ever was, but now offers more features. The end .EXE isn't significantly enlarged as a result either.
Title: Re: Hello, people.
Post by: MrTAToad on 2010-Dec-27
QuoteAs there is with the video command ? (you can play the video during the game or not ?)
Only for WIndows unfortunately
Title: Re: Hello, people.
Post by: com_1 on 2010-Dec-28
Today (i will) downloaded and installed the last version.
Tomorrow will look at the "video" command.

Thanks for comments, people.

Gernot, why did you use commands "global, local" required ?
Title: Re: Hello, people.
Post by: Moebius on 2010-Dec-28
Although you generally shouldn't do this, it isn't REQUIRED that you use globals and locals...
If you really think you're better off without them, just go into Project->Options, untick 'Explicit Declarations' on the bottom left, and anything you don't define with a LOCAL will automatically be a global variable.  This also means that you won't exactly be conserving memory (or maximising speed from what I've heard about globals vs. locals), but you CAN get away with not using the LOCAL and GLOBAL commands...
Title: Re: Hello, people.
Post by: Moru on 2010-Dec-28
The reason why I want forced declarations is that typos in variable names will stop your compile and give you errors. Typo in a variable can give you hours of debugging later especially for those bigger projects where the error is not totally clear right away.

Also, if you don't force declarations local, they become global outside functions automaticly and this might not be what you intended all the time.
Title: Re: Hello, people.
Post by: Kitty Hello on 2011-Jan-10
global, local -> Project Options/Explicit declarations
Title: Re: Hello, people.
Post by: com_1 on 2011-Jan-19
Anyone can help me ?

Trying to build(create) a primitive "paint".
But it is necessary to know "C++" commands.

All that I managed to gather(create) with relatives of commands can be seen below.

Code (glbasic) Select

// Attention. No Global or Local
// Move your mouse and press left or right mouse button

// screen options
scrx = (320 * 2); scry = (240 * 2); SETSCREEN scrx, scry, 0;

// mouse options
SYSTEMPOINTER TRUE;


//______________________________________________________________________________________________
WHILE TRUE

// background
DRAWRECT 0, 0, scrx - 0, scry - 0, RGB(10, 20, 30);

// mouse
MOUSESTATE mx, my, mbl, mbr;

pencil();

SHOWSCREEN; WEND
//______________________________________________________________________________________________


//______________________________________________________________________________________________
FUNCTION pencil:

IF pe_dost = 0; pe_dost = 1;// dostup >

// dim
pe_max1 = 25; pe_max2 = 361;
DIM pe_x1[pe_max1][pe_max2]; DIM pe_y1[pe_max1][pe_max2]; DIM pe_r1[pe_max1][pe_max2]; DIM pe_x2[pe_max1][pe_max2]; DIM pe_y2[pe_max1][pe_max2]; DIM pe_r2[pe_max1][pe_max2]; DIM pe_col[pe_max1][pe_max2];

// options
a_max = 1; pe_im$ = "no";

FOR d1 = 0 TO pe_max1 - 1;// for >
FOR d2 = 0 TO pe_max2 - 1;// for >
// radius
pe_r1[d1][d2] = 1 + (d1 * 1);
pe_r2[d1][d2] = 1 + (d1 * 1);
// color
pe_col[d1][d2] = 10;
NEXT;// for <
NEXT;// for <

ENDIF;// dostup <


// press mouse - mbl
IF     mbl = 1 OR mbr = 1;
// start pos.
IF pe_sl = 0; pe_sl = 1; pe_xx1 = mx; pe_yy1 = my; pe_xx2 = mx; pe_yy2 = my;ENDIF;
// new pos.
pe_xx2 = pe_xx1; pe_yy2 = pe_yy1; pe_xx1 = mx; pe_yy1 = my;
ELSEIF mbl = 0 AND mbr = 0;
// new pos.
pe_sl = 0; pe_xx2 = -1000; pe_yy2 = -1000; pe_xx1 = -1000; pe_yy1 = -1000;
ENDIF;

// pos.
FOR d1 = 0 TO pe_max1 - 1;// for >
FOR d2 = 0 TO pe_max2 - 1;// for >
// pos. 1
pe_x1[d1][d2] = pe_xx1 + (pe_r1[d1][d2] * SIN(d2 * 1));
pe_y1[d1][d2] = pe_yy1 - (pe_r1[d1][d2] * COS(d2 * 1));
// pos. 2
pe_x2[d1][d2] = pe_xx2 + (pe_r2[d1][d2] * SIN(d2 * 1));
pe_y2[d1][d2] = pe_yy2 - (pe_r2[d1][d2] * COS(d2 * 1));
NEXT;// for <
NEXT;// for <

// sprite
IF pe_im$ = "yes"; DRAWSPRITE 1, 0, 0;ENDIF;

// image
IF     mbl = 1 AND mbr = 0;
ALPHAMODE (a_max / 10);
FOR d1 = 0 TO pe_max1 - 1;// for >
FOR d2 = 0 TO pe_max2 - 1;// for >
// image - white
DRAWLINE pe_x1[d1][d2], pe_y1[d1][d2], pe_x2[d1][d2], pe_y2[d1][d2], RGB((pe_col[d1][d2] * 1), (pe_col[d1][d2] * 1), (pe_col[d1][d2] * 1));
NEXT;// for <
NEXT;// for <
ALPHAMODE 0;
ELSEIF mbr = 1 AND mbl = 0;
FOR d1 = 0 TO pe_max1 - 1;// for >
FOR d2 = 0 TO pe_max2 - 1;// for >
// image - black (delete)
DRAWLINE pe_x1[d1][d2], pe_y1[d1][d2], pe_x2[d1][d2], pe_y2[d1][d2], RGB(10, 20, 30);
NEXT;// for <
NEXT;// for <
ENDIF;

// sprite
IF mbl = 1 OR mbr = 1; GRABSPRITE 1, 0, 0, (scrx / 1), (scry / 1); pe_im$ = "yes";ENDIF;

ENDFUNCTION
Title: Re: Hello, people.
Post by: MrTAToad on 2011-Jan-19
Dont see why C++ should be needed.  Never written a paint package unfortunately, so I cant help there.
Title: Re: Hello, people.
Post by: com_1 on 2011-Jan-20
Just help me analyze this example, please.
http://www.glbasic.com/showroom.php?site=games&game=Fluids&lang=de

Gernot assembled an excellent example, but it will not run if it is copy and paste it into your project.
Is only what he has compiled.
Title: Re: Hello, people.
Post by: MrTAToad on 2011-Jan-20
Going to take some time - quite a few compiler errors there :(
Title: Re: Hello, people.
Post by: Kitty Hello on 2011-Jan-20
The fluids example is very old code.

Add this at the top of the source:
Code (glbasic) Select

GLOBAL screenx, screeny
LOCAL mx, my,b1,b2
DIM dummy[0][0] // require at least 2D arrays with inline code


You can make this work these days without INLINE, using Polyvector!
Title: Re: Hello, people.
Post by: com_1 on 2011-Jan-20
Thanks for help.

With regard to the code (source).
Copied, pasted, by pressing F5 and it worked. (finally)

A question, what do you mean ?
Quote
You can make this work these days without INLINE, using Polyvector!

If I prescribe each point as an array then the computer just hangs.
In this case, such a scheme is not suitable.

scrx = 640; scry = 480;
max = (scrx * scry); dim x[max]; dim y[max];

for d = 0 max - 1;
sepixel x[d], y[d], rgb(250, 250, 250);
next;
Title: Re: Hello, people.
Post by: Kitty Hello on 2011-Jan-20
Why don't you:

-Make a DIM image%[xmax][ymax] // RGBA pixels
-Make a "Sprite" from that image MEM2SPRITE
-Draw that sprite

-> much faster than SETPIXEL.
-> Can zoom
Title: Re: Hello, people.
Post by: com_1 on 2011-Jan-21
If I understand correctly that command "MEM2SPRITE()" is a static.
And differs from the command "GRABSPRITE" can not handle real time. (dynamical texture)

I'm looking for a way to handle any object on the screen in real time.
Title: Re: Hello, people.
Post by: Kitty Hello on 2011-Jan-21
You can use MEM2SPRITE on every showscreen. It's quite fast, try it. It's the only way to draw accurate pixels and so.
You could also use CREATESCREEN and draw with DRAWLINE and DRAWRECT - depends on what you need.
Title: Re: Hello, people.
Post by: com_1 on 2011-Mar-14
Gernot, wanted to ask.
Someone is helping you in the creation and further development of language, or are you alone ?
Title: Re: Hello, people.
Post by: Kitty Hello on 2011-Mar-14
I have great help others. Especially from Trucidare.