The Daily Click ::. Forums ::. Klik Coding Help ::. Help me fix a small bug!
 

Post Reply  Post Oekaki 
 

Posted By Message

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd October, 2008 at 01:02:24 -

No problem. You can always message me too if you have any more questions - you've got 29 days til my TGF demo expires
It's up to you, but I'm not going to be offended if my name's not in the credits.

The flag is actually the cross of St Piran - it's the Cornish flag.
Good luck

 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
3rd October, 2008 at 02:23:52 -

Sketchy

I thought that you were a fellow Swede there for a while (the flag should have been a little more blue and yellow)... what is the "cornish flag"? Never heard of it.


_____________________________________________

Phew, I should really go to bed but before I do I could as well ask one more thing.

I`ve set PurPur`s attack at ctrl, his range is the same as "baddy 1`s", but he has a diffrent color on his scratch animation. The "problem" is that I`m unsure which way is the best one to set a small delay in between PurPur`s attacks (a half sec would probably do). I don`t want the game to be about who`s the best keyboard masher

And I used "baddy 1`s" alterable C value to store damage, and I`m thinking about using the C value for all enemys damage storing though out the game. This seems like a good solution to me but since I´m not that good with TFG or other klick products I just want some opinions on this? Thanks.

here is the download; http://lonnemyr.googlepages.com/home

Thats all for today, goodnight folks..

 
-

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd October, 2008 at 17:23:17 -

http://en.wikipedia.org/wiki/Cornwall


It should be quite easy to create a delayed attack for the player in exactly the same way we did for the baddy.

However...
What's worrying me at the moment is the fact that your baddies don't move. Because of this, even if you add a delay, it will be easy for the player to get close, attack, and then move back out of range before the baddy gets a chance to fight back. This might not be very much fun?

You have various options;

1.) Parting Blows
* make the delay between enemy attacks slightly random - not just a fixed 3 seconds.
* add a moderate probability of the player being hit as they move out of attack range.
-> this would force the player to judge whether they could make another attack without being hit, or if the probability of being hit whilst doing so is higher than the probability of being hit by withdrawing.

2.) Ring of Red
* again, make the delay between enemy attacks slightly random - not just a fixed 3 seconds.
* the player holds down attack button to prepare. The longer the key is held for, the higher the probability of a hit when the player does attack (by releasing the button).
* also factor in some kind of "evasion" rating for enemies.
-> this would get the player to adopt different strategies against different enemies. Against tough (lots of HPs) but slow (low evasion) enemies, it would be best to make lots of quick attacks without spending long aiming. Against small, agile enemies the player would have to spend longer aiming or they'd never hit.

3.) RPG-like
* a more stat-driven combat system.
-> reduces the luck factor, but very ambitious and probably not worth the effort?

4.) Mobile Monsters
* allow the enemies to move so that running out of range isn't an option.
-> I'm not talking about complicated pathfinding, but a very basic routine should be moderately easy to code (something a little like this: http://www.logicmazes.com/theseus.html ).

"Rogue" has a fairly basic system of enemy behaviours that is not unrealistic to recreate;
* aggressive - once player enters room, monster immediately chases and attacks player.
* normal - monster does not move until attacked, and then chases and attacks player.
* passive - monster never moves, but will fight back if attacked.
* greedy - once player enters room, monster runs to guard nearest treasure chest.


These are just a few ideas - I'm sure you can think of others.


 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
3rd October, 2008 at 23:48:03 -

True. Indeed I have been thinking about the combat system but it`s hard to decide for something becuse when the choice is made it pretty much affect the whole gameplay. One thing I`m sure about is that I need different types of enemies (kind of obvious), some with quicker attack, some which hit a bit harder, takes a bit more dmg and have diffrent range of course.

But as you say, even if I add a bunch of new baddys to the game it will still be kind of static if they never move. without enemy movement I would need to try to put every enemy in a stratigic position to make the game challanging. I don`t know if I said it before but mainly I`m planing for puzzels and exploring, combat is second (like the zelda games), still I don`t think the combat engine feels finished yet either.

*think* *think*


Unlike most RPG:s were you often can take alot of dmg since you got alot of hp and armor I rather have a game were getting hit is crucial. After all you`ll only start with 3 hearts and most heart pieces will be "well hidden" or bought (expensive!) in a store/found in a dungeon after defeating a boss.
I`m thinking about maybe giving PurPur the possibillity to buy an temporary "armor" which can take 1 or 2 hits from the store, but that will still not make him a good brawler(There will probably be no more then 16 hearts in the game btw.. kind of odd number, I know. And at least 6 of them will probably be hidden at really crazy places so the average player probably won`t find all of them, like digging in an exact spot and things like that..).

RPG system is out of the question since "A purpur tale" is more of an adventure game then a rpg. It would give the wrong feeling I think and it is also probably the one that requires the most work.

Parting blows.. hm I don`t know, still seems lika more of a brawl then strategic combat. You don`t know when you`ll get hit so chances are the player just charge in guns blazing.. if you get hit, you get hit but it`s still better then moving back and getting hit right? I guess you could tweak it a bit to make it a little more strategic but still, PurPur won`t be able to take much dmg.

Ring of Red(odd name?) ..This is a good one I think. Would be handy with a power bar or something like that to see how much power you have before you release.

Enemies could have diffrent; evasion, attack power, hp, range..

Still they would stand still which would require me to take great care in were I put every singel foe. And even if I put them all in very good spots it would still be kind of a love/hate system. Some might like the idea of trying to sneak or fight their way past "cockblock enemies" but some might think it`s booring that they never move.

Mobile monsters.. This could be good but if you can`t escape, then there isn`t much strategy anyway? PurPur takes a step back, baddy 1 follows.. time goes by, purpur will eventelly have to take the blow. Ofc you could add a twist or two, but feels like it would either be a hit and run sceniaro or a just a simple brawl again. Trying to avoid the brawl factor, very important And since the game is a "snap to grid" with each tile being 50pix running around hitting people won`t work as neat as in say "Zelda: A link to the past". Feels like the grid kind of kills this idea =/

To have diffren behavior for diffrent foe`s is not that bad. Seems like there would be fairly complex though (My TGF level is on making pong games, really).


Right now I`m thinking about a mix maybe? This game is grid based, and you really feel it, so a action combat system feels a little out of place. Still RPG battles are slow and get annoying. Something in between would be the best solution I think, som kind of action strategy combat?

I really like the "prepare attack" idea. It would go niecely with some "miss", "hit" and maybe "critical hit" animations so you see what`s happening. For each enemy to have a really small chans to backstab when purpur steps out of range would probably be acceptable. It should be rather low though so it would still often be a good choice to step back for a while now and then if needed. However I see things though, somehow, someway, enemies NEED to be able to move, if just a little. I have no Idea how to do this though without adding lots of detectors for each foe. But if there is a possibility that a second enemy might join the battle the games combat system would`t feel that static.

Some kind of behaviours could be a good way to add diffrent types of enemy movement easily when they are finished in the event editor.

More suggestions? Got any idea how to do anything of this btw?



I can see now that I gave birth to a huge block of text, I hope you can deal with it.

 
-

Lönnemyr



Registered
  30/06/2008
Points
  69
4th October, 2008 at 00:02:33 -

Oh! And another concern.. right now I`m testing if "A purpur tale" would be better in a larger frame (test frame is 3000x3000), it`s possible becuse I don`t have to use alot of forbidden zones like I first did, almost everything the landscapes are made of is backgrounds now.
Anyway, bigger frame then screen resolution requires scrolling so I set a new event - always foucs screen at 0.0 - purpur. Now till the problem. The status bar is in the left upper corner were it should be, all active objects there and counters are set on not following the screen.. but what about hackdrops? Can I make them do something liek that too.. or do I need to replace them with actives?

 
-

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th October, 2008 at 00:54:37 -

Ok, a lot of points there for me to respond to...

"a game where getting hit is crucial"
I don't have a problem with that, but it may make things a little trickier...

"probably be no more then 16 hearts"
Mole Mania (my favourite game ever) has it so you must find 4 pieces in order to make a whole heart. I'm not sure Zelda doesn't but I haven't played it in years...

"temporary armor"
Maybe. Try it and see I guess. In Zeliard you can buy shields which absorb damage from frontal attacks only, so if someone sneaks up on you from behind you're dead pretty quick.

"RPG system is out of the question"
Glad you said that - not sure I'd know where to start even.

"Ring of Red(odd name?)"
There's a game called "Ring of Red" that does something similar (but it's a 3D action strategy game with mechs). I've never played it, but it sounds quite good.

this is from an FAQ at www.gamefaqs.com ;
"a percentage shows up on the right side of the screen. As time
progresses, the percentage grows. The precentage is the precentage that your
shot will hit the target. The longer you wait the better your chances of
hitting the target. This is also bad baecasue it give the enemy more time to
attack you! Also, if you are hit while you are targeting an enemy unit, your
percentage goes back to beginning!"

"if you can`t escape, then there isn`t much strategy"
They could be made slower than the player, and certainly could be out-smarted as their pathfinding will be so basic.
You could also consider making your game turn-based. By this I don't mean giving the player action points etc - but make it so enemies move 1 square when the player moves one square.

"diffren behavior for diffrent foe`s......would be fairly complex"
It doesn't have to be - the first three behviours I listed from Rogue would only need one or two different events each.

"Got any idea how to do anything of this btw?"
I'll probably leave the actual combat bit for a while. However, I could use the enemy movement in a game I'm working on myself. I've had a think about it, and I have a pretty good idea in my head of how I want to do it. Could take me more than a day to get something that works though.

"would be better in a larger frame"
I would almost certainly say yes, use one big frame. 3000x3000 is actually a very manageable size - I'm sure you could go even bigger if you wanted. The only potential problem will be with enemy movement - you don't want every monster on the map converging on the player from the outset.
Somewhere, I've seen a really good example of Zelda style scrolling - really easy, a single line even maybe. I'd probably go with that (I'm pretty sure I can find it again).

"but what about backdrops?"
yes, it looks like you'll have to change them to actives.



EDIT: Found a zelda scrolling example made in TGF - it's a lot of events though (think I can find a better one, but maybe not with TGF I guess) http://www.clickteam.com/CTforum/showthreaded.php3?Cat=&Board=fac&Number=290637&page=&view=&sb=&o=

Image Edited by the Author.

EDIT: This is more like it I've converted an MMF example to working TGF. It would have been a single event in MMF but because TGF doesn't have Min() and Max() it's 6 lines
http://cid-b1e7ee094271bbda.skydrive.live.com/self.aspx/Public/Scrolling.gam

Image Edited by the Author.

 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
4th October, 2008 at 04:06:46 -

By the way, hitting in close combat will probably be PurPurs basic attack and will stay pretty much the same though out the game, thou other items such as bombs etc is to be added which might also need to be good to have in mind while thinking out a combat engine I think. Unfortunally I have not come up with that many items yet.. and bombs are the only ones which will have some kind of battle effect so far of the few I have thought up at this point.

I still think ring of fire example is really good, but there need to be more (enemy movement etc) to make the games battles fun. It would be a nice thing to be able to have something like that though, especially in boss fights to make them more tough (be giving them high evade so you`ll have to really time your attacks).

If you get any bright ones on how to do it, tell me even if it`s just a "rough though". It could always be improved later on.

And yes you`ll have to collect heart pieces in zelda too, but you can find a whole heart here and there if you`r lucky. And after a boss fight you`ll always get a whole heart etc. Depending on how big the "world map" is when the game is finished I might hide both whole hearts and heart pieces, but if it gets to "small" I´ll stick with whole hearts. I have three gold cats, a coinbag and other tresures to hide as well so...
I guess all you would need is a counter and an animated active object with 4 animations to simulate heart pieces so it`s not so much work.


Yeah I agree, it´s to early to decide if there should be a "temporary armor" item. I got the idea from "The legend of the Mysical ninja starring Goemon" for N64, one of my favorite games There you can buy an armor and a helment which both can absorb 1 or 2 attacks I think.. I like the idea of an armor item that you can buy before taking on a dungeon, gives the same feeling as go buying blue potions and catching fairys in Zelda to "stack up". It`s a cosy feeling.

The movement I had in mind when thinking about "moving enemies" was that kind of turn based one you mentioned. Purpur moves which triggers baddie so he moves. Thats why I thought that it would be kind of hard to escape.
Nice to hear you are working on a game.. and a movement engine, it`s no rush really with the combat part for my sake, I would need some help when the time comes though. But it could be wise to sort out how the baddie`s movement will be before taking on the rest of the enemy AI (since they kind of affect each other).

May I ask what kind of movement you are working on, something grid based? I noticed something with the current movement in "A purpur tale", it`s possible to moon walk and/or moon slide if you press more then one button. That might be becuse I added the "change purpur`s direction" event afterwards, I`m sure it could be fixed though. But I`mk thinking about not just changed direction later on but playing a walking animation when he moves, that should be stable right?

Thank you very much for the link, funny thing because I was thinking about how to do exactly that earlier today, even spoke to a friend about it. It`s easier on the eyes then just plain "jumping" to the next frame. About grindquest you told me about earlier. The game was cool, really advanced stuff but there is two things he could definally have done better. First is bigger resolution, why does everyone make their games to fit such small windows? And then there is the lack of movement animation, made my eye heart a bit. If he`d just done that it would have been an even better game in my opinion. So I really want to fix those things in my game


Another late nighter, hope what I wrote is understandable.


 
-

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th October, 2008 at 13:28:12 -

Ok, here's what I'm thinking for the battle system;


TIME
Elapsed time since last attack.

DELAY
We need a delay between attacks, or the player could just keep mashing the keyboard - even with very low hit%, if they attacked frequently enough they'd get lucky quite often.

SKILL
Helps determine the rate at which hit% increases (along with defender EVASION).

EVASION
Helps determine the rate at which hit% increases (along with attacker SKILL).

HIT%
The probability of a hit.

MAX
This makes the increase in HIT% non-linear (slowing as over time).

CRITICAL
Helps determine the probability of a "critical hit" which does extra damage.


// add a delay between attacks
* if TIME > DELAY
-> start aiming...

// gradually increase accuracy
* while aiming...
-> set HIT% to (TIME * (SKILL / EVASION)) - (MAX * (SKILL / EVASION))

// critical hit!!
* on attack
* (70 + RANDOM(100)) < ((HIT% - 70) * CRITICAL)
-> do lots of damage!
-> set enemy TIME to 0 (make them start aiming all over)
-> end attack

// don't allow accuracy to go over 90%
* on attack
* HIT% > 80
-> set HIT% to 80

// hit!
* on attack
* RANDOM(100) < HIT%
-> do some damage
-> subtract 20 from enemy TIME
-> end attack

// end attack
* on attack
-> end attack (ie. set TIME to 0 etc)


The actual effect of all this is as follows;

Player has to wait a short time before they can attack. After this time, their accuracy increases - rapidly at first but then more gradually.
The players accuracy can never exceed 80%. However, once accuracy is over 70%, there is a chance of a "critical hit". The probability of a critical hit continues to increase even after accuracy goes past 80%.


By far the hardest part of this is going to be handling combat with multiple baddies

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th October, 2008 at 13:51:02 -

After finally finding a work-around for a bug in TGF, I'm starting to get somewhere with the enemy movement. Could still be a little while before I can send you an example file though.

How does this sound...

* Map will contain multiple "Zones". These are just large invisible actives, all with the same qualifier. Each room in a castle would be 1 zone for example.

* If player walks into one of these zones, all enemies in that zone will either move towards the player (if "aggressive") or do nothing (if "passive").

* If player attacks a passive enemy, they will become aggressive (surprising eh?).

* If player leaves a zone, enemies in that zone will either stop chasing (if "normal") or continue to chase (if "persistant").


The actual movement is a lot like in "Theseus & the Minotaur" except the monsters won't always choose horizontal movement in preference to vertical movement. Still, enemies won't be able to follow you around a corner for example.





I must admit, I hadn't noticed the "moonwalking" bug, but I'll look into it. I noticed a different problem though...

Suppose the map looks like this, with an arrow between PurPur and a block, with a tree behind that.

P>BT

What should happen if PurPur tries to move ont the arrow? Should PurPur move and then stop, and if so, should he be allowed to move left (against the arrow)? At the moment he just moves *through* the block, which can't be right.

 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
4th October, 2008 at 16:23:43 -

Interesting. I tried zones in a game before, they would have to be rather big though so it would`t take so many of them.. but since I currently use so few actives I guess I have some to spare.. limit was at ~220 something i think. Last night I though something like giving the baddies another active which could be their "detection" zone but it would probably take less actives to do zones..

How hard would it be to add a " randomly moving " behavior? It would act like the passive baddie when hit but untill then just move around a little at "random".

Yeah I noticed that bug too, but it`s hard to erase, I do have an D and E detector in front of purpur, D is always and grid in front while E is always two grids in front. I put them there to assist with the pushing block events but they would probably come in handy later on while setting the "special item`s" events.
Anyway the E detector could be used in an event so purpur would`t be able to step on an arrow if there is an obstacle or trap overlapping the E detector. I`m not sure, mayube I`ve already set this event I dont remember, I was thinking about it though..

There would still be a problem if the situation was like this though P>>BT.. or any other combination with more then one grid traveling space on top of the arrow blocks. Make:ing purpur traveling against the arrows would be a bit weird and "buggy" as well. The only soulution I can think of right now is to take great care and try all arrowblocks in the game before release..

..pushing blocks on top of the red arrowblocks that looks like this; "PB<" CAN (not always) also trigger a simular bug, it prevents the arrow block from being created at the new spot so it looks like it goes on the arrowblock and then goes back again. Nothing wrong with that, it looks good but if purpur is really sneaky he could take the blocks place before the block is back and that would mean the blcok lands on purpur. And ofc the exactly same bug as with purpur and arrowblocks could also happen to push blocks and red arrows.

Might be able to solve the purpur situation becuse purpur got alot of detectors, I`m not so sure about the pushing blocks though.

Do you think it would be a good thing to add diagonal movement for purpur as well? I`m haveing a hard time to decide this. Sinve the grid is so big it might uh.. feel a little weird (but if it were added I think it would be able to take care of the moonwalk/glide bug since pressing those arrow would now cause purpur to go in a new direction now).


I`m in a hurry so I`ll just check back later!

 
-

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th October, 2008 at 17:25:34 -

This enemy movement problem is turning into a massive pain in the arse to be honest
It's something that's so simple in MMF but a nightmare in TGF because it's missing so many features and the object focus system doesn't work.

It's going to be a LOT of events.

Latest (unfinished) version here;
http://cid-b1e7ee094271bbda.skydrive.live.com/self.aspx/Public/ZoneMove.gam

Image Edited by the Author.

 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
5th October, 2008 at 01:08:24 -

Yeah, it is starting to get a little annoying that so many things that would work in MMF don`t do in TGF =/ I wonder if my friend still got his copy of mmf. Question; If you open a tgf save in mmf (or mmf2), would it be messy or is it possible to convert a gam file ? If that`s not a problem I might try to get my hands on that damn mmf =/

Thanks for you hard work Sketchy, I`ll download and check it out right away!

 
-

Lönnemyr



Registered
  30/06/2008
Points
  69
8th October, 2008 at 00:19:52 -

Ok, an update might be in order. I`ve got my old pc up and running now so I`m not stuck with TGF anymore (since I don`t have to work on my laptop). So sketchy, should I do an overhaul of the entire movement system etc now when I have mmf2 to work with?

The enemy movement file you uploaded btw, I think that was an pretty good AI. However, I´m not sure if maybe it would be better to give the baddies the power to move on their own, even if purpur don`t move. I´m still a bit confused on how to make the movment/combat system now, especially since I`m not to used to mmf (feels a little bit sloppy to use tgf solutions when there might be a better way to do it in mmf). Still like the idea of evading+loading attacks, enemey behavior, backstab chance etc.


Oh well, look at the clock. It´s getting late. I hope you`ll drop by again when you find time too.

 
-

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
8th October, 2008 at 16:27:24 -

There's probably not a lot of point changing the movement system now, since it's not overly complicated and it works.

The enemy movement probably can't be improved on that much either. The fact that it doesn't use detectors is probably a good thing in the long run, even if it seems complicated.

The scrolling can be done in a single line like I said before.

The part to do with attacking can be done better, but we're going to try and come up with a whole new combat system, so that's ok.
Before I actually start coding anything though, it would be helpful if you could be very specific about what you would want the combat system to be like.

Two examples;

Image

The first example is fairly easy to make. The targetted enemy is always the one in the direction PurPur is looking. It has an RTS style health bar, and a counter showing hit%.

The second type is like you get in Advance Wars, Fire Emblem, and just about every RPG ever made. It has the advantage that it looks good, but in most other respects it is not a good idea - It requires extra graphics, it's much harder to code (VERY difficult with multiple enemies), and it may be less user friendly (how would you move past an enemy without attacking it?). You could also show stats like evasion, skill, etc under the baddies.

Again, if you are thinking of some other way, let me know.

 
n/a

Lönnemyr



Registered
  30/06/2008
Points
  69
8th October, 2008 at 18:40:34 -

Good to see you back Sketchy!

The Second one would seem to me like typical finalfantasy battles. personally I find those annoying, they are fun to begin with but more than often you get boored with the combat before finishing the game becuse it takes more time to kill the most simpel foe.

So I`d say the first one is better. I want it to be realtime strategi if possible (the enemy can move even if purpur doesn`t), if it`s done right the game will feel more alive and also will this probably look better once I add some walking/movement animation for purpur and the foes. Diffrent types of enemies behaviour like you suggested before would be a really good thing I think, plus things like "evade" and "backstab chances".

In short I kind of like it to be simular to games like; Zelda and secret of mana, but, with a bit more strategi (aiming, evasion, backstabbing... maybe that temporary armor item), otherwise it will be very simple, no level ups just heart collecting, no new equipment just "unqie items" found in each dungeon etc. Each unquie item will give purpur the possibilities to find either a) new collectable hearts/golden cats, b) new locations to travel or c) both.There will probably be a shop in the game too were purpur can buy health potions etc. Thats about how complicated I`m thinking. Some of those unqie items might be tricky but that`s not an issue at the moment.

Purpurs attack will stay the same though out the game, but some other "unqie" items might make combat easier for him. Thats what I´m thinking.


Hm, I don`t think there is anything new in the event editor but when I get home I`ll upload the most recent version of the gam file, I can see that you have an old one (old grapics).


[EDIT; if you have any other questions about the battle engine, feel free to ask.]

Image Edited by the Author.

 
-
   

Post Reply



 



Advertisement

Worth A Click