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

Post Reply  Post Oekaki 
 

Posted By Message

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 21:41:05 -

1600 will always crash TGF. I was making a game with a lot of objects and it stopped working. I asked Clickteam, and the result is:

Clickteam
The Games Factory can only handle up to 256 active objects.


Yeah, any more than that can only be handled by Multimedia Fusion and Multimedia Fusion 2, the latter more so than the former. Is it really necessary for every grid square to be an active object? If they are just asthetic, like trees and grass and such, they should just be backdrops and quick backdrops. Explain this world map further and maybe I can better help you.

For random things happening, the events should go as such:

Player lands on "Wood Zone"
+ Only one action when event loops
= Set Counter (or Alterable value) to Generate random value (2)+1

Counter equals 1
= nothing (this event doesn't need to exist if it wont say nothing happens)

Counter equals 2
= Jump to frame (whatever frame has the battle engine)
or
= Activate group "Battle Engine" (if it runs in the same frame)

Counter equals 3
= Add to Coins 500

The generate random number function can be found in the expression editor under System (the expression editor is the part where you enter numbers and equations). For the battle frame, at the start it should use the random number function to come up with a random number, then use events to make the frame know which badguy to fight when a certain number comes up.

For the window, you could make an object that is the window, then make the buttons and put them on top. Make them start invisible, then they become visible when necessary, and become invisible again when its done. At the start of the frame, the editor should make the objects come to front in order of bottom to top, then make them invisible. For different texts, just make it change the text of the button and question based on what space you are on.

For dialog, you can make an active object appear with a text object on top. Then you make the text set itself to strings stored in the alterable strings of the object (I don't remember if TGF has this feature, if not, then just type the texts into the event editor). They press enter to advance the text as many times as the alterable value of the object. Once it has been advanced that many times, pressing it once more will make the objects invisible until they need to be used again. When it gets to a choice moment, you could make it refuse to take input from Enter and press either up or down (or sub in your own keys) to continue the conversation.

You can choose whether these objects are destroyed and created every time, or if they become invisible and visible. The first option makes the game run faster overall, but it might slow or stop when things are created and destroyed alot. The second makes it run slower overall, but it might crash less because it isn't all of a sudden demanding too much from the system memory.

I have no problem helping you at all. It's actually pretty fun. However, I have to get off the computer now. I'll check tomorrow for any responses and help you further. My having to get off the computer is why I didn't explain all of this further than I did.

 
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
7th July, 2008 at 08:39:06 -

Text gets treated as a backdrop, so do this first, unless you want the text box to be obscured by the Active Object text box holder thingy. Right click the text, Click "object preferences", click the "extra" tab, and then uncheck "display as background". (Or you could have the active objecy paste itself into the background, but that would be useless and messy ) In TGF, to add more text strings, right click the text object and click "edit Data strings". You can now add sentences.

QUOTE TIME!
J&G Lambert said:
"Player lands on "Wood Zone"
+ Only one action when event loops
= Set Counter (or Alterable value) to Generate random value (2)+1"

Just to be clear, he put the +1 on the end, because it will actually be able to return three different values: 0,1, and 2. +1 makes it still have three values, but then you can just have "When value equals 1" instead of having to add another qualifier for when zero has been randomly picked. (Say, you want it to jump to another level when the first value has been picked. If you left it so that it could return zero, you couldn't put "when value equals zero" or it would automatically jump to the next frame at the beginning of the level. See what I mean? This system allows you to put use all the returned values without getting a mess on your hands.) I'm not sure if that made sense, but just remember that when you enter a number in the random generator, it's actually going to be able to return one more value. Sometimes you need this, say if you're doing a random X position, but in most cases you're probably going to want to add one on there. Heh, you may have already known all that.

I too have enjoyed assisting you.

Image Edited by the Author.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
7th July, 2008 at 15:46:27 -

Good that we are all enjoying ourselfs, thats the way it should be!

max 256 actives! Damn, does that apply even if there is only like 20 DIFFERENT active objects which have been copyed all over the map? And if that is so, then what about background objects? It would be a little more complicated setting all the events if they are backdrops but could I have 1600+ backdrop pictures?
My original idea was having a couple of diffrent titles and set events to them. Like for example, the forest title would have that random enconter event and I would only need to write it once since all forest titles on the map would actually be the same. Damn that was a sweet idea, thought it would go like a dream creating the world map

If I really cant have all those objects though, the only way I can think about doing it is way more complicated and takes alot more time. With the help of the XY conters that the player can see in the upper left corner decide what happens in that specific zone. However, then I would end up with over 1600+ events instead, that might not either be such a good thing..

No grid is "just asthetic", except most of the roads which is supposed to be "encounter free", still I might want to add some special events to the roads here and there..

Here is a list of what grids I have and what I want them to do.. for now.

tavern grids - save game and pay for rest(get back hp).

city grids - get quests/information, save game and rest (get back hp).

road grids - nothing, they are supposed to be "safe" to travel by so nothing should happen (with a few exceptions).

sea grids - not possible for player character to pass (this I have a big problem with becuse of my "snap to grid" movement).

river grids - chance of special random "river encounters".

mountain grids - chance of special random "mountain encounters".

grassland grids - chance of special random "grassland encounters".

woodland grids - chance of special random "woodland encounters".

Harbor grids - Not really decided if I`ll even keep these. But if I do they will allow player to ride a boat over the sea grids".

Temple grids - Get back hp for free, maybe something else, who knows.

And then there is the special grids..

fog of war grids - well these wont work since I was planning to have one of these in every grid. Got to think of something else.

fog grids - grids which are grey and "move" when player move, I`ve not given them much thought though. My idea was that they should be on top of the other grids, covering them. BUT, When the player move to the fog grid it would become transparent and reveal the "real" grid. When the player moves away again, then they would go back to be grey and foggy.


I took a screenshot of the project which also has some notes, feel free to help me solve this problem in anyway you can think of. Of course, if nessicary I can shrink the worldmap but I would like to keep it rather big. The big worldmap is the whole point of this "adventure game" test. Well well, thats that, here is a screenshot I took which shows how it looks, it got a bit messy..

[URL=http://img229.imageshack.us/my.php?image=helpmefc5.png][IMG]http://img229.imageshack.us/img229/9784/helpmefc5.th.png[/IMG][/URL]

I`ll see if I can make sence of your ideas of the conversation and pop up window in tgf now, I probably check back again tomorrow if I got the oppertunity to do so.

 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
7th July, 2008 at 16:00:41 -

Well the pic didn't seem to work. I only had time to skim what you wrote-- so I'll just say this and reread it in a bit. You are limited to 256 objects, they could all be the same object and the limit would still be there. As far as I know (which is pretty far. ) You can have as many backdrops as you like, because at runtime it blops all the backdrops into one image. I'll see if there was anything else you wanted in a bit.

EDIT: Well, I got the pic: http://img229.imageshack.us/my.php?image=helpmefc5.png But I don't have time to read it. Sorry. I'm sure J&G will help you.

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
7th July, 2008 at 16:17:44 -

Also, had this to say: I think you could detect what type of gridspace the character is on by keeping it in a "databank" if you will. Arrays, INI's (I guess), Values, all could work. You could compare the gridspace's number to a certain entry in the databank, and then it would do the correct action. (1 could be river, 2 could be grass, 3 could be road... etc.) That would, however require you to manually enter in each grid's type. I'm absolutely positive what you're wanting to do is possible, but I can't devote too much brain energy on it right now. It's probably something simple.

 

  		
  		

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
7th July, 2008 at 17:48:18 -

I'm going to answer this more fully later. I cant now because a thunderstorm has appeared and I'm stuck using a PSP. I'll post my own idea later, but to variate on OldManClayton's idea, you could use an array to put 1600 values, each representing a grid square. If you set the player's hot spots to the top corner, then you can have an event that takes the X and Y positions and divides them by 50 to know which square they're in. But that and the idea I haven't yet posted seem too 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

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
7th July, 2008 at 20:11:06 -

I read this and thought of a way for you to implement it the way you wanted it.

Then I decided it wasn't that great.

Firstly, make one active for each tile. Then make backdrop versions of each tile that has a lot in one area (tiles that will exist as more than one adjacent, for example, sea tiles will have a lot of tiles adjacent to each other). Now you make the events that define what happens when you land on each tile. In each of these events you should also have it activate a flag on the character, and for every step it takes, unless it lands on a different kind of tile, it should continue to assume that it is stepping on the same tile.

Attach active objects to the character so that you can make it impossible to move in the direction of that object if it overlaps a sea tile. That is the only good part of my original idea.

If the map gets so big it can't accomodate even this or the other methods mentioned by me and OldManClayton, maybe you could make multiple world map frames, and when the player goes too far off the edge of one map, it shows some cool looking loading or transition frame, then moves to another world map. Maybe graphics will help:

Storyboard
|----|
1| | World Map 1 -----
|----| |
___________________ |
|----| |
2| | World Map 2 <| |
|----| | |
___________________ | |
|----| | |
3| | Transition |<---|
|----|
___________________

When you walk off the right edge of World Map 1 (Frame 1) the game jumps to Transition (Frame 3). Transition contains either a simple loading screen, or maybe a graphic of the character walking down a road or something. Once the transition is done (maybe you can also use the transition frame to temporary save, or do work with global values and strings), the game jumps to World Map 2 (Frame 2) as the character walks in from the left. That way you can have more objects and a bigger world map.




 
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
7th July, 2008 at 20:55:25 -

If I read what Jon & George Lambert said correctly, he had an idea similar to one I had... Have big chunks of adjacent grid tiles that are the same in one object. You could possibly do it in active object fashion in this way if it cuts the number down enough. Also, I just realized that you could try to have randomly generated world map, a la Pixelthief's recent game whose name I've alredy forgotten. However, to make the maps not ridiculous, it would probably employ some complicated stuff to make it sensical. Ya know, like a river tile has another one next to it, with another, and another... and all the road tiles have road tiles next to them, etc. The level jumping suggestion is a very plausible solution, many good games have employed a Zelda-esque map scrolling system.

Jon & George, do you mind if I just call you "J&G"? It's awfully time consuming to type "Jon & George Lambert."

Oh and, Lonnemyr, I thought I'd just say that from the screenshot and the concepts you're trying to make, I think your game will shape up nicely. You definitely have the mindset for it.

 

  		
  		

Lönnemyr



Registered
  30/06/2008
Points
  69
8th July, 2008 at 07:42:37 -

Arrays is something I`m not familiar with at all, not even sure what they do.. Same goes for flags. The more then one frame worldmap idea could work, but it would require more loading and saveing though. If I were to do it wouldn`t the best way to do it be to finish one part of the map, with all events the game requires to run, then copy that frame and adjust those things which would need to be fixed/changed?

However, about the "backdrop ideas" you are both suggesting. How will I be able to set events?`The only thing I can think of using is an event that says something like "if X counter is blabla and Y counter is blablabla - Then this..." and that would leave me with.. um, one event for each grid? I`m sure what you wrote was something smarter then that, but I didnt get all of it becuse of the "array" and "flags".
Jon & George Lambert`s second idea was kind of confusing, it would be great if you could explain it in further detail. I didn`t even get the "how player won`t be able to move on top of water tile" part.

At the moment me movement and XY values work like this;

Uppon pressing"up arrow" - set player position at (0,-50) from player - subtract 1 from Y counter.

And then I have one of these events for each arrow key, I thought that would be the most simple way do to it.

The randomly generated worldmap is another intersting idea, it has crossed my mind but I decided that I would leave it be untill I finish the "static" worldmap. Then, if I still feel like it, I could add another option in the main meny which said "random generated worldmap" ..or something.
The static could be like a story mode or something like that if I were to add it? But I`m sure randomized maps isn`t as easy so I start out with this not so randomized huge worldmap and get it to work. First things first as they say!

OldManClayton

Oh, and thank you. I`ll hope you`r right. Try my best to make this a good game even though it was meant as a test.

 
-

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
8th July, 2008 at 12:02:00 -


Originally Posted by Lönnemyr
If I were to do it wouldn`t the best way to do it be to finish one part of the map, with all events the game requires to run, then copy that frame and adjust those things which would need to be fixed/changed?


That is probably the best way, it's simple enough and less work.


Originally Posted by Lönnemyr
However, about the "backdrop ideas" you are both suggesting. How will I be able to set events?


Flags are like on/off switches for active objects. They exist on the same menu as the alterable values when you are defining actions in the event editor. You can use them to make certain things happen only when a flag is on or a flag is off. So, what you should do with the flags is this:

"Player" overlapped "Grassland Tile"
+ Only one action when event loops
= Set counter to random value (2)+1
Turn flag 1 on
Turn flag 2 off
Turn flag 3 off
Turn flag 4 off
Turn flag 5 off
Turn flag 6 off
Turn flag 7 off
Turn flag 8 off
Turn flag 9 off
Turn flag 10 off

"Player" is stopped (or whatever defines that they aren't moving in your engine)
+ X "Player" is overlapping "Group 0"
+ Flag 1 is on
+ Only one action when event loops
= Set counter to random value (2)+1

The X in front of the second condition in the second event is to show that you should negate it. The "Group 0" is representative of a group containing all the kinds of tiles. That way, you don't have to put each tile individually. Repeat the first event for each tile, with the different effects, then the second event for each flag. Use different flags for each tile. You have to make sure to turn off the other flags in each event to make sure that they don't accidentally activate multiple events at once.


Originally Posted by Lönnemyr
I didn`t even get the "how player won`t be able to move on top of water tile" part.


Your movement works that when they press a key, they get moved 50 pixels one way or the other, so create four new actives that are 50 pixels by 50 pixels and add this event and this condition to it:

The new event:

Always
= Set "Up Block" position to (0,-50) from "Player"
= Set "Down Block" position to (0,50) from "Player"
= Set "Left Block" position to (-50,0) from "Player"
= Set "Right Block" position to (50,0) from "Player"
To the original event:

+ Up Block is not overlapping "Sea tile" (change the name of each block to the respective direction and add this to the event to move each direction)

That way, when one of them overlaps a tile that the player isn't supposed to be able to walk over, the engine refuses to let them move in that direction.


Originally Posted by OldManClayton
Jon & George, do you mind if I call you "J&G"?


Go ahead, if it was me, I don't think I could type that out every time either. Also, did you check your smiley thread?

 
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
9th July, 2008 at 07:40:44 -

What I`m still unsure about is how do I set the "Player" overlapping "Grassland Tile" event?
I would know how to do it if the grassland tile was an active object, but you said I should make
them into backdrops?
As far as I know, there is no way to choose a specifik backdrop object in the event meny, is there?
All I see is following options;

Collisions

Another object (refering to an specific active objects)
Overlapping another object (refering to an specific active objects)
backdrop (refering to ALL backdrops)
overlapping an backdrop (refering to ALL backdrops)

unless there is something I`m missing this is how it works, so if my tiles were to be backdrops I could not use the collisoin
event to specify a tile, becuse if I selected lets say "overlapping an backdrop" it would run the event
no matter which backdrop the player were to step on, be it land, sea, monutain of forests.

The "active block" objects were a great idea though, works like a charm. But like all the other objects
it will only work if the sea tile is an active object? Sure I could "build a frame" of active sea objects and
put backdrop sea tiles inside (is this what you have been hinting at?). It sure is a possibility to do this with all places were a
big area is covered in the same tile, however. It would still require alot of actives, not to mention, I would
have to count them all of the time to make sure I don`t place to many (still got to have room for at least 15+
"other" actives as well, just in case I need it.

I`ve been counting and if I were to use active objects on all grids I could only do frames about the size of
750x750 (or 800x600) which is really tiny. Hence to make it an epic worldmap I would need ALOT of frames and it would
still not seem so epic since it would be hacked to pieces and the player would not get a good overview of the world.
If I were to hack the map in pieces I prefer 4 frames of equal size. Still, it would rob the player of the abillity to see the
whole map which would be a really cool feature.

Now, lets say I used the "put backdrops inside a frame of actives idea" when I cover big areas in the same
tile. It would probably increase the size of the frames a little, maybe they would be able to be twice the size in some cases.
But, all frames should be the same size if you split your worldmap in pieces, otherwise it might be confusing
for the player.
Becuse some areas of the worldmap might have "big" areas of woodland or a big sea while other might have
more detailed landscape you would end up using 200 actives in some frames and maybe 50 in another.
So, even if some frames had the capabillity to be really big I would still need to adapt the frame to a size which
would work for every other worldmap frame.. so all it takes is that one piece of the map got some details and, *poffs*,
the frame size didn`t get that much bigger anyway! :/

What about these two ideas then..

First idea; I dont know if this is possible but it might be. Say you had this big worldmap but had some way do create/destroy actives
that are outside the screen. then all objects could be actives which would make it easy to set events and such. BUT, there would
have to be an event for each grid that decides when the tile should be created/destroyed. And it would be kind of hard to build the
worldmap as well.

...something tells me that all those events and all those objects being destroyed and created all the time would
have e big impact on the performance.

The second idea might be a better one, compared to the first.

What if I made all the tile:s backdrops and made one event for each frame using the XY counters in the upper left corner.
Sure, I would need to be halfcrazy to try it since it would take forever, but would it work? Would all the events make tgf go into
"crashnburn mode" or run laggy? If I`m correct, they would not all be running at the same time would they?

This last option would however, if it worked, let me create a worldmap in whatever size I wanted. Also I could use active objects for
citys and such. Even if it would take time, would you recommend this option or would there be complications? To many events?

Might be a bit early to discuss another question since we`ve not found a solution the the tile problem yet. But if possible
I would like to have a "fog of war" effect on tiles that the player have not yet visited and I can think of 2 ways to do this.

a) if all objects on the frame would be actives (which would give me a really small frame) I could have all tiles play a animation
which would be just a black box, uppon moving to this tile it would change the animation.

b) if I used mixed tiles, the "frame" idea, I could have the active objects play animation and have another "fog of war" backdrop
on top of all the backdrop tiles and destroy them when player moved there.

But there is a "problem" with both ways, if all grassland active objects are the same, then wouldn`t they all change animation? And
for the backdrop objects I would need 1 object for EACH grid, otherwise when one is destroyed, wouldn`t it happen to them all? Maybe
that wouldn`t happen to the backdrops? Um, well ideas about how to do this? Thought I might as well mention it becuse it is connected
to the size of the worldmap, in a way.

[EDIT; just noticed, stupid me. You cant destroy a specific backdrop! O__o]

And another thing I`ve been wondering about, whats the diffrent between the "run this event once" and the "only one action when event loops" conditions?

Image Edited by the Author.

 
-

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
9th July, 2008 at 09:35:56 -

For the player overlapping Grassland tile event, I assumed you would either be using all actives or actives and frames.

About the frame of the sea, that is what I was hinting at.

You could give the illusion of a full map by making the character continue walking off the map automatically and the frame goes straight to the other map so it looks like it is one map.

The first one, if it didn't crash, would indeed be a big impact on performance.

The second one might work better, but as you said, it would take forever and you would have to be crazy or incredibly patient to do that.

Maybe if you made the fog of war work in larger general areas, like maybe nine by nine or covering new entire areas, maybe a mountain, and when you take one step on the mountain, the entire mountain is revealed.

"Run this event once" works so that the event can happen only once in the entire frame, only if you restart it can it happen again. "Only one action when event loops" means that it will only do what it should once while what causes it is happening, e.g. "Player" overlaps "Grassland Tile", the actions you put will keep happening while it overlaps the tile, but if you put "Only one action when event loops", then the actions will happen once while you overlap the tile, and wont happen again until you stop overlapping the tile and overlap it again. "Repeat" will do an event a certain amount of times in a row each time the event takes place. "Restrict actions" will make the event impossible for a certain amount of time after the frame starts.

 
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
9th July, 2008 at 12:56:05 -

Ok, I think I`ve decided. This is a toy project so I shouldn`t think to much about it, I`m making it to learn anyway.

This is how I`ll do it.. Each frame will be 800x600, same size as the screen resulotion. I`ll use active objects in every grid, except sea and road tiles. For the sea I will build a frame of actives around some backdrops (mainly becuse I dont think I will have much events occuring on the sea even if the player would be able to move there somehow, and for he road I will just use backdrops since they will mainly be "event free". And then I could set those "special" events by using the XY counters if it`s just for those few grids.

there will be 196 grids in each screen, 196 active objects (- 20-30 becuse each frame will probably have some roads and sea tiles). Add to this 24 other active objects which will be black boxes the size of 150x150, these will work as "fog of war tiles".

I will probably skip the in between loading screen and make the player go straight to the next fame, which would hopefully give the illusion that the camera just moved a bit.

Hence, each frame will be build with 220 active objects (- 20-30 thanks to backdrops). I will then have about space for about 50 more actives which would be more then enough for the player, the four block objects, some dialog and maybe some fog tiles.

Thing is, will this be laggy becuse I`ll use so many actives? or is 256 just a "magical line" which tgf just wont handle? Remember this will be a snap to grid movement so a little lag would probably be OK.

If it turns out laggy I`ll use the "frame of actives+flag" idea on more places and further decrese the amount of actives on the screen, but I rather not. I like actives and actives like me

Jon & George Lambert

Thanks for the explanation, I thought it might be something like that but I wanted to make sure.


Now I get back to clicking, but I`m sure there is still some things which I need to ask about later on. Meanwhile, thanks for the help all of you.


[EDIT; well I got another problem again, heh.. This time it got to do with the fog of war and player position when player jumps to another frame. See, I have one fog of war object which is created all over the map at the start of the level, it looks and work well within the frame, BUT when the player leaves the frame how am I supposed to make the game remember what the player have explored? I will have to enter some data into an INI object, that I understand but I cant figure out exactly how I`m supposed to do this.

second question is, how am I supposed to make it so if player exit the map at location X800 Y6 he will enter the next frame at x801 Y6? This is probably not so complicated as I make it, as usual.]

Image Edited by the Author.

Image Edited by the Author.

 
-

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
9th July, 2008 at 14:53:31 -

If each frame is going to be 800 x 600, then wouldn't the player appear at (0,6)? Unless the frames are using 1600 x 600 and only using 800 x 600 of that space. Anyway, if you aren't using all the global values, then you can make the last two values (or any other two values, but the last two and first two are easiest to remember) to store the position information. For example, if your map looks like one big square cut into four corners, then you can just set the values as so:

Moving off the right side:
First value: Y position of Player
Second value: 2

Moving off the left side:
First value: Y position of Player
Second value: 2

Moving off the top side:
First value: X position of Player
Second value: 1

Moving off the bottom side:
First value: X position of Player
Second value: 1

Assuming there will only be four maps, and the maps make a square (not a line, or zigzag or anything), then the following method will work. Setting the values the above way will work as such.

From now on, assume that your map is situated this way:


Each disk represents one frame of your four frame world map.

When the second value equals 2, that means that the player will enter from the horizontal side, so when moving to the right, it sets the X position to 0 and the Y position to the first value. When moving to the left, it sets the X position to 750 (800 minus 50, because your character moves 50 pixels at a time, correct?) and the Y position to the first value.

When the second value equals 1, that means that the player will enter from the vertical side, so when moving to the top, it sets the Y position to 550 (600 minus 50) and the X position to the first value. When moving to the bottom, it sets the Y position to 0 and the X position to the first value.

For the fog of war question, you'll have to give each fog of war tile a number, then save it in the INI this way:

Set Group to "Fog of War"
Set Item to Number of Tile (as in, which fog of war tile it is, this is like 1, 2, etc.)
Set Value to 0 (if the fog is there) or 1 (if the fog isn't there)

To give each fog of war tile their own number that will always be the same, in a Start of Frame event, move over to the Fog of War object and choose to set Alterable Value A to Spread Value 1. I don't remember how to do this in TGF1, sorry, but it can be done. Then, in an event like Timer equals 1 second, make the INI go through all the items in the group "Fog of War" and for each value that is 1, it destroys the fog tile.

 
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
10th July, 2008 at 13:32:22 -

Jon & George Lambert

You might be right, at the new frame it will be 0,6. I were thinking like alla the frames were like one and the same, you understood though which is good. I dont think I`m using all Global values, but the more I work on the small details the more values I find myself using, it`s like "for this to work I need that, and then I need that too..."

I think I`ll try to make it 9 frames now that each one got so small (it is alot of grids but the map looks really small when you look at it. So unless I find some reason not do, the map will look like this;





I found myself having some problem with the dialog yesterday, it`s kind of complicated to describe the problems this time since I`m not relly sure what`s wrong(or right either for that matter). So, any idea were I can upload the gam file so you guys could see it? It`s a bit messy but at least I named all tiles and event groups, it would be a big help.

For the fog of war tile, then I cant copy the same tile then if I have to name them? I will have to have 24 unqie tiles for each frame, am I correct (which mean it will be even more objects to scroll by in the event editor)?

 
-
   

Post Reply



 



Advertisement

Worth A Click