View Full Version : TAB Alpha Release 23
catventure
13-03-2007, 14:47
Hi,
A new release to bring into line with thinbasic 1.3.0.0
13 Mar 2007 (Release 23)
===========
* The FOR/NEXT nesting bug is now fixed (thanks Eros)
* Some minor improve tweaks
* #MINVERSION set to 1.3.0.0
* thinBundled version of TAB Player and all current game datafiles
(for non-thinbasic owners to try out)
http://tab.thinbasic.com
Regards,
catventure
ErosOlmi
13-03-2007, 16:08
Hi catventure,
you are the first using thinBundle. Thanks.
We will try to give thinBundle more power and more user friendly autodiscover dependancy.
But what about Tab Editor and Tab Updater?
Ciao
Eros
catventure
13-03-2007, 16:48
Hi Eros,
I'm thinking maybe a separate download thinbundled zip for the Editor... as it is a separate script and contains also the Player..
This would be for those interested in building/making a TAB game.
I suppose the TAB_Updater would need also to be a seperate exe file if using thinbundle...?...
Maybe when thinbundle gets better I can include all three and 'share' the bundled modules and dll??
Cheers,
catventure
ErosOlmi
13-03-2007, 16:51
Ok, good. Up to you application decisions.
I'm just so happy about this version.
Thanks a lot.
Eros
Petr Schreiber
13-03-2007, 19:18
Hi Catventure,
good to see new release !
I think releasing the EXE distro is good idea,
people will get insane from what can be done in thinBASIC without need to install it ( which can by "psychical" block for someone ).
Sooner or later ... they will visit thinBASIC download section ;D
Perfect,
Petr
Petr Schreiber
13-03-2007, 19:25
Catventure,
I have idea if you have time.
In player, I think the open dialog could jump right into "Games" directory, it would save user one click which means 50% more life to mouse button than now ;D
Thanks,
Petr
catventure
13-03-2007, 21:34
Thanks Petr,
Had that on my list of "meant to do that" for Player :)
Will put in next time.
Regards,
catventure.
I need to see a thinBundle video tutorial if you guys can make one. I tried adding a folder and nothing happened.
Would really love to see how we can use this great feature!!
Thanks will download the latest TAB catventure.
ErosOlmi
14-03-2007, 08:38
Ken,
folder adding is not yet supported. Roberto is working on it, not easy task but confident we will have it.
You need to add manually the needed file and all must be in the same directory for the moment.
Try to make a simple exe with just source script and one or two modules.
I will make a tutorial as soon as I will have some time.
Eros
Oh OK, no need for a tutorial then as I thought I was doing something wrong when the folder add wasn't working. Sorry I misunderstood and thought thinBundle was complete in this last release. And when I saw Catventure had it going I thought he had to use folders to organize all of that. Well wrong I am again :)
ErosOlmi
14-03-2007, 11:13
catventure chooses to have small EXE and all supporting material in directory inside ZIP file instead of having a big EXE with all inside. I think this is a good choice and my preferred one: small exe and all media meterial around. This option gives also the possibility to users using application to have a look at application structure. For example in catventure TAB application, if you will have TAB designer you will be able to personalize stories.
In any case, when thinBundle will have directory bundled option this choice will be a user choice.
Ciao
Eros
Thanks for clarification Eros.
catventure
15-03-2007, 19:34
Hi,
Special Request:
Could any XP owner please report if the 2 bitmap pics show up in the "graphic_demo.tab" adventure when it is run in the TAB Adventure Player?
I tried on my brother's XP today and there seemed a problem - sometimes the beginning location pic did'nt show other times the pic never showed in the box below that one. Both should be showing and the top one should change when moving between adventure locations.
Thanks. Seems Ok on 98/2000/ME.
http://tab.thinbasic.com/TAB_ALPHA_DEMO.zip
Regards,
catventure.
I've got XP and it works fine on my System. :)
Michael Hartlef
15-03-2007, 19:49
Not sure about the 2 pics, I see so many. But only one at a time.
Update...
The First time I used the Programme it worked, both pictures appeared and the top one changed whenever you moved.
But now the top picture has stopped appearing. :P
Michael Hartlef
15-03-2007, 20:28
Ok, tested more and sometimes it shows both pictures, sometimes, only the top one, sometimes none of them.
catventure
15-03-2007, 20:32
Thanks Matthew, Mike.
That confirms what I saw earlier today...
It's strange but works Ok without problem on 98/Me.
Weird!
catventure
Michael Hartlef
15-03-2007, 20:35
Another bug with the player,
I load in several times the graphic adventure. After a while, thinBasic crashes while reloading the game.
Michael
catventure
15-03-2007, 20:37
Thanks Mike,
I will see if I can duplicate that crash.
catventure.
Michael Hartlef
15-03-2007, 20:41
Only with the graphic adeventure it does that I think.
catventure
15-03-2007, 20:45
Hi Mike,
I cannot duplicate the crash thru continuous reloading the graphic demo... Am using Win98.
Maybe something in the way XP handles graphics clearing?
Thanks,
catventure
Michael Hartlef
15-03-2007, 20:55
Could be, definately something Eros has to look into.
catventure
15-03-2007, 21:40
I'm using the method in the LoadImage example in Samplescripts/UI and deleting the images when the program ends or before a new image is reloaded... but I know this was really a temporary thing until Eros looked at it more until working on some alternatives.
It would be great if we had some kind of CONTROL ADD IMAGE command in TB and would accept jpg,bmp, gif etc! :)
Regards,
catventure.
Petr Schreiber
15-03-2007, 21:45
Hi catventure,
what about Eros sample with listview (http://community.thinbasic.com/index.php?topic=619.msg3465#msg3465).
It works on similar principle, but maybe it could be used for this task ?
Bye,
Petr
catventure
15-03-2007, 21:57
Hey, that's a neato example!
Had not seen that before. looks really very nice and effective.
Thanks, Petr. I'll look more into code for that.
catventure
ErosOlmi
15-03-2007, 23:52
Hi all. Yes, it is something I need to look at.
I suppose it is something related to internal resource handles.
I will have a look.
Method mentioned by Petr uses a listview to get background capability of that object. It can use image formats other than just BMP.
Can be an alternative but in some way we have to find a way to use read specific control image.
I also attached a more simple example. It was my first temp way to get images on screen. Hope it can help too.
Ciao
Eros
catventure
16-03-2007, 14:21
Hi all. Yes, it is something I need to look at.
I suppose it is something related to internal resource handles.
I will have a look.
Hi Eros,
I can probably adapt code in your example to use in TAB..
Instead of using LABEL control with LoadImage maybe convert to using same size listview controls instead. One thing not sure of... After image file is displayed do I need to delete the image before replacing with another image or is no need to use deleteimage with this method to remove from memory?
catventure
Just wondering
ErosOlmi
16-03-2007, 15:24
Good question I do not have the answer right now.
I need to check Microsoft documentation.
catventure
19-03-2007, 00:02
Hi,
If I use listview control to show images like in Eros example inside TAB (graphic adventure) I would like the adventure author to be able to use different image formats (file extensions) for the various pictures required eg: location graphics for rooms 1-4 might be:
loc1.bmp
loc2.jpg
loc3.png
loc4.gif
How can I make the prog load the file irrespective of the file_ext ?
uses "FILE"
uses "UI"
TYPE LVBKIMAGE
ulFlags AS DWORD
hbm AS DWORD
pszImage AS ASCIIZ PTR
cchImageMax AS DWORD
xOffsetPercent AS LONG
yOffsetPercent AS LONG
END TYPE
%LVM_FIRST = &H1000
%LVBKIF_SOURCE_URL = &H00000002
%LVM_SETBKIMAGE = %LVM_FIRST + 68
%ID_LISTVIEW = 1000
GLOBAL pic as string
global hdlg as dword
FUNCTION PBMAIN() AS LONG
local Msg AS LONG
local wParam AS LONG
local lParam AS LONG
LOCAL lvbi AS LVBKIMAGE
LOCAL szFile AS ASCIIZ
DIALOG NEW 0, "Test Picture Loading", 0, 0, 200,200, %WS_OVERLAPPEDWINDOW TO hDlg
'---Save dialog size/client
DIM lx, ly, wx, hy AS LONG
DIALOG GET SIZE hdlg TO lx, ly
DIALOG GET CLIENT hdlg TO wx, hy
CONTROL ADD "syslistview32", hDlg, %ID_LISTVIEW, "", 5, 5, wx - 10, hy - 10, %WS_CHILD OR %WS_VISIBLE
' If listview controls can be loaded with different image formats,
' how can I check if the adventure author has made an image file named
' "tramonto" that may have a file extension other than ".jpg" ??
' I want TAB to be able to load the image file irrespective of
' image file extension.
' Is there a simple way of determining this??
pic=APP_SOURCEPATH + "Tramonto.jpg"
if file_exists(pic) then
szFile = APP_SourcePath & "Tramonto.jpg" & CHR$(0)
'---Here we fill LVBKIMAGE structure elements
lvbi.ulFlags = %LVBKIF_SOURCE_URL
lvbi.pszImage = STRPTR(szFile)
lvbi.cchImageMax = LEN(szFile)
CONTROL SEND hDlg, %ID_LISTVIEW, %LVM_SETBKIMAGE, 0, varptr(lvbi)
end if
'---Show dialog in MODELESS state, the only managed state at the moment
DIALOG SHOW MODELESS hDlg
'---Message pump loop
WHILE IsWindow(hDlg)
'---Get the message and fill wParam and lParam
Msg = GetMessage(hDlg, wParam, lParam)
'---Now test the message
SELECT CASE Msg
case %wm_initdialog
'---Automatic resizing control
'control set resize hDlg, %ID_LISTVIEW, 1, 1, 1, 1
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
CASE ELSE
END SELECT
WEND
'---Close the dialog
DIALOG END hDlg
end function
call PBMAIN
ErosOlmi
19-03-2007, 00:43
catventure,
2 solutions in one reply ;D
Please see attached example.
How to change image in a "syslistview32" and a little function to respond to your question on how to load image file regardless of file type.
Regarding changing image on the fly to "syslistview32" it seems fine and memory handling is automatic by the control (I mean releasing previous image buffer and load new one).
Regarding file load and file extension, it is just an example. You can adopt different solutions. But in general you cannot demand to the engine what file to load but you have to write your own function.
So I have create a function in which topass the fixed part of the file name and a string variable containing the possible extensions and the sequance to follow for searching. It will check if file exists and if yes will return full file name.
Ciao
Eros
Neat example, that is neat how listview can show all those formats!
catventure
19-03-2007, 09:06
Hi Eros.
Am downloading example now. I have to go out today but will study and report back later...
Good to hear about automatic memory release when picture replaced/overwritten in "syslistview32" control. Thanks for your speedy response!
Cheers,
catventure
catventure
19-03-2007, 17:19
Hi Eros,
Great example and also agree with kryton9 - nice to see this can be done. Also neat explanatory function of how to handle file loading thru special function. With that it is very easy to add any other image types quickly. I tried to figure it and got on the wrong track completely with filepath equates... but I can see this is a very good way of accomplishing what I wanted it to do. So thanks for that.
I will incorporate into TAB for next release to solve the graphic problem on XP.
Regards,
catventure.
ErosOlmi
19-03-2007, 17:41
Perfect.
Just to give other users a view of what we are talking about:
function GetImage(fName as string, PossibleExtensions as string) as string
local Counter as long
local MaxCount as long
local fFullName as string
local sExtensionArray() as string
'---Parse the passed extensions filling local array of extensions and returning number of extensions found
MaxCount = PARSE (PossibleExtensions, sExtensionArray, ",")
'---Loops for every extension and check if file exists
for Counter = 1 to MaxCount
fFullName = fName & "." & sExtensionArray(Counter)
if file_exists(fFullName) then
function = fFullName
exit for
end if
next
end function
'...Function can be executed in the following way:
DIM FileName AS STRING VALUE GetImage(APP_SourcePath & "Test001", "jpg,png,bmp,gif")
'...Function will search for the following files. It will return the first found.
'...TEST001.JPG
'...TEST001.PNG
'...TEST001.BMP
'...TEST001.GIF
Simple is better :D
catventure
21-03-2007, 11:38
Hi,
I seem to have the graphics working OK using "syslistview32" control :)
Is there by any chance a LV equate similar to label equate %SS_CENTERIMAGE ?
I was thinking it would be good to 'center' any pics which were used in TAB graphic game that were larger(or smaller) than the listview control fixed size..
Thanks,
catventure
ErosOlmi
21-03-2007, 12:13
When filling LVBKIMAGE structure add the following 2 lines of code:
lvbi.xOffsetPercent = 50
lvbi.yOffsetPercent = 50
Here Microsoft documentation of the structure: http://msdn2.microsoft.com/en-us/library/ms670562.aspx
Offset will work only if lvbi.ulFlags has %LVBKIF_STYLE_NORMAL as one of the parameters.
Let me know if it works.
Ciao
Eros
ErosOlmi
21-03-2007, 12:45
catventure,
also worth to mention setting background color of LV.
Example:
'---Add the following LV message equate to declaration area
%LVM_SETBKCOLOR = %LVM_FIRST + 1
'---Somewhere in you code where appropriate
CONTROL SEND hDlg, %ID_LISTVIEW, %LVM_SETBKCOLOR, 0, rgb(255,0,0)
Ciao
Eros
catventure
21-03-2007, 14:04
Hi Eros,
Yes. That worked just fine - pics now centred. Good.
Worked without:
lvbi.ulFlags having %LVBKIF_STYLE_NORMAL as one of the parameters.
szfile = GetImage(APP_SOURCEPATH + gfxfolder + "loc" + TRIM$( STR$( startloc )),sPossibleExtensions) & CHR$(0)
IF FILE_EXISTS( szfile ) THEN
'---Here we fill LVBKIMAGE structure elements
lvbi.ulFlags = %LVBKIF_SOURCE_URL
lvbi.pszImage = STRPTR(szFile)
lvbi.cchImageMax = LEN(szFile)
lvbi.xOffsetPercent = 50
lvbi.yOffsetPercent = 50
CONTROL SEND hwnd, %ID_LISTVIEW1, %LVM_SETBKIMAGE, 0, varptr(lvbi)
END IF
I'm happy it works.
Also thanks for tip on changing Listview control background color.
catventure
21-03-2007, 14:37
Hi,
FYI, the following code I found out will delete/remove an image from the listview control:
lvbi.ulFlags = %LVBKIF_SOURCE_NONE
CONTROL SEND hwnd, %ID_LISTVIEW1, %LVM_SETBKIMAGE, 0, varptr(lvbi)
catventure.
ErosOlmi
21-03-2007, 16:24
Perfect catventure.
I've the impression your next TAB version will be a milestone!
Just to let you know, we continue to have a lot of access coming from your web site at http://tab.thinbasic.com
And your web site continue to have a lot of access from http://www.ambrosine.com/resource.html
TAB_ALPHA_DEMO.zip has been downloaded 108 times in 20 days. Do you have any return from this? I mean any info by users, mails, contact or whatever?
At first I had the impression it was some automatic connection but I can see a lot of different IPs so seems real users.
Bye
Eros
catventure
21-03-2007, 16:49
Hi Eros,
As yet no inquiries from visitors...
I've also added some info about TAB to the ifwiki (interactive fiction wiki)
http://www.ifwiki.org/index.php/ThinBASIC_Adventure_Builder
I also listed TAB and "PiggeryJokery" under their recent events page so maybe some hits from there too :)
catventure
ErosOlmi
21-03-2007, 16:53
Yes, I know aboutifwiki.
I've just sent you a mail with stats. See if something strange from your side.
Check "Connect to site from ..." area.
Ciao
Eros
catventure
21-03-2007, 17:17
Hi Eros,
Very interesting stats. I've been to the part you mentioned but dunno what you mean......?
catventure
ErosOlmi
21-03-2007, 17:29
Just to give you some more info of what I normally do once a week.
Our web server is on a dedicated hardware computer. I usually check all about it from remote: system logs, web stats logs, AV logs, mail logs and so on.
So looking more than 1800 access from the same referrer while till last month there was just few, it is something I would like to understand. Why I want understand? Nothing more than understanding if something is getting wrong. Our badwidth is not unlimited so I need to understand if we need more (so I have to pay for it) or is is only something temporary or we are under some kind of attack (there are many).
I'm happy if you have so many access but I will not be so happy if I discover that those access are done by automatic machines or automatic scripts.
As you may be aware, there are thousands of web sites selling Google ads clicks that makes fake web sites and make fake downloads and access only to say that there was many access driven by their servers while in reality they have just automatic fake connections.
Anyhow, I will continue to monitor it and let you know.
Ciao
Eros
catventure
21-03-2007, 18:50
Hi Eros,
Ok. I see. Thanks for explanation. I also check tab site counter stats - (set now to unique hits only)
Stats really jumped high in March; I think due to link on Ambrosine's game resource link.
Regards,
catventure
ErosOlmi
21-03-2007, 19:02
Yes, I noted that jump too.
Well, I will continue to monitor and send you stats.
If all are real users I will be very happy for both: TAB and thinBasic.
Ciao
Eros