TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

» sizex=y action ...
Thu Aug 09, 2012 11:29 am by catventure


Share | 
 

 graphics

View previous topic View next topic Go down 
AuthorMessage
ffixer
Novice Adventurer
avatar

Male
Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: graphics   Tue Aug 31, 2010 11:02 am

How can I change the pictures in the graphics tutorial file?
I can change the music, and the video in Script 2, but I don't know how can I change the pictures.
Please help Exclamation

ffixer
Back to top Go down
View user profile http://www.clonewars.blog.hu
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Tue Aug 31, 2010 7:13 pm

Hi ffixer,

Make sure your graphics are in the correct graphics folder.

Pics can be .png, .jpg, .bmp or .gif

Location pics use filename eg: loc1.bmp
Object pics use filename eg: obj4.bmp
Character pics use filename eg: char5.bmp

Display mode 2 (on Game Settings Editor) invokes
graphic display in TABPlayer.

Actions:
pic1box$filename$ eg: pic1boxMyPic.bmp (show image in picbox1)
pic2box$filename$ eg: pic2boxMyPic.bmp (show image in picbox2)

showobjn1aspic1 - show object image in picbox1
showobjn1aspic2 - show object image in picbox2
showobjn2aspic1
showobjn2aspic2

showcharn1aspic1 - show character image in picbox1
showcharn1aspic2 - show character image in picbox2
showcharn2aspic1
showcharn2aspic2

clearpic1 - clear picbox1
clearpic2 - clear picbox2

By default TAB will automatically show any location image for the
adventure starting room into picbox 1 at the beginning of the game.

By default TAB will automatically show any location image for each room
visited in picbox 1 (if it exists and has correct filename as above)

By default TAB will automatically load any image named "logopic.bmp"
into picbox 2 at the beginning of game.

Pics of objects/characters could also be shown using above actions
eg: below Response entries will show pics for ALL characters/objects if
"look at <character>" or "look at <object>" typed by player:

[start]look at %charn2%#charpresentn2[acts]cmessYou look at %charname2%.#showcharn2aspic1[end]

[start]look at %objn2%#objlocn2=here[acts]cmessYou look at the %objn2%.#showobjn2aspic1[end]

catventure.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
ffixer
Novice Adventurer
avatar

Male
Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: Re: graphics   Tue Aug 31, 2010 7:32 pm

Thank you, Mr. Cat Very Happy
Back to top Go down
View user profile http://www.clonewars.blog.hu
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Tue Aug 31, 2010 7:36 pm

Btw, welcome to this forum, ffixer

If you need any more help with graphics or other aspects of the program then don't hesitate to ask on this forum or send message to email group.

Thanks for your interest in the TAB program.

Philip (catventure)

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Tue Aug 31, 2010 8:09 pm

Hi ffixer,

I meant to say before that you can keep all YOUR graphic files in their own special folder within the TAB directory.
For instance the default graphic folder is called "graphics"...

You could for example create a new folder called "mygraphics" to keep all your game pics separate...
To call and set this folder so that TAB will use the new folder for any graphic actions simply load the graphic database into TAB and go to the

Game Settings Editor

Change the "default graphics dir" field from /graphics/ to

/mygraphics/

then accept the changes and resave your game data.
Next time you play that .tab datafile TAB will use the pics in the "mygraphics" folder...

Same thing can be done for the "sounds"

Hope this helps

Philip.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
ffixer
Novice Adventurer
avatar

Male
Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: Re: graphics   Tue Aug 31, 2010 8:27 pm

Thanks, can I have another question?
How can I change those 32x32 icons?
Back to top Go down
View user profile http://www.clonewars.blog.hu
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Tue Aug 31, 2010 8:35 pm

ffixer wrote:
Thanks, can I have another question?
How can I change those 32x32 icons?

Hi ffixer,

I presume you mean the ones in the bottom statusbar panes...
You can change them quite easily by replacing the existing icons in the "icons" folder - however you must keep the replacement icons the same size 32x32 and the new ones must be renamed to keep the original names eg:
Home.ico
Notes.ico
Pen.ico
Script.ico (top left program window icon)

Hope you get that.
The files must be icon format files .ico

Phil.

PS. If you don't want the statusbar icons to show up at all - you can delete the icons except the Script.ico from the "icons" directory. If you don't want ANY of these icons to show up in your finished game you may omit the "icons" folder completely.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Tue Aug 31, 2010 8:58 pm

You could search the internet for free 32x32 icon files or if you have a small image or picture you want to convert you could use a free online service such as:
http://converticon.com/
to convert your pic to 32x32 ico format.

Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
ffixer
Novice Adventurer
avatar

Male
Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: Re: graphics   Wed Sep 01, 2010 9:30 am

Thank you.
By the way, I tried what you say about the change of pics, but I don't understand something:

"Actions:
pic1box$filename$ eg: pic1boxMyPic.bmp (show image in picbox1)
pic2box$filename$ eg: pic2boxMyPic.bmp (show image in picbox2)
"

Where do I need to write these "actions"?
In the Script 1 or 2?
Or in the Responses?

(Maybe I did something wrong, but unfortunately I am not a professional in English language, because I am not English.)

ffixer
Back to top Go down
View user profile http://www.clonewars.blog.hu
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Wed Sep 01, 2010 11:28 am

ffixer wrote:

Actions:
pic1box$filename$ eg: pic1boxMyPic.bmp (show image in picbox1)
pic2box$filename$ eg: pic2boxMyPic.bmp (show image in picbox2)


Where do I need to write these "actions"?
In the Script 1 or 2?
Or in the Responses?

(Maybe I did something wrong, but unfortunately I am not a professional in English language, because I am not English.)

TAB is first and foremost a text adventure creator.

CONDITIONS and ACTIONS coding is the "language" that TAB understands to carry out RESPONSES to player input or to trigger EVENTS that may happen in a game in a particular situation...

You need to know a bit about these so it's best to try out the tutorial game (tutorial.txt) in the TAB folder to get some kind of understanding...

We deal with all types of things within reason that the player might type in by placing coding entries into the RESPONSES list. This list is looked at ONLY straight after the player hits ENTER with their input command.
For example if the player types in and ENTER's:

>score

then there is an entry existing in the RESPONSE list to deal with that type of command which prints out the player's score. eg:

"Your score is 20 out of 100."

TAB may then move on check the Script 2 list to see if anything else needs to be done or printed out on that turn of the game...

Entries in the Script 1 list are ONLY looked at in sequence immediately after a location (room) is described by TAB; for instance when the player types "look" in the current room or if the player moves into another room by a direction...

The entries in the Script 2 are scanned and processed ONLY immediately after the TAB has finished dealing with the player's inputted command (from the RESPONSE entries) This is so the computer has it's own turn at the game (after the player has had their turn) and to carry out any tasks or events need to be actioned at that stage of play...

So the actions you mentioned

pic1box
pic2box

can be used in either or any of the RESPONSE, SCRIPT1 or SCRIPT2 lists whenever you want to show a static picture into the upper right picture box (pic1box) or into the lower right picture box (pic2box)

Say for instance you wanted to show a picture of the player/character fighting a dragon. This could be made to happen if the player decided to attack the dragon from a RESPONSE entry eg:

[start]attack dragon#charpresent3[acts]cmessYou raise your sword to fight the vicious fire-breathing beast...#pic2boxdragonfight.jpg#cmessOh dear! The dragon shrieks and emits a searing bolt of flame that fries you to a crisp!!!#pause3#gameover[end]

If the player typed attack dragon and the dragon character was present then print the messages, show the picture into the picbox2 then pause for 3 seconds and then end the game.

That's just a simple example and the words "attack" would need to exist in the Vocabulary and Character 3 would be a dragon created in the Character Editor...

Alternatively you could use Script 2 to show the same picture with an entry such as:

[start]turns=12[acts]cmessSuddenly a vicious fire-breathing dragon swoops down from the sky and attacks you...#pic1boxdragonfight.jpg#cmessOh dear! The dragon shrieks and emits a searing bolt of flame that fries you to a crisp!!!#pause3#gameover[end]

On turn 12 of the game print message about dragon attacking, show picture in pic1box, pause for 3 seconds then end the game.

Hope this helps,

Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
ffixer
Novice Adventurer
avatar

Male
Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: Re: graphics   Wed Sep 01, 2010 12:59 pm

But I don't find theese actions (pic1box pic2box) in the graphic demo. Where are them? I was search them in the Responses, and in the Scripts, but I dont found them... Or are they elsewhere?
Back to top Go down
View user profile http://www.clonewars.blog.hu
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: graphics   Wed Sep 01, 2010 4:15 pm

Hi ffixer,

Those ACTIONS are not used in the "graphic_demo.tab". It is just a basic demo with location pics and a logopic (bottom right)
The game starts off in location 1 as set in the Location Editor. If you look in the "graphics" folder you will see a picture named:

loc1.bmp (it can be bmp, jpg, gif or png)

That picture is AUTOMATICALLY associated with location 1 so whenever that location is visited or shown inthe game the picture will be loaded and put into the pic1box - you don't need to call them with any ACTION in the coding lists - same with the other "rooms" in the game. They each have a corresponding picture file starts with

locX

where X is the room number (location)

Obviously you will use your own pictures for your own location numbers...

Unlike the movie files the graphics are not auto-shrunk to fit in the picboxes so you need to reduce/resize the image to fit into the boxes. Check out the properties/sizes of the images used in the graphic demo by right clicking the picture file icons and selecting "properties" to check the sizes in pixels used..

There is also a pic called "logopic" in the graphics folder. Any file called that will AUTOMATICALLY be loaded into the pic2box (bottom right) and can be used for example as a title/info or credits picture.

Regards,
Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
Sponsored content




PostSubject: Re: graphics   

Back to top Go down
 

graphics

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: