Jose's Read Only Forum 2023

General Category => Third-Party Add-Ons => Topic started by: Eros Olmi on June 14, 2009, 10:04:16 PM

Title: Little fun with thinGaming
Post by: Eros Olmi on June 14, 2009, 10:04:16 PM
Hi all,

if you have some spare time and would like to have some fun (hopefully), at thinBasic community forum we have created a new forum area called thinGaming (http://community.thinbasic.com/gaming/)

thinGaming (http://community.thinbasic.com/gaming/) is both a web site and a programming module for thinBasic. With thinGaming (http://community.thinbasic.com/gaming/) it is possible to have access to a dedicated web scoring site where to store scores of games created with thinBasic programming language.

thinBasic users have so far created 2 games: Astro Crusher (http://community.thinbasic.com/gaming/Game.asp?GameID=1&ScoresOrder=Sorter_ScoreValue&ScoresDir=DESC) (a classic arcade game) and Peg Solitaire (http://community.thinbasic.com/gaming/Game.asp?GameID=4&ScoresOrder=Sorter_ScoreValue&ScoresDir=ASC) (a puzzle board game). Just click on links, download the game you prefer and play. At the end, if you are connected to Intenet, your score will be sent to thinGaming web site.

More games will follow.
We will be happy to support those willing to develop some games with thinBasic. There are many thinBasic source code script available.
For example, thanks to the generosity of Michael Hartlef,  Astro Crusher game is available as thinBasic source code at http://community.thinbasic.com/index.php?topic=2738.msg20652#msg20652

Have fun.
Eros



Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 10:44:28 AM
Eros,

What about a direct link to download the latest thinbasic version that is a mendatory to try AstroCrusher?

I didn't find it on your site.

Thanks.

Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 10:58:12 AM
Hi Patrice.

Yes you are right but we are under beta testing phase of thinBasic beta 1.7.8.0.
You can find latest thinBasic beta here: http://community.thinbasic.com/index.php?board=176.0

In any case it is not necessary to have latest thinBasic to be able to play with Astro Crusher. Check game data at http://community.thinbasic.com/gaming/Game.asp?GameID=1&ScoresOrder=Sorter_ScoreValue&ScoresDir=DESC and follow download url. Every game we will release on thinGaming area will be listed with all necessary info on where to download and how to play.

Instead, in case of Astro Crusher game, the author, Michael Hartlef, has generously released it not only as executable but also as thinBasic source code.
If you want to test sources and check how it was written you need latest thinBasic mentioned above.

Ciao and thanks for the interest
Eros
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 11:04:49 AM
Eros,

Thanks for the link, i shall try it asap :)
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 11:16:29 AM
QuoteCan't play the engine sound file
D:\ThinBasic\SampleScripts\Sounds\engine.mp3

Better to put everything needed in the same zip file.

...
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 11:21:49 AM
Yes, again right.

This is the decision of the author. All needed media files are available in the bundled ZIP of the EXE version. I suppose he did this in order to save space.
I will ask the author to put all in one place also for the source code version.

So for the moment if you want test source code version, download the EXE version into a new directory. There you will have all media files. Than download source code version and put the source in the same directory.

Eros
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 11:27:29 AM
Asked: http://community.thinbasic.com/index.php?topic=2738.msg20694#msg20694
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 11:36:07 AM
Eros,

I am unable to find the EXE version, too much places to search on your forum.
Having everything into the same ZIP file is the best solution.

So far i am giving up...

Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 11:55:26 AM
Ok,

go into thinGaming web site at http://community.thinbasic.com/gaming/
Click on Astro Crusher game link to go into the game info
On the right you will find download instructions (if any) and a link to the download url.

Hope it is more clear now. All will be in thinGaming web site (http://community.thinbasic.com/gaming/) site.
Forum is mainly for supporting thinBasic development, source code handling and users.

But thanks for your indications because it means it is not so clear how to move around so we need to improve navigation and info layout.

Ciao
Eros
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 02:29:45 PM
Eros,

Even following your instructions, i can't get the script file to work.

See the attached screen shot.

...
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 02:49:05 PM
General consideration about thinBasic.

This has been the first time i am playing with it.

I must say that i am very impressed by the amount of work that has been put there.

Petr's TBGL examples are just amazing, perhaps a good candidate to translate in full PB's code to post here ;D

Eros,

Your thinBasic project have many similitudes with the PC-Soft WinDev L5G, both are based on script file and the resulting exe is p-code embedded into a "universal" run time exe, that is provided with a large frame work (DLLs) to address specific tasks.

Now the main step to go is to create a nice visual designer, add a sql database engine, and you will get a true L5G  ;)

...
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 03:00:30 PM
Quote from: Patrice Terrier on June 15, 2009, 02:29:45 PM
Eros,

Even following your instructions, i can't get the script file to work.

See the attached screen shot.

...


;D that's why I asked to execute the bundled EXE because the source code version takes advantages of the last minute version of Petr TBGL module (OpenGl module for thinBasic) still not released to the public and in which Petr and Michael added a new way of handling fonts in 2D and 3D environments.

In the bundled EXE version all needed libraries are already there so the application will work.

Anyway, if you still want to try from the sources, download the attached thinBasic_TBGL.dll module and put it into \thinBasic\Lib\ directory replacing your current one. Than you should be able to work with Astro Crusher script from the sources.

Ciao
Eros
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 03:12:12 PM
Quote from: Patrice Terrier on June 15, 2009, 02:49:05 PM
General consideration about thinBasic.

This has been the first time i am playing with it.

I must say that i am very impressed by the amount of work that has been put there.

Petr's TBGL examples are just amazing, perhaps a good candidate to translate in full PB's code to post here ;D

Eros,

Your thinBasic project have many similitudes with the PC-Soft WinDev L5G, both are based on script file and the resulting exe is p-code embedded into a "universal" run time exe, that is provided with a large frame work (DLLs) to address specific tasks.

Now the main step to go is to create a nice visual designer, add a sql database engine, and you will get a true L5G  ;)

...

Thanks a lot for your words.
Yes, we have put a lot of efforts in thinBasic since 2004 and we will continue.
Almost all code is Power Basic written.

Regarding Visual Designer it will be a must in next months. We would like to create it as a shared source code project in order to be able to natively take advantages of the many thinBasic controls peculiarities.

On SQL Databases, thinBasic is distributed with Josè ODBC wrapper library so you can already use any ODBC compliant DB from inside thinBasic. There are few examples in \thinBasic\SampleScripts\ODBC\ directory to have a look.

A last note: thinBasic is a modular language. thinBasic modules are like plug ins that are automatically used by thinBasic when requested by a script. Everyone can create thinBasic modules using thinBasic SDK. It is quite easy for those already using Power Basic compilers and it is quite easy also for those using FreeBasic. Check \thinBasic\SDK\ directory. There is a zip file containing thinBasic modules examples in various languages.

Ciao
Eros
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 03:15:57 PM
Quote from: Patrice Terrier on June 15, 2009, 02:49:05 PM
Your thinBasic project have many similitudes with the PC-Soft WinDev L5G, both are based on script file and the resulting exe is p-code embedded into a "universal" run time exe, that is provided with a large frame work (DLLs) to address specific tasks.

Forgot to say, thinBasic does not produce any p-code even when EXE are created.
Scripts are only obfuscated to add some kind of security level but during runtime script is de-obfuscated and interpreted on the fly from the original source code text.
thinBasic runtime is fragmented in modules. When an EXE is created, only the needed modules are incorporated into the bundled exe reducing a lot the size of the final application.

Ciao
Eros
Title: Re: Little fun with thinGaming
Post by: Petr Schreiber on June 15, 2009, 03:16:42 PM
Hi Patrice,

thanks for the nice words.

For more TBGL examples, you can try "Bonus Pack":
http://www.thinbasic.com/index.php?option=com_jdownloads&Itemid=95&task=view.download&cid=6

It contains some real time glow, shaders, particles and other topics.

I am currently enjoying writing high performance background thinBasic module in PB ( PB9 is awesome ) and use it from ThinBasic.
That gives me true freedom - I can put examples together very fast in ThinBasic ( no compilation, immediate execution, some nice high level commands ), and at the same time rely on fast functions provided by PowerBASIC DLL.

Some of the technologies might appear in PB only form in future ( like the MD2 library I released this year ). One thing which prevents me from doing so is that I could not give proper support now due to limited time.


Petr
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 03:45:29 PM
Petr,

I am downloading it asap ;)


Another general consideration:
When i see what some of us are able to achieve, while each of us is working in his little specific sphere, i come to dream to what we could do puting together our talent(s).  ;D

...  
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 03:52:22 PM
Quote from: Patrice Terrier on June 15, 2009, 03:45:29 PM
When i see what some of us are able to achieve, while each of us is working in his little specific sphere, i come to dream to what we could do puting together our talent(s).  ;D

Agree 100%.

And if you read the very first page in thinBasic at http://www.thinbasic.com/ "About programming passion" you will see I stated just that some years ago. That's why thinBasic is modular. I cannot do all by myself even if I would have nothing else to do. But putting together different passions in different areas something impossible can come true. And I was really lucky and honored to have found some programming friends in my thinBasic adventure.

Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 04:54:58 PM
Eros,

I have looked at your SDK template, but didn't understood very well how to use it with an existing DLL, for example GDImage.
Does we have to create a specific one using your template, or can we use already an existing Win32 DLL?

Petr,

I spent more than one hour testing all your examples, so far the only one that didn't work was "PlasmaTunnel.tbasic".

By the way, i would love to see "Tornado" turned into a BBPlugin  :)

I like also very much the effect of water you have done in  "WaterWithSky", especialy when the orientaion is close to horizontal.

...
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 05:16:43 PM
Quote from: Patrice Terrier on June 15, 2009, 04:54:58 PM
Eros,

I have looked at your SDK template, but didn't understood very well how to use it with an existing DLL, for example GDImage.
Does we have to create a specific one using your template, or can we use already an existing Win32 DLL?


Patrice,

maybe you can have a look at TBJ (thinBasic Journal) at http://community.thinbasic.com/index.php?board=160.0
In issue number 2 I made an introductory article on creating thinBasic modules. See if it can help.

I'm at work at the moment so I cannot reply in details but later this night I can give more info.

In order not to abuse too much of José forum about specific thinBasic issues, if you are interested, please feel free to write into thinBasic SDK dedicated forum at http://community.thinbasic.com/index.php?board=38.0 There is a Power Basic dedicated area.

Just to give you already a few detailed reply: thinBasic modules are standard WIN32 dll but with a specific set of functions. You have to follow my template for what concerns the presence of "LoadLocalSymbols" and "UnLoadLocalSymbols" but for the rest you are free.
Consider that thinBasic does not produces pCode so the module creator is responsible and free in creating to define the command syntax so the module author has to parse the new thinBasic commands he wants to creates the way it prefer using the many function thinBasic SDK exposes.

My suggestion is to start from the template and create a new one starting simple. Than when you have got the main picture ... well the limit will be your fantasy but ... you have sooooo much  ;)

See you later.
Eros
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 15, 2009, 10:55:07 PM
Patrice,

I had some time to create a demo thinBasic module for you on the area you are the guru: GDI+

How to check it.

If you want to see if thinBasic module creation can be in your range of interests, check GDIP module sources "thinBasic_GDIP.bas"
Check TBJ issue number 2 at http://community.thinbasic.com/index.php?action=dlattach;topic=2310.0;attach=3826
At page -32- I've written an introductory article on how thinBasic modules are internally organized and how to create your first thinBasic keyword.

The above can hopefully give you a start.

And of course if you need more info, just ask.

Ciao
Eros


Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 15, 2009, 11:59:06 PM
Eros,

Thank you, i shall give it a try.

Petr,

I have translated "PlasmaTunnel" into a BBPlugin  :)

...
Title: Re: Little fun with thinGaming
Post by: Petr Schreiber on June 16, 2009, 09:54:39 AM
Plasma tunnel is very nice,

it was done by Matthew in TB, I have seen it in other languages too.
It is very hypnotic :)
Title: Re: Little fun with thinGaming
Post by: Patrice Terrier on June 16, 2009, 11:33:55 AM
Petr,

Indeed i was not able to run "PlasmaTunnel" because of error, the one i have turned into a BBPlugin is "Tornado" however with many changes ;)

I shall post it there in a few minutes under the name of "Vortex".

...
Title: Re: Little fun with thinGaming
Post by: Petr Schreiber on June 16, 2009, 10:35:21 PM
Hi Patrice,

yes, there is error caused by DIM <variable> without type. I will talk to Eros whether we will continue to support this syntax or not.
If not, I will correct the examples.


Petr
Title: Re: Little fun with thinGaming
Post by: Eros Olmi on June 16, 2009, 11:01:10 PM
Found
I've recently introduced a bug when added parsing for pre type declaration.
Example:
LONG MyLong
that is equivalent to
DIM Mylong AS LONG

Fixes will be present in next release.

Eros