The Daily Click ::. Forums ::. Klik Coding Help ::. 3 questions concerning TGF 1 [adventure game]
 

Post Reply  Post Oekaki 
 

Posted By Message

Lönnemyr



Registered
  30/06/2008
Points
  69
30th June, 2008 at 08:03:02 -

Hi everyone, I`m new here and I thought that since I started playing with TGF (better clarify, its TGF1 not TGF 2) again and it has been a loooong time since I used it. I might as well ask here about some things I don`t know how to do. Unfortunally I`ve forgotten most of what I knew when it comes to TGF, and I since it is kind of old I have only found a handfull of tutorials.

So here we go; first questeion!

Im currently creating a very simple aventure game and I`m using a bird perspective. Since my each level or "map" is bigger then the resolution scrolling is nessicary, so I added it. Another problem came up though, things like the healthbar and other counters which will be important for the player. Luckly they automatically follows the screen, which I guess is good but I don`t know were to place them to make them appear at the exakt same position (upper right corner for example) when entering another frame. It would look dumb if they moved around and I`m sure it would be irritating for the player.
I guess I could place it, test run level, replace it, test run level etc on every frame in the game but there most be a easier way to do this? Something that would give me a more exact result?
I came up with the idea of having a boarder which is always following the screen, it is cool becuse I can decorate it as well. But If I somehow manage to get it to follow the scrolling screen and not wander off I could maybe use it to help see were I am supposed to place the counters?

Also if you know how to make the counters appear in the right place everytime you enter a new frame in some other way, I would still appriciate if anyone knew how to make the boarder thing follow. As I said, it could be decorated

Another questsion then, it is something I guess most of you know how to do in your sleep but I could not find any tutorials on this. How can I create dialog? I`m sure there is many ways you could do this and since I dont know which one is best for my game I appriciate if you told me more then one way to do it.. if you know. Also, it would be nice if you could add different anwsers and make the player select one but thats not really needed for my game at this point.

And yet another question. I think this is possible in tgf 1, but I cant remember how to do it properly so please explain it if you can. The thing I want to do is make the game "remember". Like for an instance how much life the player has left or how much "cash" he has got when entering diffrent frames. I`m quite sure this has to do with "values" but I dont really remember much about those.
Another things which I think might be possible to do when you can make your game remember is a) save-load game, and b) give the player the option to enter a name in the beginning of the game, then make it appear in conversations etc. Both of those features would be great to add, even if the game could work without them. So again, if you know how to, please tell me or link me to a tutorial or anything that would help.

Well, I know I asked for quite alot and to be honest I`ll probably find more problemes along the way, even in this quite "simple" adventure game. But I really appriciate all help I get, thank you so much for reading!


Best regards, Illsnidig.

 
-

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
30th June, 2008 at 08:26:37 -

For your first question, you could use the level editor's grid option to see how many grid spaces in each counter is, then move them accordingly in the other frames. Also remember that you can get an object to always follow the screen by unchecking the Follow the Frame property. That way it will always stay in that position relative to the window. For example, if you put a ball at 350 x 450 in the frame and uncheck Follow the Frame, and the window resolution is 300 x 400, it will always stay 50 pixels right and 50 pixels below the frame, never visible.

I don't know the answer to the second question.

The third question, use global values is all I can think of. There are only 26 though, if I remember correctly. I own TGF, but it is on my old hard drive which is currently in my old, non-working computer, so I wouldn't be able to send you any files to help.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Lönnemyr



Registered
  30/06/2008
Points
  69
30th June, 2008 at 09:22:08 -

Thank you for your help!

I dont quite understand your solution with the grind options though. Sure I can pinpoint things with more precission but I dont "know" exactly were the camera will be since I have it "center on PC at start of level", it will automatically "jump" to were it`s supposed to be and since the player will enter alot of diffrent areas from alot of diffrens positions on alot of diffrent maps this will be quite hard do figure out? Maybe I`m making it more complicated then it is, I`m not sure?
Anyway, if it was a simple platform game it would be more easy to make sure these boarders and counters follow but since I use a bird perspective the camera moves in alot more directions then just bacward-forward which makes me confused?

Concerning global values, which I "knew" was the anwser, is there anywere I can "read up on them"? Beucuse I dont remember much besides they are used for stuff like this. To bad about your computer, but maybe someone else who reads this still have tfg installed and will do it in your stead?

Also another thing which might be related to the scrolling, I just noticed this. When moving around in the landscape some things seems to "pop up", like for example a tree which is not visible untill "the whole tree" can fit on screen. I`m pretty sure I`ve done something wrong to create this problem. I guess the topic lies now since I added another questsion

Image Edited by the Author.

 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
30th June, 2008 at 10:02:38 -

For "remembering" you would use Global values and INI's... One way you can make sure the counters are in place is to make an object, set it atop the counter, make an event to check it's X and Y values, and then either count out the pixels one by one with the arrow keys () or set the position via events. It's funny, TGF is the one I use, and I can't remember whether it supports setting Counter X and Y values... I've never had to do dialog, I've got two ideas how I would do it, but I'm sure they're not the most efficient or easy ways, so I'll leave that to someone else.

Global values... it's under the wrench icon. You can set a global value to something and retrieve it in another frame. INI's are a bit more complex. Do you have an AIM screen name or a Skype name? I suppose I could just type it out... The INI object creates "blahblah.ini" file in the C:\windows directory (unless you tell it otherwise, which I would. Set the INI file in the app directory), you can set strings and values into it to save games and information. For instance, to save the Player's position on a map, you would say,
"Set current item" in the event editor after you have made a condition. In the box set it to whatever you like, "player X" we'll say. Then say "set value" to player's X position. Then you can do that again for Y... "set current item" to "player Y" Set value to player's Y position. To retrieve it just make sure you set the current item to the thing you want before you get the ini's returned value. You can do this for strings too. (which is one of the ways you could do dialog, I suppose. But I wouldn't recommend it.) If that's not clear, say so, I was sort of in a hurry.

 

  		
  		

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
30th June, 2008 at 10:28:09 -

For the "Pop UP" problem, you can un-check "Inactive if too far from window" or something like that.
I don't know, I haven't used TGF1 in a really long time.
To add dialog, do you mean the "RPG"ish text, were it appears 1 by 1? or just text in general?
If you just want text, there is a string button were you choose active object, or background.

And for "remembering" things, I would use a INI object. At first they can be confusing, at least for me they were, but you can get used to them, just give them some time.

-AND- For some helpful stuff TDC has a search bar in the side
<<
You can look up articles that can help you with INIs or anything really.
as long as someone has wrote something about it somewhere.

Well i hope I helped at least a little bit

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
30th June, 2008 at 12:15:41 -

About the first question;

To get the counters and such to stay in the right position relative to the players "camera" you position them in the top-left "screen" of the frame. The scrolling automatically "starts" from the inital top-left screen position, so if you place your counters and such in the top-left area they will always be correctly positioned relative to your "camera", that is if you uncheck the follow the frame tick. I think you right-click the objects and choose the scrolling properties or something... Yeah. Hope it makes some sense.

About the dialog, do a TDC search on "Dialog" or "Rpg dialog" or something like that. I know there's a really good one, either here on TDC or at clickteam.com.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Lönnemyr



Registered
  30/06/2008
Points
  69
30th June, 2008 at 13:20:54 -

Great! I didn`t expect this much help.

I solved the first question by first unchecking the "follow frame property" as "Jon & George Lamert" said, then using "Eternal Entertainments" sugestion, it works like a charm. I just placed the border and the counters in the upper left corner and everything follows nicely, not even one event needed and its not much work at all.
That is perfect solution for a hopefully not so advanced adventure game as this is. Though, I appriciate all your other ideas too. I make some mental notes of those for future needs when this solution fails me.

And since you all are saying INI and global values is the way to go I trust you, I think I understand "how" they work but I`m not so sure if I can handle them yet, I try find some more faq about this in the forums, thanks.
Something I wonder about those though, if there only are 26 global values that means that the game can only remember 26 conditions? Or do the INI help increse the amount of conditions the game can remember?

The popup problem is also solved thanks to "MaxAdaM" tips, it`s been so many years that I forgotten all thost simple yet very important features that TGF has, thanks for helping me out.

To clarify, yes it is "RPG-ish" dialog text that I`m looking for. My vision of the in game dialog is that something like a "tiny black/blue window pops up and the text is written in it (the diffrent anwsers too if there will be any). If the player press.. lets say space key for example the dialog continues. Probably, if I`m not going to catch the lazy virus I want to have a small portrait right next to the box in which the dialog is so show who is talking at the moment(maybe possible to have 3 diffrent portraits for the main character to show emotions).
Thats alot of explanation for saying I want something like a normal rpg dialog window like they appear in most RPG games

I go search for a faq about that too in the forums but if anyone who know how to do it happens to read this, write a line or two about it in this thread, thanks.

Unfortunally, "Giant OldManClayton Panda" I do not have an AIM, neither do I have an Skype name. I`m not sure if I understand just yet, we`ll know after I`ve tried it. But you did make me understand a little more about how the INI files work, strings though sounds familiar but what are they for? I think I might have used them when working in MMF sometime but that too, wasn`t yesterday.

 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
30th June, 2008 at 13:41:35 -

Well, I woulda told you to just stick the counters in the right spot but I thought maybe you were starting from the middle of the frame where it'd be harder. I thought the solution was obvious if you were in the corner, so I assumed you were in the middle-- nevermind. I'd be happy to lend a hand in any troubles you have. I consider myself one of TDC's TGF assistants. Strings are used for various things, like saving what the user types in, sending information to servers, whatever you can think of that uses words. Didn't see that question about Actives, looks like it's been cleared up.

 

  		
  		

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
30th June, 2008 at 13:53:34 -

If you really need more than 26 values, I can think of two options, both of which I've tried before, and one which I used unsuccessfully:

Firstly, you could use the global values very craftily, i.e. each frame uses the global values for it's own resources, and there might be an in-between frame that is used to save whatever values need saving, then reseting them for use by the next frame.

Secondly, you could go to http://www.clickteam.info/extensions and download the 1000 Global Values object or 1000 Global Strings object to use for additional conditions. However, if I wasn't just being noobish the last time I used it, these 1000 values and strings are limited to what can be saved to them.

Finally, you could just use the INI file to save things in some sort of "Temporary" group, or use two INI's, one for permanent values (save files) and another for temporary values (things that need to be carried across frames). A variation on that is that the temporary INI could be used for save files held in memory, e.g.:

A file is loaded with 10 HP, 5 MP, 1 magic potion, 1 sword, and 50 coins. These values come from the permanent file, and are copied to the temporary file.
Said file gains 5 HP, loses 5 MP, gets one extra potion, and gains 2 coins.
Right now, the temporary file has 15 HP, 0 MP, 2 potion, 1 sword, 52 coins.
The permanent file still has 10 HP, 5 MP, 1 potion, 1 sword, 50 coins.
If the player chooses to quit and save, the values from the temporary file are transferred to the permanent file, then reset.
If the player chooses to quit without saving, the temporary values are all reset and the permanent file goes unchanged.

That way, if something happens that the player doesn't like, they have the option of quitting without saving and completely abandoning everything they just did.

Wow, that seems complicated...

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Lönnemyr



Registered
  30/06/2008
Points
  69
1st July, 2008 at 06:53:06 -

OldManClayton

Oh well, I have done some simple TGF:ing and MMF:ing in my past, nothing that required something as advanced as strings/INI:s though, I did try it a couple of times with MMF I think but it didn`t go well. Since that was a long time ago the little knoweleage I had is all gone, well mostly. So its probably better if you can see me like a beginner and assume I dont know about any things, even though sometimes, I might.

The player did begin in the "middle" of the map, but it worked anyway? Origianlly I tried to have the life and other counters in the upper right corner but if it`s so easy to have them in the left, I really dont mind that much. Might even look better since the counters go from left to right.

So strings are used for "text" only, INI:s store information for the game when the computer is off, and global values are used to remember "things" while you play, and can be used to transfer information to the INI:s? Heh, I would really love a "super simple self explaining total beginner guide" which explains everything step by step. I`m a little confused about how to make these things actually work. What was that question about Actives? Cant remember asking anything about that or did I?

Jon & George Lambert

I`ve seen that there are some diffrent values, like alterable values, global values and if I`m not mistaken I think I saw another type of value last night when I was clicking, but I´m not sure.. I was kind of tired. Anyhow, what I don`t really understand is "how much can the game remember", without using tricks. It would be great to know this before I get ahead of myself and plan out the game in detail.

I would very much appriciate an RPG/adventure example, and write it the way YOU would use the values. For example, if global values are better to remember things like quests and alterable value is better for something else, write it like you would have used them.

Something like thins maybe:


Save file

life --- takes XY global/alternative values to remember.
mana --- takes XY global/alternative values to remember.
item1 --- takes XY global/alternative values to remember.
item2 --- takes XY global/alternative values to remember.
item3 --- takes XY global/alternative values to remember.
item4 --- takes XY global/alternative values to remember.
position --- takes XY global/alternative values to remember.

In game information

live --- takes XY global/alternative values to remember.
mana --- takes XY global/alternative values to remember.
item1 --- takes XY global/alternative values to remember.
item2 --- takes XY global/alternative values to remember.
item3 --- takes XY global/alternative values to remember.
item4 --- takes XY global/alternative values to remember.
quest1 --- takes XY global/alternative values to remember.
quest2 --- takes XY global/alternative values to remember.
quest3 --- takes XY global/alternative values to remember.
quest4 --- takes XY global/alternative values to remember.

I`m not sure if I get it right, otherwise I`m sure you understand what I misunderstood and can correct it. If the game uses say XY.. uh..global values to remember a save file, will those be "occupied" and off limit to use when the game is running as well, becuse if that is so and it requires a value for each "thing" it has to remember, like position, each item, health etc then alot of values will be occupied and you can`t make the game remember much? Btw, Im not sure but I think of what I`ve seen when tinking with values yesterday that there is 16 globals and not 26!


------
And yet another "problem" has accured, even if I`m not sure that it really is that problematic. And accured is probably not the truth either, I think it has been that way since the beginning just that I didnt notice untill recently when I tested first map for a little longer. Still, not sure if this is a problem or not but when I move it seems to..um, blur some objects on the map while I move? Might just be an optical illusion since it does not show on print screens. Also it`s more blurred if I make the PC move faster.. so.. optical illusion? or lagg? or bug?

Thanks again, really good community.

 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
1st July, 2008 at 10:16:57 -

You using an lcd screen? Laptops especially will lag in visuals. CRT and newer lcd monitors don't have that trouble. Well, lag isn't the right word... it leaves a little shadowy trail...

Image Edited by the Author.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
1st July, 2008 at 10:54:06 -

That explains it, I`m workin on an OLD laptop since my main computer is dead. Is this something that happens to all games you build in tgf or is it a problem with all games what so ever (I never play games on this computer since its so old)?

Good thing it wasn`t a big deal, I thought my game was laggy becuse my events and everything else is kind of messy. Mainly becuse I don`t know which way might be the best way to do all things.
Maybe its possible to post the gam file here at a later date and have people look at everything and say what they think about it, both the gameplay and the work done in the event editor. But right now I feel like I don`t have enough to show so I work on it a little more.

 
-

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
1st July, 2008 at 12:57:43 -

It doesn't happen with all TGF games, just the ones that are either so big that they run slowly, because running them faster makes them skip frames. It could also occur if the screen is scrolling too quickly.

If you do post the gam file, I'll take a look at it. 16?! Wow, that is crazy, but I think I got twenty-six from MMF2, sorry.

There is no limit to how much you can save to an INI, but the more you save, the bigger it gets, and they already inherently have file sizes of 10-100 kb or more.

It is best to use alterable values for things like life, mana, coins, things that directly relate to the character. Global values are where quests go. Items should be either global values or temporarily saved to the INI. Anything on an alterable value should be necessary only for the current frame, or it will need to be transferred to the global values or an INI.

If you don't need to store a lot of information on the global strings, you could have TGF convert the values into strings for storage in the global strings, then convert them back for use later. I don't remember if it has that function, though.

If you aren't averted to extensions, then check these out. http://www.clickteam.info/extensions/extlist.php?prodtgf=ON&extendedlist=Go&cat=

Particularly the 1000 Global Strings, 1000 Global Values, Item Array, Dynamic Array 2, and String Conversion objects. All of those will allow you to store values and strings across frames.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
1st July, 2008 at 13:39:17 -

No that's not quite right. In my experience, every TGF game and every game whatsoever that has moving sprites has this effect on older laptop screens, particularly in DSTN (dual scan screens). Older LCD's are notorious for having slow responses. Sometimes it does matter what order you put events in for position lag, but this is likely not the case. You should be fine. My sister sometiems draws Balding Overweight Man graphics on her old thinkpad 560, and it won't even play the game.

Image Edited by the Author.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
3rd July, 2008 at 10:02:19 -

Either way, it`s probably nothing I can do anything about then. Hopefully those with older laptops/lcd screens will buy new ones in the future if they have not already done so.. (including myself).

16? You mean 16 or 32? becuse if thats what you are asking my tgf is 32. Sure I upload the gam file as soon as I think I`ve done enough work on it for it to be worth to check out, currently I spend most time on sprites/grapic in GrapicGale. And I`m not a pixelPro so these things takes time. You`ll probably notice when I`ll upload it so stay tuned

I`m aware of extentions but I`ve always thought they seemed so advanced so I never used any of them. But I`ll take a look, how do I get them to work? like INI plus for example (which I`ve heard is supposed to be better then the usual INI somehow)?


 
-
   

Post Reply



 



Advertisement

Worth A Click