View Full Version : qt: idea for general tb user tool
Lionheart008
12-03-2010, 19:17
hey all :)
dear thinbasic users,
only one idea to push for all users here:
I am interested in creating a common project (synergy) for/from thinbasic users. perhaps there is any useful tool all thinbasic users have common and general interests in mind, but there is always this "one-man-power-with-not-enough-time" problem to realize some ideas. I know every user has it's own dream or project in mind, but perhaps there is a "thinbasic-tool" which takes apart and like to all thinbasic users ? this is only a suggestion. what do you think about it ?
a common thinbasic user tool could be:
a) little 2d game
b) analyse tool (hardware) something like "clearprog"
c) graphic card test tool
d) antivirus software
e) little 3d game like "robot duel"
f) how to get more woman to thinbasic application ?
g) something I didn't know yet
h) weight watcher software...
i) special effect monster movie...
j) something for education and kids...
k) how to find right partner (woman) multiple choice software ?
l) ...
I don't know. I see there are a lot of active users with a lot of questions and ideas, but why don't save all knowledge to create a bigger tool and collect all power for one task ?
time limited task for about 3 month for example.
aim for this project. have fun with learning more about thinbasic. share knowledge. the tool would be for free and perhaps some more users get attraction to this great website and thinbasic language interpreter!
would be kind to get feedback for this idea. sorry, forgotten to say: you can win zero euro/dollar money to take part for this project and become a special member club id ;)
frank
Lionheart008
15-03-2010, 22:38
no feedback does it mean, go to trash bin and erase it all ? It was not good idea, isn't it ? ;(
so I stop this kind of ideas.
hmh, thought there are some guys they're having some good ideas and would like to work at a common project. that would help to make some more input to community to work together. so it's probably better to work on or going on everybody in everyone's own little cells with no view for new horizons. it was an idealistic attempt with no success.
it's a pity.
frank
Michael Clease
16-03-2010, 00:12
Frank perhaps you should lead by example, if you make a start on some programs and develop the framework for them then I am sure people will contribute in some shape or form.
Regards
Mike
christianssen
16-03-2010, 09:55
hi, good morning mr. lionheart.
yes, I agree to michaels advice, if you give some examples or a "frame" user can see what's direction. I like a) "dungeons game" with monsters, but I am free to learn new things. b) "soccer manager" isn't bad one. d) a "robot duel" like game I like too. I have a girl friend, but it's also good how to find the right woman for partnership (grinning) ;)
take your head and eyes up, don't give up, push community more with new ideas and give practical example. I help :) I like your varieties of ideas and enthusiasm!
maybe a poll about what kind of application "we can do" would help at later moment.
thanks, bye, denis
Michael Hartlef
16-03-2010, 12:50
Frank,
1) Are you talking about a tool for thinbasic or an app/game made with thinbasic? Imo a movie has nothing to do with thinbasic.
2) We have a small community and people react or don't react on a topic for various reasons. Live with it.
3) Your suggestions includes topics that are either problematic regarding a trademark/Copyright (weight watchers) or lead into problems regarding age/sexual (Women) interest. My advice is to stay safe and keep this out of here. We have younger members here plus some countries have a different ways of looking at things regarding sexuality or woman<->man relationships.
4) Regarding "so it's probably better to work on or going on everybody in everyone's own little cells with no view for new horizons. ": Wow, just wow. :shock: Please read your sentense again and start thinking. Can I just remind you what some people have achieved here, what they have FINISHED? Like for an example:
Charles: His awesome O2/Oxygen module
Petr: The TBGL module.
Kent: The Space background designer
Catventure: His great TAB application
Peter: Several games
Michael Clease: Uses TB at work
and more from other people.
Personally I am always willing to work with people who want to finish a project, have the same goal and stick to it. What I don't like are people who first sign up and then don't commit themself to a task and wander off.
@Christianssen: Your Soccer manager idea sounds interesting. And about the dungeon game, how do you envision it?
christianssen
16-03-2010, 13:48
hi michael, I don't know this community very close (only very short), but I think frank wanted to push the users here for a common project with positively aspects. The idea for a common project is good, isn't it? - He's often like comedian and makes some suggestions you can smile about it (that's good for me!) and it's good it's not too serious here in the world of male programmers. "new horizons", I can imagine, he does mean to make a project where all can profit from and learn new things. two men knows and see more than one person does in his home office. that's what I have understood with this sentences. and without any critics and new ideas world wouldn't turn around positively any more.
here in my school my responsible class teacher is very engaged and climbed every month new mountains with good ideas. first all were shocked or paralyzed, but after a while all students and other teachers see what happens with his engagement.
I've noticed there are always same five, six persons pushed this community with examples, ideas, informations, what I like here very much. I see this as newbie.
"soccer manager": I've seen an example some weeks ago, with soccer stars, an UI example. I think it was an example from frank, I am not sure. didn't know where, but it was a german soccer team with little thumbnails. I like the soccer manager games you can rule the team, earn money, buy new soccer player, see the german, english, italien, spanish, france soccer table with all teams and much more :) my friend has a soccer manager, very professional one, but I think of an easy lite version.
"dungeon game": no idea to realize, therefore my tbgl background isn't high, big enough. a dungeon with several rooms and levels with different monster, they are dangereous or peaceful, they attacks you or leads you to new doors where you can win something or get more power by for example mystery drink or something else. task could be to free a princess she's tied by a taurus monster ;)
I know there are a lot of members here they are passive users. it's ok. but it would be also good to see that a new project shows what's possible with thinbasic and other users get affected from this website to work with thinbasic.
bye, thanks for reply, denis
Michael Hartlef
16-03-2010, 14:06
Hi Denis,
I understand his sentence as that people here don't explore new ways. Well, just look at Oxygen or O2. I can not recall any intepreter that has someone like this. Or look at T.A.B. I think it is a unique and very powerful application. Saying that these people have no views isn't right. Or take Petr. He didn't ask constantly what he should build into TBGL. He just did it, no matter if his module is used or not. People with views and ideas just do it, no matter how rewarding it is afterwards. They finish something. So imho what Frank said, doesn't serve these people right.
Yes, trying to get something like this going is always good. You can learn from it, it drives a community or at least parts of it, it can help in so many ways. We had something like this here 2 times going. Sadly both failed for various reasons. Maybe this try will come out good.
My final guess is that Frank just starts something (like a poll for a project) and lets see how things come out. Just like i did with the last effort. We will see :)
How about that Frank? Start a topic inside the Team thinbasic thinStudio area if it is a game and let's see.
Lionheart008
16-03-2010, 19:35
hello all.
thanks denis and michael clease, michael hartlef for answer and nice or constructive critics. I accept this one. My aim wasn't to reduce power, respect and creativity from those guys they're here the main column of this community. I thought for example at other guys, they need some help or don't dare to make new project by different reasons. I know that the module maker are always busy and engaged. denis has shown in general supposed good direction of my thoughts, thanks to denis.
1) ok. my first part: something like "soccer manager", I have build this example for tom lebowski some weeks ago, thought it would help him for his project. you can delete everything or start new things with this example, doesn't matter. it's just an start point. If you have other opinions and suggestion for soccer game, no problem, I'd like to see it here too.
a) If you like this soccer idea: you will have to think about several points what this application should be good for. what about content, features, scoring points, soccer tables and much more. here we have to discuss for, that's for sure :) perhaps there's a way to make contact to professional soccer team or ask for permission if such things are allowed by rights/law to use Images of prof. soccer player.
1a) soccer game basis:
'----------------------------------------------------------------------
'------- testscript for GDIplus.dll from frank brübach (aka Lionheart) for Tom Lebowski, jan 2009
'----------------------------------------------------------------------
Uses "UI", "File"
%ButtonClose = 1001
%ButtonClone = 1002
%ButtonOpen = 1003
%Labelnew = 1004
%ID_V_SPLIT = 100
%ID_MenuTREE = 101
%ID_TEXT = 102
%ID_TEXT2 = 103
Global cPink As Long = Rgb(255, 0, 255) '---Color for image transparency
Global iList As Long = ImageList_New(Icon, 16, 16, 32)
If Uses("GDIP") < 0 Then
msgbox 0, "GDI+ lib not found"
stop
end if
Dim wWidth As Long Value 760
Dim wHeight As Long Value 600
Dim myBMPFileName As String
Function TBMain() As Long
'------------------------------------------------------------------------------
' Create dialog
'------------------------------------------------------------------------------
dim hDlg as dword
Dialog New Pixels, 0, "Soccer Manager: SV Werder_Bremen Soccer Club", -1, -1, wWidth, wHeight, _
%WS_DLGFRAME OR _
%DS_CENTER OR _
%WS_CAPTION OR _
%WS_SYSMENU OR _
0 TO hDlg
Dialog SET GRADIENT hdlg, %GRADIENT_FILL_H, RGB(Rnd(10,255+Sin(GetTickCount*118)/500),100,10), RGB(0,Rnd(10,100),250+Sin(GetTickCount*118)/500)
Control ADD BUTTON, hDlg, %ButtonClose, "Close all", 190, 540, 80, 24, Call close
Control ADD BUTTON, hDlg, %ButtonClone, "SV WerderBremen", 550, 20, 140, 36, Call close
Control ADD BUTTON, hDlg, %ButtonClone, "playerSelect", 100, 540, 80, 24
Control ADD BUTTON, hDlg, %ButtonClone, "loadPics", 10, 540, 80, 24
Control Add Button, hDlg, %ButtonClone, "Modify Data", 280, 540, 80, 24
Control Add Button, hDlg, %ButtonOpen, "OpenImage", 10, 570, 80, 24, Call openImage
Control Add Textbox, hDlg, %ID_TEXT2, "=> player Selected", 400, 20, 140, 36, _
%ES_LEFT Or %ES_WANTRETURN Or %ES_READONLY Or %ES_MULTILINE Or _
%ES_AUTOHSCROLL Or %ES_AUTOVSCROLL Or %WS_VSCROLL Or %WS_HSCROLL
'Dialog Set Image hDlg, myBMPFileName, %BK_DRAWMODE_STRETCH
Dialog Show Modal hDlg, Call dlgCallback
end function
'-------------------------------------------
CallBack Function dlgCallback() As Long
Dim hdlg2 As Long
Dim ImagesDir As String = APP_SourcePath + "Images\"
Dim JPGFileName As String = APP_SourcePath + "wirwollendich2009.jpg"
dim lWidth as long
dim lHeight as long
dim nFiles as long
dim sFiles() as string
dim Counter as long
dim x as long
dim y as long
dim cWidth as long
dim cHeight as long
Dim cForLine As Long
Dim hStatus As Long
Dim strFileName As String
Dim nFormat As Long
Dim strFormat As String
Dim hRoot As Long
Dim hItem As Long
Dim hBitmap, hGpBitmap, pThumbnail As Long
Select Case CBMSG
Case %WM_INITDIALOG
Dialog Get Client CBHNDL To cWidth, cHeight
Control Add TreeView, CBHNDL, %ID_MenuTREE, "DataView", 410, 60, 140, cHeight-200, _
%WS_CHILD | _
%WS_VISIBLE | _
%TVS_HASBUTTONS | _
%TVS_HASLINES | _
%TVS_LINESATROOT | _
%TVS_SHOWSELALWAYS , _
%WS_EX_CLIENTEDGE, Call cbTreeView
Control Add Textbox, CBHNDL, %ID_TEXT, "TreeView_Features included", 540, 60, 140, cHeight-200, _
%ES_LEFT Or %ES_WANTRETURN Or %ES_READONLY Or %ES_MULTILINE Or _
%ES_AUTOHSCROLL Or %ES_AUTOVSCROLL Or %WS_VSCROLL Or %WS_HSCROLL
TreeView_SetImageList CBHNDL, %ID_MenuTREE, iList
'------------------------------------------------------------------------------
' Create controls and Load images
'------------------------------------------------------------------------------
nFiles = DIR_ListArray(sFiles, ImagesDir, "*.*", %FILE_NORMAL Or %FILE_ADDPATH)
x = 5
y = 5
cForLine = 5
cWidth = (wWidth - (x * (cForLine + 2)) ) / cForLine / 2
cHeight = cWidth
for Counter = 1 to nFiles
Control Add Label, CBHNDL, %Labelnew + Counter, "", x, y, cWidth, cHeight, %SS_SUNKEN Or %SS_BITMAP
'---Create an image handle
hGpBitmap = GDIP_CreateBitMapFromFile(sFiles(Counter))
'---Get image W and H
lWidth = GDIP_GetImageWidth(hGpBitmap)
lHeight = GDIP_GetImageHeight(hGpBitmap)
'---Alternative way to get width and height directly from file:
GDIp_GetImageSizeFromFile(JPGFileName, lWidth, lHeight)
pThumbnail = GDIp_GetImageThumbnail(hGpBitmap, cWidth, cHeight)
'---Convert to a hBitbam handle
hBitmap = GDIp_HBitMapFromBitmap(pThumbnail)
'---Release GDI image
GDIP_DisposeImage(hGpBitmap)
GDIP_DisposeImage(pThumbnail)
hGpBitmap = Gdip_LoadImageFromFile(APP_SourcePath + "Images\wirwollendich2009.jpg")
Control Send CBHNDL, %Labelnew + Counter, %STM_SETIMAGE, %IMAGE_BITMAP, hBitmap
'---Release temp hBitmap
object_delete(hBitmap)
'Control SET RESIZE CBHNDL, 1001 + Counter, 0, 1, 0, 0
x += 4 + cWidth
if mod(Counter, cForLine) = 0 then
x = 4
y += 4 + cHeight
End If
next
End Select
End Function
'----------------------------------------------------------------------------
CallBack Function cbTreeView() As Long
'----------------------------------------------------------------------------
Local nmTV As NM_TREEVIEW PTR
Local hTreeItem As Long
Local hParentItem As Long
Select Case CBMSG
Case %WM_NOTIFY
'---Get the pointer of treeview notification structure
nmTV = CBNMHDR
'---Check what happen
Select Case nmTV.hdr.Code
Case %TVN_SELCHANGED
hTreeItem = nmTV.ItemNew.hItem
hParentItem = TreeView_GetParent(CBHNDL, nmTV.hdr.IdFrom, hTreeItem)
If hParentItem Then Control_AppendText CBHNDL, %ID_TEXT, " Its parent is: " & TreeView_GetText(CBHNDL, nmTV.hdr.IdFrom, hParentItem) & $CRLF, %TRUE
Control_AppendText CBHNDL, %ID_TEXT, " Item selected: " & TreeView_GetText(CBHNDL, nmTV.hdr.IdFrom, hTreeItem) & $CRLF, %TRUE
Control_AppendText CBHNDL, %ID_TEXT, "%TVN_SELCHANGED " & $CRLF, %TRUE
Case %NM_RCLICK
Control_AppendText CBHNDL, %ID_TEXT, "%NM_RCLICK " & $CRLF, %TRUE
Case %NM_DBLCLK
Control_AppendText CBHNDL, %ID_TEXT, "%NM_DBLCLK " & $CRLF, %TRUE
End Select
End Select
End Function
'--------------callbacks -----------------------------------
CallBack Function close() As Long
Select Case CBMSG
Case %WM_COMMAND
If CBWPARAM = %ButtonClose Then Dialog End CBHNDL
If CBWPARAM = %ButtonClone Then
MsgBox 0, "here you can find next bundesliga champion of 2010!", %MB_Iconinformation, "SV Werder Bremen best of the north!"
End If
Case %WM_DESTROY
MsgBox 0, "Window is to be destroyed."
End Select
End Function
'-----------players id ------------------------------------
CallBack Function openImage() As Long
Select Case CBMSG
Case %WM_COMMAND
If CBWPARAM = %ButtonOpen Then
MsgBox 0, "here you can find more Infos about player and soccer goals!", %MB_ICONINFORMATION, "SV Werder Bremen best of the north!"
End If
Case %WM_DESTROY
MsgBox 0, "Soccer face is to be destroyed."
End Select
End Function
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2) "dungeon game", I like this idea from denis too. but I have no start example at the moment, have to create something new or build such thing. there was a tbgl "dungeon game" by Petr some years ago, I can remember.
I think and work for this next days and show result here. If anybody has good advice, material or fixed example already for "dungeon" game, say it and we can discuss about it.
don't hesitate and give feedback if you have any ideas or constructive critics. thanks.
My final guess is that Frank just starts something (like a poll for a project) and lets see how things come out. Just like i did with the last effort. We will see Smile
How about that Frank? Start a topic inside the Team thinbasic thinStudio area if it is a game and let's see.
yes, good idea, michael. I will do that if some users has fun to take part these activities.
best regards, Frank
Michael Hartlef
16-03-2010, 19:46
My advice is to stay away from real names of players and clubs, away from real images and league names. They are all protected and need to be licensed. Using them without permission can get you in real trouble.
Lionheart008
16-03-2010, 19:52
yes, thanks, I know, it's a good idea. but I wanted only show an existing example.
Ok. We have to found a club like "fc hard bones" from New BoneCity from Graveland country. ;) or something else with new fantasy names...
Michael Hartlef
16-03-2010, 23:45
Well you don't need to be so creative. Maybe like
Club: Beiern Monchien
Players: Robbery, VonBunten, Roppän, etc.
Or
Club: Feier Cleventusen
Players: Rainer Adlig, Samuel Hippie, Kessing, Kress, etc.
That could work too. Also make the game modable, so anyone could change the names to their liking.
Michael Hartlef
17-03-2010, 10:03
@Denis: With the soccer manager, you ment a game, right?
And here you would like to use TBGL, or do you want to use windows UI elements?
christianssen
17-03-2010, 11:02
@Denis: With the soccer manager, you ment a game, right?
And here you would like to use TBGL, or do you want to use windows UI elements?
hello michael h.,
yes, a game mixing with ui features. so I would prefer something like tbgl with ui windows with button. but I haven't understood how to make player comes alive ? ;) you will use robots or imported models for soccer player ? I have no experiences with that at all.
@frank:
excactly that example I've seen some weeks ago during my search for tbgl and ui examples at this community. good start! but as I followed diverse topics here there is a good image library missing ? I am splitting with my decisions: today my vote is 50 per Cent for dungeon game and 50 per Cent for soccer game manager. a poll will be important.
info question: there must be a general question to all users, if they're liking to support such a project at all. how do you think about it? I have no lobby as new user so this must be a task for some of the leaders here ;)
bye, denis
Michael Hartlef
17-03-2010, 11:58
Personally I would not mix standard windows UI elements with a TBGL canvas inside a game. To me something like this looks not really like a game. But everyone should do it like they like it. Of course, you can get something working like that too, but I find it not visually attractive.
About visualizing the game play: You could try to do it in 3D, which would raise the effort to create decent graphics very much. There are several ways you could do animation within TBGL. With M15 models and bones, where you attach certain vertices to a bone. The disadvantage here is that you can only rotate a bone and entities are not usable with bones. At least not a good way. Then there is somewhere an MD2 DLL/Module, where you can use MD2 models.
But you could also do it in a very simple 2D approach where you have just a ball moving along a playfield depending on the state of the game. The very early manager games choosed this approach. Or just have a text output. I think for a start the last 2 approaches would be the easiest to implement.
There are many ways to do the visuals. It all depends on how the game should look like.
Michael Hartlef
17-03-2010, 12:02
but as I followed diverse topics here there is a good image library missing ?
I don't see that. Uncompressed Transparent TGA are supported out of the box. For PNG's I find the TBImage module working good for me.
ErosOlmi
20-03-2010, 12:20
Personally I am always willing to work with people who want to finish a project, have the same goal and stick to it. What I don't like are people who first sign up and then don't commit themself to a task and wander off.
My little contribution to this thread is just to say that admire the above post from Michael and I'm 100% with him.
My nature tend to attract me in many different areas and many different projects. I'm a curious human.
But on the other side I want the things done or at least done at a certain level of maturity, complexity, professional.
Many times the above two situations fight each other and when it happens I always try to give priority number 1 to the second trying to forget for a while my internal nature.
I think curiosity is one of the basic postulate for intelligence but alone will bring you anywhere.
Ciao
Eros
Lionheart008
29-03-2010, 10:57
here a little start example for 2d "soccer game" :)
this tbgl example is only simple basis demo. based on michael hartlef's collision 2d example with collision. if anyone has a better idea please show new one. I'm open for new tipps and advices. 1) hit space bar to hit the green rectangle field. 2) keys: a,w,s,d to move player in below field if you wish.
@michael: need one test example with fixed background (for a big soccer field I will find a picture) and same example I've used with my players.
best regards, nice day, frank
Michael Hartlef
29-03-2010, 20:39
Hi Frank,
look at the static background sample script in the Samples/TBGL/Sprites section.
My original sample script had a different screen ratio (800x600) but Petr changed it in the distribution to a square of 256x256.
Don't ask my why he did that. :shock: :?
What I did orignally, was that I created an image in the original screensize (800x600). Then I sized it down to a power of 2. By setting the base size of a sprite to the size of the screen, you will get almost the same picture like the original. If you can affort it you can also size the image up to the next power of 2. For an 800x600 it woudl be 1024x1024.
Of course there are other ways to do backgrounds too. Personally I would cut the background in tiles and then display several smaller sprites. I think it is also faster doing it this way.
Michael
Michael Hartlef
29-03-2010, 20:49
@michael: need one test example with fixed background (for a big soccer field I will find a picture) and same example I've used with my players.
Huh? Did you ment adding a soccer field to your sample script?
Edit: Btw. your sprit would be much easier to read if you would use variable and function names that make sence in the context. I get confused by seeing bullets and enemys inside a soccer script. :D
Petr Schreiber
29-03-2010, 21:25
My original sample script had a different screen ratio (800x600) but Petr changed it in the distribution to a square of 256x256.
Don't ask my why he did that.
Mike, as you say, the original bitmap was 1024x1024 TGA (big one, about 4MB).
That is the reason I downscaled it to 256x256 BMP as it has mainly illustrative purpose and alpha was not used there.
I sent you preview of new sample scripts structure on 1.3.2010 for approval (mail subject "New TBGL samples structure"), but as you didn't complained about my torture of your texture, I shipped it for TB preview sample scripts.
If you did not noticed it at that time and you dislike it, feel free to supply Eros with new version of example so it can be present in next TB release.
Petr
Michael Hartlef
29-03-2010, 22:00
If you did not noticed it at that time and you dislike it, feel free to supply Eros with new version of example so it can be present in next TB release.
Huh? Did you had a bad day?
I didn't thought that you would change the scripts itself. The purpose of this script was to show that you can use a texture with a power of 2 to display in a size ratio like 3x2 or something similar. Ego using it as a background. Now that you have changed the window size to a power of two the script doesn't fullfill its purpose anymore.
That you changed the size of the image isn't the problem. You changed it because the filesize was to big. I would have done the same.
If I would complain about something then it could be you do changes without commenting them or pointing to them. So I was wondering what the purpose of the script change was?
I sent you preview of new sample scripts structure on 1.3.2010 for approval (mail subject "New TBGL samples structure"), but as you didn't complained about my torture of your texture, I shipped it for TB preview sample scripts.
Yes, as you said. Script structure. I understand something like this as a reorganization of the sample scripts in folders. Not script changes.
This has nothing to do with you resizing the texture.
Michael
Petr Schreiber
29-03-2010, 22:14
Well, I did not noticed that, my bad! I will correct it to 4:3 (like 800x600 is). This is example of what happens when doing too much things at the same time.
This was not personal attack Mike, I just seen your sentence I quoted in my last post, so I explained why did I touched the script.
Thanks,
Petr