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

Post Reply  Post Oekaki 
 

Posted By Message

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
3rd July, 2008 at 12:24:48 -

Extensions are not too complicated at all. You just have to know what the specific extension's function is, and explore the events and conditions it has. I've never used INI+ I think I did determine what it was that was different than the normal one one day, but I've never used it. Most of my games don't use extensions, but every once in awhile you may need the advanced math object, fast loop object, or in the case of my educational software, the print object. Yes, if they have old laptops they have no business playing large click games. I have found that old laptops are EXTREMELY handy and awesome for other purposes, like typing, playing small klick applications, attempting to get skype to work... I would love to buy a new laptop, but money is always the killer of such dreams.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
4th July, 2008 at 11:15:25 -

Thats the thing, I think most extensions (When I look at that page "Jon & George Lambert" posted) has a very bad faq. Lets take INI+ again for example "This extension does not work in MMF. It is provided for conversion purposes. TGF/CNC version download" - aha, now I know EXACTLY what it does and how to use it! Thanks alot!..NOT

Well, then again it was a long time since I was klicking and I´m not to familiar with the TGF anymore, if I was maybe I would know or easily find out what it does, but thats not the case for me it seems. I have actually forgotten more then I though I had, I find "new" functions all the time that I didn`t remember.

And yesterday a new question occured, I "compleated" the first frame And though I should move on the the second one when I noticed that I have no idea how to use the same objects as I used in frame 1 in frame 2. Hehe, I never though I would ask a simple question like this but how do I use the same objects in diffrent frames? And if I change it in one frame, will it change in all frames (if I add animations to an object for example)?

From what I remember I should just be able to chose among all the objects I`ve used in this game from the list with all the other libraries? There is a "level objects" libary and I`m damn sure it`s supposed to be a "game objects" as well.. Anyway it wasn`t there so I tried to copy some of the objects, ctrl+c for the win.. or so i though until the next problem occured!
I`m not sure what it is but for some reason the board/frame (one of the objects I copied, same one I mentioned in the first post) refuse to follow the main character (scroll) in the first frame now. I think it has to do with me chosing "copy all events related to this object" when tgf asked me. I thought it wouldn`t be a problem and it would save me some time, not have to do all the events for every frame but apperantly it made my tgf go "boooooO!" instead. ..the events are still there in the first frame so what is the problem here? And how DO I use my libary in all frames?


 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
4th July, 2008 at 12:17:58 -

On the object window, where all your objects are stored, there are little blue arrows at the top and bottom. Clicking these will allow you to access objects from other levels. If you add or change an animation in one frame, it will not change it in another. They are their own unique object. And remember you can use edit + copy to copy not only objects, but also entire levels if they're similar enough to want you want. I wouldn't recommend copying events unless you really know what you're doing, as it can bring along a few unwanted tagalongs with it. It may be because when you copy events, if an object in the events is not on the current level you're pasting to, it will replace it with a bomb icon, and nothing will happen until you replace it with another object. I think you had a couple other questions, but the review section is giving me Service Unavailable. Hold on.

 

  		
  		

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
4th July, 2008 at 12:30:48 -

Oh, yes... extensions. You're most likely going to have to figure them out yourself or ask people for specific examples. I believe TGF has some sort of early implementation of global events and objects, but I've never personally used them, so I can't say for sure. It's best to either copy entire levels, build them from scratch, or only copy sections of code. Don't try to copy them via objects if there are alot, or by copying the entire code without the objects. Just copy the level from the storyboard editor. Hope I helped.

 

  		
  		

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
4th July, 2008 at 12:52:57 -

What I usually do to learn how an extension works is I first put it in the extension folder, then load up the program (TGF in your case, MMF2 in mine) and either load up an existing game, or make a new one that I don't save. Then, I go to a new frame and place the new object in. I check its properties if it has any, then I go to the event editor and make a nonsense event, (a random event, like "Start of Frame" or "Timer equals 3 seconds") and use that to see what actions the object has. I also check to see what conditions the object has and try to get an idea of what I can do with the object from that.

TGF 1 does have global objects, you check the box for global in its properties, and then in every frame it pre-exists, but it isn't created unless you make an event for that.

When you copy events into frames with missing objects, you have to be careful, because if you have another object in that frame with the same name as an object in the events, that object will take that place in the events. So, if you have a ball in the first frame named "Active 6" and paste the events for the ball in another frame with a skateboard called "Active 6", the skateboard would take the place of the ball in the events.

 
Sandwich Time!Whoo!

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

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
4th July, 2008 at 14:25:21 -


Originally Posted by OldManClayton
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.



Ghosting?

 
.

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
4th July, 2008 at 14:30:50 -

AH-HA! Ghosting. Yes, Jon & George was kind enough to fill in the parts I forgot. That's precisely what I meant by testing an extension, but stupid ol' me didn't explain it well enough.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
5th July, 2008 at 18:40:34 -

Thanks, I mangaed to find my objects in the other frames now I think. I still haven`t fixed the "problem" which I caused by copying the events but before I get into that I decided to make myself a bit more familiar with TGF.. so, new questions ofc!

Ok, Sinve I wanted to be sure I know what I`m doing before messing up my project even more I`ve been experimenting with things, in a new application (planning to test some extentions in this new "test game" as well). I`m currently testing INI files a bit but can`t seem to get it to work, so there is something I`m not doing right.

What I`m trying to achive at the moment is temporary saving and loading a few counters (such as life, coins etc) and the players position. Lets say player moves around on my map, finds a house and wants to enter this house(which will lead him to another frame) I want the game to remember the counters(life and coins), not the position ofc since he will be on another map.
But, when he then exit the house I want the game to remember and load exactly were the player was standing on the map and what values the counters had.. also, if some values was changed inside the house(in the other frame) I want the game to save and load those changes.

So here is what I`ve been trying...

FRAME 1

Events:
1.Uppon pressing ENTER
Collision between "player" and "door" - Jump to level numer 2 - Save position of "player"(INI) ..(I guess I should save the values of the counters here to but I`m not sure which is the best way to do this).

FRAME 2

In this example, inside the house there is a foe which the player can destroy, when the foe has been destroyed the player will automatically get the loot (which is supposed to be saved to the INI) and then "jump" back to frame 1.

Events:
1.Collision between "player" and "foe" - destroy "foe" - Jump to level numer 1 - Activade group "Temporary INI save" ..(temporary INI save is a global event group I created for controlling the temporary INI file.. see more beneath)

TEMPORARY INI SAVE GROUP:

1.ALWAYS - Load position of "player".. (of course when I know how to save and load the counters, Im planning to have an "always" event for those too.. )
2.ALWAYS - Deactivate group "temporary INI save"


Well, um, when I look at it I`m not suprised that it doesn`t work, I`m guessing it has to do with the "always" deactivate event.. but I`m not sure, not sure about anything anymore. For this to work the group most be activated only when the INI loads the data then deactivated... otherwise the player would probably not be able to move.

If you can explain how to fix this.. or how to save load these temporary things in a much easier way(make sure you explain well then becuse I`m really lost when it comes to these INI objects it seems), please help.

And have in mind that these temporary saves I have do to to the INI isn`t the only ones, later I will try to make a SAVE/LOAD game function as well as make the game remember more stuff, like a few quests/quest progress.

Obviously I cant have a "start of level" condition for the INI becuse then it would load any save file there was, even if the player "just started a new game", and we cant have that, now can we?

I`m looking for the most simple, easy and user friendly solution since I`m not very skilled as you all know ..so try to keep it simple (both the solution and the explaning)

Oh, and while the topic is save, load and remember, how does "groups" work? I`ve read a bit about them on the forum but I cant say I understand much. I could use another INI file I guess, one for temporary and one for permanent saves, but if groups are simple enough, I rather use those.

Thanks for all the help so far, hope you can make me understand this as well.

Image Edited by the Author.

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
5th July, 2008 at 19:02:36 -

Lemmee make a quick screenshot

 

  		
  		

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
5th July, 2008 at 19:15:26 -

Image
Ok, the circle is the player, the square is the door.
I've got so many things I'm trying to remember, that I'm going to forget some and Jon & George will have to fill in for me again.
That's to save everything.

Now, on the subject of the "start of frame" loading thing you supposedly couldn't do. What I'd do, is set a global value on the title screen, depending on whether they are loading an old file or making a new one. E.G. Value 1 = 0 for new file; Value 1 = 1 for file 1; Value 2 = 2 for file two... etc. Then, at the start of the level, use the INI's "set current file" function to the INI that holds data for the corresponding file. You probably don't want that universal code there... if you jump to this level from another place, it will load perhaps it if you don't want to. Also, it will load your position in the house, as well. Say your character is at the position 1024 x 768 on the level, and they jump into the house level. If the house level is only 640 x 480, your character will disappear! Now let me do some more screenshot goodness. Hold a moment.

 

  		
  		

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
5th July, 2008 at 19:29:10 -

Here comes the fun part.
Image
NOTE that there may be a better way to do this, but this is the system that I've figured out.
First, see that I'm comparing the Global value? DON'T GET CONFUSED HERE. I did this wrong. If you have Global Value 1 comparing the save game number, you'll want to compare a different one for this. Anyway, that's there to symbolize that you've just come from the house. You can set the global value to 1 at the end of the house level. It knows that it needs to load stuff, so here we go: First, it sets the Global Value back to 0 to keep this from looping infinitely. The next dot you encounter is under the INI. I'm setting the item to "Player X". This may get confusing, sorry. I'm in a sort of a hurry. The next one you encounter is under another counter. I've entitled this the "load" counter, and it keeps track of what step we're on. It's being set to one here. The next line: Is the "load" counter equal to 1? Set the Player's X position to the returned INI value. the next dot is setting the INI to "Player Y" for the next run. Then add one to the load counter. The next line: Is it equal to 2? set the Player's Y to the returned INI value. Then we set the INI value to Money, add to the load counter and continue. Next line, set the money counter to the INI value, set the INI to Life, add one to the load counter, continue. Next line: set the Life counter to the INI value, and set the load counter to 0. Now, if this setup doesn't work, it's probably because I should set the values on the same line as when I load them in the INI... but it's been awhile so I can't remember. I can't test it because I don't have a working setup. I realize this is probably REALLY confusing and jumbled... I'm usually better at typing explanations, but I'm feeling a bit hurried. So, if this doesn't make sense, yell at me and I'll clarify if Jon & George doesn't do a simpler explanation. I'll put some more screenies up if you need 'em. I'm going to review your questions again in a second to see if there's anything I missed.

 

  		
  		

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
5th July, 2008 at 19:34:36 -

Oh yes, groups. I've never used them, since everything I know in TGF is from pioneering, not reading... but I'd imagine it's just what it seems. Say you have group 1 and group 2. Then, you could Have a "player X" in both groups, and they'd be separate entities; you'd have to switch groups to get to whichever one you wanted. That's my educated guess. On the subject of the way I used a step system to load things-- I don't know if that's how everyone else does it, there may be a way to do it in one condition for all I know, but that's what I do. Hope I've been a help.

 

  		
  		

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
6th July, 2008 at 15:47:42 -

I was in Kansas yesterday and just got back an hour ago.

So files in INIs would be used for things like "Save File 1" and "Save File 2". Then in the file, you name groups for things like "Stats", "Items", and "Quests". Then, respectively, your items would be "HP" "MP" etc., "Slot 1" "Slot 2" etc., and "Quest 1" "Quest 2" etc. You would probably use names in place of "Quest 1" "Quest 2".

The system is organized as so:

File <- Group <- Item <- Value

The value is specific to the item, which is specific to the group, which is specific to the file. So, look at these:

File 1 <- Stats <- HP <- 40
File 2 <- Stats <- HP <- 20

These are saved in different places, because their files differ. The first thing the frame should do is define the file, that way, the groups, items, and values don't get saved to the wrong file or overlap something they shouldn't. Also, remember that if you want to save to a different group, you need to make it switch to that group, same for items. If a file, group, or item does not already exist, it will automatically create it, and if it does, it will overlap it automatically. In other words, you have to manually switch it to each group.

When you say groups, you mean groups in INIs, correct? If so, it would be easier if you just made it change the File to "Temporary", save groups, items, and values to that, then make an in-between frame that moves the values to counters, then from the counters to the INI again.

I have to go now.

 
Sandwich Time!Whoo!

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

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
6th July, 2008 at 16:09:46 -

I had a weird issue with TGF and not wanting to use INI's correctly when I was running the game from withing TGF, I had to compile as a standalone everytime.

 
Craps, I'm an old man!

Lönnemyr



Registered
  30/06/2008
Points
  69
6th July, 2008 at 19:13:10 -

Ok, big thanks guys, I think I got the INI to work, at least for now. But to be sure I`ll post the gam file for this new toy project here soon, so if you want, you could see if I got it right (much better/easier then print screen)? But before that I have a few more questions, again..

Well first question is not really "how do i do", more like "how will this work"..

Say I have a huuuuge worldmap (which this new toy project has), and ìt`s diveded into a grid (50x50). To be exact the frame is 2000x2000 and that leaves us with 1600 zones which is 50x50.
Now the reason for this big level is I want to know if tgf can "handle" this, lets say this is a game were the player moves with a "snap to grid effect". To build this worldmap you use a couple of diffrent looking 50x50 active objects and place these, one in each "zone", when you have done this it will be 1600 active objects in the game+ the player objects and all the "other" stuff.

Will this many objects make the game crash or lag? If that`s the case, then if all the objects are set to "inactive object if far from window" will this help? Also, remember that this would be a snap to grid game so even if there would be a little lag, it probably wouldn`t be noticed sinte the player character would not need to move "smoothly"?

And, if the game could handle this, what if I were to add another object on top of each of these other active objects? Would tgf still handle it, and if so, were is the known "limit" (1600+1600= 3200active objects+other counters and stuff)?

Well that is the first questsion, the second question is a "how do I do this" question..

We use the above example. Same game, huuuuge map, snap to grid and all that, now to the question. How can I create random events and stuff? For example, what if I want the player to have a chance to enconter a random event each time he move to a "wood zone"? How can I achive this? Say I have 3 diffrent events, the "nothing happens" event, the "player gets attacked" event and.. um.. the "player finds a pot of gold" event. If possible, explain how to make it so they have a diffrent %chance of happening.. if its possible that is.

Also, what if I have a "battle frame" in this game, which is always the same frame and the player is transported to this frame each time a battle occur. How can I "generate" random monsters so the player don`t always meet a goblin but sometimes an ogre instead? .. And finally, how do I make this ogre or goblin drop a "random loot"?

Thats all for question two, which actually was more like 3 questions in one but they were about the same thing and might have the same/similar anwsers.

Now, the third question (which is actually 2 questions).

Still the same game.. now, when the player moves to a certain spot..or object on the worldmap, a city for example. If I want a "pop up window" to appear were the player will get several options to choose from(buttons to press). Like "go the the tavern and hear the latest gossip" and things like that. How would you guys do this?
Only way I can think of is creating a new active object in the center of the screen, then create each button on that object and so on and when the player moves all the new objects dissapear/are destroyed. I´m not sure if that is stable/recomended/best way though so I`m asking for your opinion about it.
The other part of question three is concerning dialogs, again! Well, I remember that you didn`t really know the best way to do a typical "rpg dialog" but what is the best way to "fake" an dialog then? If the dialog will be very simple and not have ALOT of diffrent anwsers more like information, text, story conversation which contains no real choices.. at the most maybe a accept/do not accept option for when a npc asks the player to perform a quest. This, I belive could be done in many ways, again, how would you do it?
My though about it is to just create a new "active object" which will be centerd in the screen. Somehow stop the player movements untill the conversation is over. Then create a new "text object" on the active object(which would work as a background for the text). When player presses "enter" the text is destroyed, a counter is set to 1(is this necessary?) and the next text appear triggerd by the counter and so on untill the conversation has ended. Then, the last text is destroyed along with the active object and the player regain the abillity to move around freely again.

Sorry about asking and asking but it`s the fastest way to learn. Experimenting during the day and asking questsions during the evening. Learning from people who already know about "stuff", at this pace, I can get back to my original project in no time.

Image Edited by the Author.

Image Edited by the Author.

 
-
   

Post Reply



 



Advertisement

Worth A Click