Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: New text adventure

  1. #11
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    Here is example showing a video playing of "The Hobbit" text adventure game solution in TAB.
    It's autoresized to fit in the lower graphicbox using code above.


    Regards,
    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  2. #12
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,083
    Blog Entries
    5
    Rep Power
    725
    Hi Phil,

    is this text game inside text game? Or is it video, what is played?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #13
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    Hi Petr - LOL! Yes it is a youtube video playing only. I converted it to a .wmv format and put in the graphics directory.

    But I wanted to show that my code I listed from the previous reply works on Windows Vista - but for some reason the videos don't size properly on other windows! I don't know why. I know you had a hand in updating the mcivideo.INC some time ago. Have you any idea yourself? Thanks.
    Can you cast an eye over the code I posted and detect if I did something wrong when calling the video routines for placing and sizing the video?

    catventure (Phil)

    ****My thought now is that of course it requires the "winmm.dll" to be present in the users system32 folder! If is not there well the include file cannot access. Petr, would the mcivideo.INC still in fact work on windows 7 or 10?
    I want my program to work on all windows from XP onwards that why I am still using older version of thinbasic to keep compatibility with XP.
    Last edited by catventure; 18-06-2020 at 23:02.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  4. #14
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    Today, I updated the gfx demo. This time showing the vertical graphicboxes.
    Video will play after the first input command is entered in the lower input textbox. eg: "look" (without quotes)


    If anyone wants to try here it is at same link:
    http://tab.thinbasic.com/Gfx_Adv_Demo.zip


    **Special Note: When starting the program(s) it's possible that some virus checkers may produce a "false-positive" warning. You may need to tell your antivirus software to create an 'exception' for the game app(s) in order to allow it to run**


    Please let me know if the picture displays Ok and if the video plays and is positioned and sized correctly in the lower graphicbox and what system you are running it on. Thanks again for your cooperation..


    Regards,
    catventure
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  5. #15

    Smile

    Hi Catventure !

    Click image for larger version. 

Name:	Capture1.JPG 
Views:	34 
Size:	89.4 KB 
ID:	10222

    • The video is still cropped.
    • The window is still modal.
    • I can't take a screenshot while video is playing.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  6. #16
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    Hi directuX,

    Thanks for your report about the video not positioned/sized correctly - much appreciated!

    First thing I notice is that the image in the lower graphicbox is not showing correctly - so I investigate that today.

    Yes - I did a dialog disable to stop player using mouse on window or moving window or accessing menues while a video is playing which might have cause display problems... After it stops either by video ending or user pressing <ESC> key then the Dialog Window is enabled again to await player input.
    Thank you for testing - It seems the titlebar text is displayed centrally on your 'theme' while on mine it is left aligned.

    Regards,
    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  7. #17

    Question

    Quote Originally Posted by catventure View Post
    Yes - I did a dialog disable to stop player using mouse on window or moving window or accessing menues while a video is playing which might have cause display problems...
    I can understand your window becoming non-interactive. I feel it bad being trapped. Can't you disable T.A.B. interactiveness only; leaving Alt-TAB possible ?
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  8. #18
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    I changed the listview setbackimage in my program from

    ListView_SetBkImage hwnd, %ID_LISTVIEW1, szfile, %LVBKIF_SOURCE_URL, 50, 50

    to

    ListView_SetBkImage hwnd, %ID_LISTVIEW1, szfile, %LVBKIF_SOURCE_URL, 0, 0

    so it now places images using X, Y values of 0,0 (top left co-ords of the control)

    That might make a difference...

    In regard to the video placement, I realise that my dialog is created with dialog units and not pixels. That is why I had to double the twidth and theight vars to get it to show right on mine eg:

    OpenMovie( hCanvas, filename )
    PlayMovie( )
    PlaceMovie( 0, 0, twidth*2, theight*2 )
    movieon = 1
    Dialog Disable hwnd

    so it might be something to do with that. On other systems with different display/resolution it might cause the anomaly.
    Is there a way to find out the pixel equivalent of the dialog units for a listview control, I wonder?

    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  9. #19
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    Made another test demo to try

    http://tab.thinbasic.com/Gfx_Adv_Demo.zip

    As before can someone please check the images appear Ok in both graphicboxes and also that the Video plays and is sized and placed properly in lower graphicbox after 1 turn of the game.

    Thank you for your cooperation.

    caventure.

    @directuX - left the Dialog Window enabled in this one. Hope it helps.

    Click image for larger version. 

Name:	test_demo.jpg 
Views:	54 
Size:	174.8 KB 
ID:	10224

    - shows video playing in lower box OK...

    The author of the mciVideo.INC, Michael Hartlef, messsaged me to say he is happy the routines work on Win 10 and suspects the position/size problem is due to not having the right metrics for the height and width variables of the listview control for the "placemovie" function.
    Last edited by catventure; 23-06-2020 at 21:22.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  10. #20
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    Blog Entries
    1
    Rep Power
    79
    After the recent coding changes I made my tester reports that graphics are now displaying properly in the last "Gfx_Adv_Demo" update. That is good.
    Still remains the problem of finding the correct formula for sizing/placing the video into the listview control with the "PlaceMovie" function of the mciVideo.INC routine by Michael and Petr.

    PlaceMovie( 0, 0, twidth*2, theight*2 )

    This seems works fine on Vista - but not for other Windows!

    Listview control is on a dialog units window. twidth and theight hold pixels values. 0,0 are x,y coords for top left of control.

    User reports that videos display "too big" to fit into control and same if try to play the video over the the whole of the window too.

    Will work more on finding solution and report back.

    **updated demo to try: http://tab.thinbasic.com/Gfx_Adv_Demo.zip
    Video resized to 300x266

    catventure.
    Last edited by catventure; 27-06-2020 at 13:06.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. "Shield Of Destiny" - Text Adventure Game (Win XP and above)
    By catventure in forum thinBasic General
    Replies: 0
    Last Post: 16-12-2018, 22:20
  2. Text Adventure - test.
    By catventure in forum T.A.B. (ThinBasic Adventure Builder)
    Replies: 6
    Last Post: 09-04-2018, 14:55
  3. 3D Text
    By peter in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 1
    Last Post: 22-04-2014, 02:53
  4. ThinBasic Adventure Builder Project
    By catventure in forum T.A.B. (ThinBasic Adventure Builder)
    Replies: 14
    Last Post: 05-09-2013, 10:26
  5. Getting text on a keypress
    By catventure in forum thinBasic General
    Replies: 2
    Last Post: 27-11-2005, 18:27

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •