English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 27 May 2010, 14:04   #321
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Yes, it is, but don't be fooled by the two player characters, and two enemies in the screen shots, later in the game you have many characters to control, and many enemies to beat per map (easily 20+ units per map, with additional units joining during the battle).
This sounds more like wargame than rpg.

Quote:
Originally Posted by Thorham View Post
Yes, it's turn based, and commands are executed immediately.
In which order are units taken ?

Quote:
Originally Posted by Thorham View Post
Yeah, that's true. Basically, the mechanics are almost finished, which means it's going to be time to implement the controls soon. I already have a half way finished line editor (just like the text box line editor in winblows), and I think I'm going to finish this after the mechanics. Still some work to do
I did some kind of work like this for my DM level editor, but i was too lazy to finish it and i never did the originally planned editable field

Quote:
Originally Posted by Thorham View Post
Of course? I don't see why they would use something else
Yes, no reason to do that

Quote:
Originally Posted by Thorham View Post
It might. It may be the case that this depends on the data which is being compressed.
Sorry, but Huffman alone is just poor. A simple repeated area of identical bytes totally defeat it. And that's a quite common feature in images.

Quote:
Originally Posted by Thorham View Post
Okay, perhaps I'll try again.
Could be good idea. But perhaps you just don't like exploring ?

Quote:
Originally Posted by Thorham View Post
Nope, it doesn't. No decorations at all.
I've seen this already
But then how can i get some ?

Quote:
Originally Posted by Thorham View Post
If you only need 16x16 pixels, then this is pretty easy.
Yes but i'd prefer having a generic bitblt routine - like my actual one.
It's all about including it in my system frame, then use it in the game - and potentially in many other programs later.

Quote:
Originally Posted by Thorham View Post
Right. But what about multiple monsters and/or multiple characters? Here's an example:

You have two characters, and one somewhat strong monster, which can only be defeated by your two characters. If one of them dies, you have to run away, or something. One of your chars has full hit points, and can safely be hit a few times, the other char only has a few hit points left and can't handle a single hit without dieing.

The char with full hit points is standing closest to the monster, while the other char is in range of the monster. Now the monster attacks the closest char, the char doesn't die, and you can counter attack with both your chars. The monster attacks the char that it previously attacked again, and you can counter attack with both chars again. Now the monsters fate is sealed, becuse you can kill it after it finishes it's turn.

It would be a lot more interesting if the monster attacked the char with few hit points. This would kill the char which would leave you with one, and one isn't enough to kill the monster, because it will kill your char first.

Of course, in big battles it can go much deeper than this.
Sorry, but this example just doesn't make it. It's still better for the monster to attack the closest char, because its fate would be sealed anyway - and in fact even worse, because of a rather humiliating defeat.

Let me explain. Your weak char can just move and the monster will use all its movement points (or whatever) to pursue him. Meanwhile, the strong character can attack the monster unhindered. Here i assume your weak character isn't in close contact with the monster. At the end : dead monster, having done zero damage. Shame on him !

On the other hand, if both characters are doing close fight, then there is nothing such as "closest to the monster" : they're just next to it and the monster would then select a random target, thus endangering the weakest one.
Of course the monster would change target at random, among all characters that can be reached.

Your example also means that the monster has the ability to identify a weak character. This isn't obvious. Creatures such as zombies certainly aren't that smart and even intelligent monsters may be fooled anyway.

Furthermore, making monsters vicious like that will mean that the player would more often have death striking his characters and this is no good for fun.
meynaf is offline  
Old 27 May 2010, 14:40   #322
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
This sounds more like wargame than rpg.
It's a strategic, turn based RPG that's completely battle and character management oriented. One thing that's missing is exploration. So yeah, it's basically a war game with RPG influences.
Quote:
Originally Posted by meynaf View Post
In which order are units taken ?
If you mean the unit order, then this is based on the speed of the units. You don't get a turn in which you can move all your units.

This is different than in Advance Wars which is a true turn based war game. In that game each player can move all their units during their turns.
Quote:
Originally Posted by meynaf View Post
I did some kind of work like this for my DM level editor, but i was too lazy to finish it and i never did the originally planned editable field
How much work is needed for this really relies on how much the line editor has to be able to do. I want full functionality, such as text selection, cut/copy/paste/delete, undo/redo, etc.
Quote:
Originally Posted by meynaf View Post
Sorry, but Huffman alone is just poor. A simple repeated area of identical bytes totally defeat it. And that's a quite common feature in images.
Yeah, perhaps you're right, and it's not such a good idea to try this on images.
Quote:
Originally Posted by meynaf View Post
Could be good idea. But perhaps you just don't like exploring ?
I just thought it was a simple demo level where you have to find the exit, where you can't do anything else.
Quote:
Originally Posted by meynaf View Post
I've seen this already
But then how can i get some ?
It really depends on what you want exactly.
Quote:
Originally Posted by meynaf View Post
Yes but i'd prefer having a generic bitblt routine - like my actual one.
It's all about including it in my system frame, then use it in the game - and potentially in many other programs later.
Sorry I can't help you, because I don't have a generic blitting routine. All I have is a cpu blit routine that only blits 16x16 pixel aligned sprites over 16x16 pixel aligned tiles. This is for my Advance Wars port, and it works, because only one unit can move at any one time, which means I can just use hardware sprites for that.
Quote:
Originally Posted by meynaf View Post
Sorry, but this example just doesn't make it. It's still better for the monster to attack the closest char, because its fate would be sealed anyway - and in fact even worse, because of a rather humiliating defeat.

Let me explain. Your weak char can just move and the monster will use all its movement points (or whatever) to pursue him. Meanwhile, the strong character can attack the monster unhindered. Here i assume your weak character isn't in close contact with the monster. At the end : dead monster, having done zero damage. Shame on him !

On the other hand, if both characters are doing close fight, then there is nothing such as "closest to the monster" : they're just next to it and the monster would then select a random target, thus endangering the weakest one.
Of course the monster would change target at random, among all characters that can be reached.

Your example also means that the monster has the ability to identify a weak character. This isn't obvious. Creatures such as zombies certainly aren't that smart and even intelligent monsters may be fooled anyway.

Furthermore, making monsters vicious like that will mean that the player would more often have death striking his characters and this is no good for fun.
Perhaps this is not such a good example, but I had to come up with something quick Anyway, I still prefer some sort of AI that doesn't make only the simplest of decisions.

As for identifying abilities, this example is based on Fire Emblem, and in that game both the player and the AI have the ability to see unit stats, and unit inventory. This ability is a controller ability and not a unit ability. In Fire Emblem this makes it possible for both player and AI to make more informed decisions. If you're making ID abilities part of a units abilities, then you'll still need some AI for smart monsters/enemies, so that they can put their ID abilities and high intelligence to good use (really, smart units should behave like they're smart ).

And also, once a units stats are known, less smart monsters, or, say, a summoners stupid undead units, can take those stats in account once they're known. In the case of stupid summons, the summoner is smart, and controls the summons in a smart way.

In my opinion an AI which is too simple can reduce the tactical element of a turn based game, and reasonable AI means the player has to play a smarter game, and that can certainly be fun if the game is properly balanced.

Last edited by Thorham; 27 May 2010 at 14:45.
Thorham is offline  
Old 31 May 2010, 14:32   #323
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
If you mean the unit order, then this is based on the speed of the units. You don't get a turn in which you can move all your units.

This is different than in Advance Wars which is a true turn based war game. In that game each player can move all their units during their turns.
Yes i meant unit order
But in which order are units of the SAME speed moved ?

Quote:
Originally Posted by Thorham View Post
How much work is needed for this really relies on how much the line editor has to be able to do. I want full functionality, such as text selection, cut/copy/paste/delete, undo/redo, etc.
I'm afraid i didn't do even a basic one

Quote:
Originally Posted by Thorham View Post
I just thought it was a simple demo level where you have to find the exit, where you can't do anything else.
Yes you have to find the exit and you can't do anything else, but it's not as simple as it looks.

Quote:
Originally Posted by Thorham View Post
It really depends on what you want exactly.
I just want indoor and outdoor gfx for a tile based game. What they are exactly is somehow irrelevant.

Quote:
Originally Posted by Thorham View Post
Sorry I can't help you, because I don't have a generic blitting routine. All I have is a cpu blit routine that only blits 16x16 pixel aligned sprites over 16x16 pixel aligned tiles. This is for my Advance Wars port, and it works, because only one unit can move at any one time, which means I can just use hardware sprites for that.
Yeah i know, no one can help me...

Quote:
Originally Posted by Thorham View Post
Perhaps this is not such a good example, but I had to come up with something quick Anyway, I still prefer some sort of AI that doesn't make only the simplest of decisions.

As for identifying abilities, this example is based on Fire Emblem, and in that game both the player and the AI have the ability to see unit stats, and unit inventory. This ability is a controller ability and not a unit ability. In Fire Emblem this makes it possible for both player and AI to make more informed decisions. If you're making ID abilities part of a units abilities, then you'll still need some AI for smart monsters/enemies, so that they can put their ID abilities and high intelligence to good use (really, smart units should behave like they're smart ).

And also, once a units stats are known, less smart monsters, or, say, a summoners stupid undead units, can take those stats in account once they're known. In the case of stupid summons, the summoner is smart, and controls the summons in a smart way.

In my opinion an AI which is too simple can reduce the tactical element of a turn based game, and reasonable AI means the player has to play a smarter game, and that can certainly be fun if the game is properly balanced.
You didn't have to come with something quick. You just had to give me some good example, because i don't see what can be abused in a simple approach.

You're saying about smart ai but you're not saying what it does that's different from a simple one.
meynaf is offline  
Old 04 June 2010, 16:00   #324
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
Yes i meant unit order
But in which order are units of the SAME speed moved ?
Hmm, I must admit that I've never thought about that... I think those are simply moved in the some order each time, but don't ask me how it's done exactly, because I just don't know
Quote:
Originally Posted by meynaf View Post
I'm afraid i didn't do even a basic one
A basic one is simple, and a full one is a pain
Quote:
Originally Posted by meynaf View Post
Yes you have to find the exit and you can't do anything else, but it's not as simple as it looks.
Indeed it isn't
Quote:
Originally Posted by meynaf View Post
I just want indoor and outdoor gfx for a tile based game. What they are exactly is somehow irrelevant.
Here are all the tiles from one of the Fire Emblem games. I don't know if you have them, but in case you don't, here you go (they're also in the Zone as a ZIP compressed PNG ):
Click image for larger version

Name:	fire-emblem-map-tiles.png
Views:	527
Size:	162.7 KB
ID:	25521
As you can see there's both indoor and outside tiles inhere.
Quote:
Originally Posted by meynaf View Post
Yeah i know, no one can help me...
Sorry It's a pity that I don't need a generic one. However, for your game you don't really need a generic one. In this case it's probably a lot easier to write one specifically for the game.
Quote:
Originally Posted by meynaf View Post
You didn't have to come with something quick. You just had to give me some good example, because i don't see what can be abused in a simple approach.
Okay, fair enough
Quote:
Originally Posted by meynaf View Post
You're saying about smart ai but you're not saying what it does that's different from a simple one.
The point is informed decisions. Think of chess. If a chess program only makes the most obvious moves, captures everything it can, etc, then it will loose to low level players. A chess AI that properly calculates it's moves is much harder to beat, and therefore more fun to play against.

Or, think of it this way. In a good tactical game, when you as a player always make the simplest of moves, you're going to loose. You have to make better decisions than just attack the closest enemy unit.

Hopefully this is a better explanation

Last edited by Thorham; 04 June 2010 at 16:09.
Thorham is offline  
Old 04 June 2010, 17:36   #325
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Hmm, I must admit that I've never thought about that... I think those are simply moved in the some order each time, but don't ask me how it's done exactly, because I just don't know
Unclear, eh ? It's not very important anyway as i have my own idea on the subject already.

Quote:
Originally Posted by Thorham View Post
A basic one is simple, and a full one is a pain
Exactly, especially because like everything else, it's never really full and more stuff can always be added

Quote:
Originally Posted by Thorham View Post
Here are all the tiles from one of the Fire Emblem games. I don't know if you have them, but in case you don't, here you go (they're also in the Zone as a ZIP compressed PNG ):
Attachment 25521
As you can see there's both indoor and outside tiles inhere.
Not quite the required flat style... But perhaps i'll grab a few things from it anyway.

Quote:
Originally Posted by Thorham View Post
Sorry It's a pity that I don't need a generic one. However, for your game you don't really need a generic one. In this case it's probably a lot easier to write one specifically for the game.
I just prefer it to be this way. The game itself can wait.

Quote:
Originally Posted by Thorham View Post
The point is informed decisions. Think of chess. If a chess program only makes the most obvious moves, captures everything it can, etc, then it will loose to low level players. A chess AI that properly calculates it's moves is much harder to beat, and therefore more fun to play against.

Or, think of it this way. In a good tactical game, when you as a player always make the simplest of moves, you're going to loose. You have to make better decisions than just attack the closest enemy unit.
But there are no informed decisions in that area ! Monster fighting has nothing to do with chess or tactical games.

Quote:
Originally Posted by Thorham View Post
Hopefully this is a better explanation
Oh yeah ?
meynaf is offline  
Old 09 June 2010, 14:58   #326
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
Unclear, eh ? It's not very important anyway as i have my own idea on the subject already.
Cool, what is it?
Quote:
Originally Posted by meynaf View Post
Exactly, especially because like everything else, it's never really full and more stuff can always be added
Are you still going to do it? On the other hand, doesn't the OS have such a routine?
Quote:
Originally Posted by meynaf View Post
Not quite the required flat style... But perhaps i'll grab a few things from it anyway.
Nope, it ain't completely flat, but many tiles are. However, some tiles may not be exactly 16x16 (ripping flaws, everything is supposed to be 16x16), so watch out.
Quote:
Originally Posted by meynaf View Post
I just prefer it to be this way. The game itself can wait.
Okay.
Quote:
Originally Posted by meynaf View Post
But there are no informed decisions in that area ! Monster fighting has nothing to do with chess or tactical games.
Ah, so the combat won't be tactical, then? However, unless you're going to make all enemy units in the game stupid, you'll still need some smartness on the software part to handle intelligent units properly. Human soldiers are already smarter than mindless monsters, and casters are the smartest, so it would be cool if this is reflected by those units' actions.
Thorham is offline  
Old 12 June 2010, 15:14   #327
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Cool, what is it?
Just be random between equal cases, and change this random order each turn.
I don't know if it's the best idea, but it's one that's easy to do and seems fair enough.

Quote:
Originally Posted by Thorham View Post
Are you still going to do it? On the other hand, doesn't the OS have such a routine?
Frankly i don't know if i will ever do it.
The OS routines can be used only for OS objects, not 100% custom ones like mine. Or so i think .

Quote:
Originally Posted by Thorham View Post
Nope, it ain't completely flat, but many tiles are. However, some tiles may not be exactly 16x16 (ripping flaws, everything is supposed to be 16x16), so watch out.
If i cut something from here, i'll clearly see if it's 16x16 or not. And if not, i may still resize or cut. Don't worry.

Quote:
Originally Posted by Thorham View Post
Ah, so the combat won't be tactical, then? However, unless you're going to make all enemy units in the game stupid, you'll still need some smartness on the software part to handle intelligent units properly. Human soldiers are already smarter than mindless monsters, and casters are the smartest, so it would be cool if this is reflected by those units' actions.
I don't understand what you mean by tactical, and how "smart" units could behave differently than stupid ones. Perhaps i'll make some sort of a fighting engine mock-up, just to see.
meynaf is offline  
Old 16 June 2010, 17:59   #328
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
Just be random between equal cases, and change this random order each turn.
I don't know if it's the best idea, but it's one that's easy to do and seems fair enough.
I'd be careful with making too many things random, especially this sort of thing, unless you have a statistically perfect random number generator (this can be really easy to do, though).
Quote:
Originally Posted by meynaf View Post
Frankly i don't know if i will ever do it.
The OS routines can be used only for OS objects, not 100% custom ones like mine. Or so i think .
From what I've seen so far, it's not very difficult to do a fully featured one, let alone one with only the most essential features. If you would use it on more than one occasion, perhaps you should.
Quote:
Originally Posted by meynaf View Post
If i cut something from here, i'll clearly see if it's 16x16 or not. And if not, i may still resize or cut. Don't worry.
Don't resize graphics like this, they'll look terrible. Try to add a vew pixels here and there, it should look much better.
Quote:
Originally Posted by meynaf View Post
I don't understand what you mean by tactical, and how "smart" units could behave differently than stupid ones. Perhaps i'll make some sort of a fighting engine mock-up, just to see.
Tactical as in having elements from war games. Smart units behave in a different way than stupid units in the same way they perhaps would in reality.

Only a fool would rush in to attack a group of units. It's better to get backup if available. It's also smart to get rid of low HP units before high HP units, especially when those units have strong attacks. Or taking out a summoner who keeps summoning units, instead of trying to take out those summons each time another one appears. Or not chasing after a unit into a trap. Or just things like retreating on time to have a healer fix up the unit. See, easy, no?
Thorham is offline  
Old 17 June 2010, 12:24   #329
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
I'd be careful with making too many things random, especially this sort of thing, unless you have a statistically perfect random number generator (this can be really easy to do, though).
I don't know if my rnd generator is perfect or not, but you can have a look at it, as it's in my usual include files.

Quote:
Originally Posted by Thorham View Post
From what I've seen so far, it's not very difficult to do a fully featured one, let alone one with only the most essential features. If you would use it on more than one occasion, perhaps you should.
For now i miss the occasions to use it.

Quote:
Originally Posted by Thorham View Post
Don't resize graphics like this, they'll look terrible. Try to add a vew pixels here and there, it should look much better.
If it's not 16x16 i use PPaint to resize to 16x16 and that's all. If after that the gfx looks terrible then i alter it or i simply don't take it.

Quote:
Originally Posted by Thorham View Post
Tactical as in having elements from war games. Smart units behave in a different way than stupid units in the same way they perhaps would in reality.
In reality all units are somewhat stupid, or they wouldn't be military units

Quote:
Originally Posted by Thorham View Post
Only a fool would rush in to attack a group of units. It's better to get backup if available.
Get backup ? Monsters can't escape a group of adventurers, so better have it.

Quote:
Originally Posted by Thorham View Post
It's also smart to get rid of low HP units before high HP units, especially when those units have strong attacks.
You're not supposed to know HP of units, especially if these are adventurers (as should be in my game).

Quote:
Originally Posted by Thorham View Post
Or taking out a summoner who keeps summoning units, instead of trying to take out those summons each time another one appears.
You take out what you can take ! When a wizard summons something, he's in the rear ranks, not in the front (or the player is stupid), so adding anything in ai code for that isn't useful.

Quote:
Originally Posted by Thorham View Post
Or not chasing after a unit into a trap.
Just always chase.

Quote:
Originally Posted by Thorham View Post
Or just things like retreating on time to have a healer fix up the unit.
A healer ? For monsters ? Get serious

Quote:
Originally Posted by Thorham View Post
See, easy, no?
No
meynaf is offline  
Old 17 June 2010, 18:55   #330
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
I don't know if my rnd generator is perfect or not, but you can have a look at it, as it's in my usual include files.
If I can find it, I'll have a look. If you want I can give you one, but it's table based. Different, non-random, kinds of data work, I'm using real random data from radio static, and you don't need a big table. Easy to modify to not need a table (it's basically an algorithm to ensure statistically flawless results).

Grab random data from http://www.random.org/ (not free for large amounts of random data), or use a radio and a sampler

It can cycle through the table and keep churning out different results, because, amongst other things, it uses a kind of sorting algorithm to ensure that when you want, say, numbers from 0 to 255, and you pick 256 numbers, each number only appears once in the list. It also generates it's own values based on the table. Values aren't used as is from the table (or this algorithm would almost be guaranteed not to work).
Quote:
Originally Posted by meynaf View Post
For now i miss the occasions to use it.
Then forget it
Quote:
Originally Posted by meynaf View Post
If it's not 16x16 i use PPaint to resize to 16x16 and that's all. If after that the gfx looks terrible then i alter it or i simply don't take it.
The problem is interpolation. If this doesn't happen, it should be easier to rework.
Quote:
Originally Posted by meynaf View Post
In reality all units are somewhat stupid, or they wouldn't be military units
Perhaps, but the real stupid idiots are the people who create a need for the military
Quote:
Originally Posted by meynaf View Post
Get backup ? Monsters can't escape a group of adventurers, so better have it.
But monsters don't even exist in reality, so they can do whatever you want them to
Quote:
Originally Posted by meynaf View Post
You're not supposed to know HP of units, especially if these are adventurers (as should be in my game).
In theory you should. Low HP units have been hit a lot, and thus have many battle wounds. Fresh units shouldn't have those, and thus you can make a good estimate of a units HP condition.
Quote:
Originally Posted by meynaf View Post
You take out what you can take ! When a wizard summons something, he's in the rear ranks, not in the front (or the player is stupid), so adding anything in ai code for that isn't useful.
Depends on the particular situation. Summoners aren't always going to be in the back. Casters in the back row are an deal situation, and not all situations are ideal.
Quote:
Originally Posted by meynaf View Post
Just always chase.
Bad idea. A smart unit should only chase if there's a good chance that unit will win.
Quote:
Originally Posted by meynaf View Post
A healer ? For monsters ? Get serious
I am Why just monsters? Why not a variety of creatures and beings? Also, who says all monsters are stupid? Again, they don't exist, so we wouldn't really know about the smartness of different kinds of monsters.

If I were you, I'd seriously consider putting in more than just monsters. Another thing: Battles become more interesting if they're not easy because the AI is putting up a reasonable fight with an amount of units that's close to the number of units you have. Making battles challenging by just having a large number of monsters is certainly less fun if you always rely on this. Variety is also important.
Quote:
Originally Posted by meynaf View Post
No
Yes

Last edited by Thorham; 17 June 2010 at 19:34.
Thorham is offline  
Old 17 June 2010, 20:04   #331
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
If I can find it, I'll have a look. If you want I can give you one, but it's table based. Different, non-random, kinds of data work, I'm using real random data from radio static, and you don't need a big table. Easy to modify to not need a table (it's basically an algorithm to ensure statistically flawless results).

Grab random data from http://www.random.org/ (not free for large amounts of random data), or use a radio and a sampler

It can cycle through the table and keep churning out different results, because, amongst other things, it uses a kind of sorting algorithm to ensure that when you want, say, numbers from 0 to 255, and you pick 256 numbers, each number only appears once in the list. It also generates it's own values based on the table. Values aren't used as is from the table (or this algorithm would almost be guaranteed not to work).
Yuck ! Tables.

My random generator is based on a generated seed reading timers, and then it reads other timers, mixes things with a classical formula and gives a result.

Frankly you can hardly find a flaw in it. It's more random than real dice !

Quote:
Originally Posted by Thorham View Post
The problem is interpolation. If this doesn't happen, it should be easier to rework.
PPaint won't do this if i don't want it to ;-)

Quote:
Originally Posted by Thorham View Post
Perhaps, but the real stupid idiots are the people who create a need for the military


Quote:
Originally Posted by Thorham View Post
But monsters don't even exist in reality, so they can do whatever you want them to
Yes they can and i don't want them to heal

Quote:
Originally Posted by Thorham View Post
In theory you should. Low HP units have been hit a lot, and thus have many battle wounds. Fresh units shouldn't have those, and thus you can make a good estimate of a units HP condition.
Well, why not. But this concentrates blows on already wounded ones, and somewhat reduces playability (because more deaths for the player).

Quote:
Originally Posted by Thorham View Post
Depends on the particular situation. Summoners aren't always going to be in the back. Casters in the back row are an deal situation, and not all situations are ideal.
They usually won't be anywhere but in the back row. Other situations are too rare to add a big ai block.

Quote:
Originally Posted by Thorham View Post
Bad idea. A smart unit should only chase if there's a good chance that unit will win.
There are necessarily good chances it wins, else the other wouldn't flee !

Quote:
Originally Posted by Thorham View Post
I am Why just monsters? Why not a variety of creatures and beings? Also, who says all monsters are stupid? Again, they don't exist, so we wouldn't really know about the smartness of different kinds of monsters.

If I were you, I'd seriously consider putting in more than just monsters. Another thing: Battles become more interesting if they're not easy because the AI is putting up a reasonable fight with an amount of units that's close to the number of units you have. Making battles challenging by just having a large number of monsters is certainly less fun if you always rely on this. Variety is also important.
Variety may be important, but it's not a good reason enough to have bloated ai.

Remember that the more complex an ai becomes, the slower it gets !
meynaf is offline  
Old 17 June 2010, 20:32   #332
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
Yuck ! Tables.
Indeed! They're only needed when you need true random, as in radio static anyway.
Quote:
Originally Posted by meynaf View Post
My random generator is based on a generated seed reading timers, and then it reads other timers, mixes things with a classical formula and gives a result.
Sounds good What my algorithm does is actually not random generation, but ensuring a sequence of numbers only has unique numbers. In a games where aspects of battles are randomized, you may want to ensure fairness, and that's where algorithms like mine come in handy.
Quote:
Originally Posted by meynaf View Post
Frankly you can hardly find a flaw in it. It's more random than real dice !
No, it's absolutely not more random than dice and is infact not random at all, unless the source for the numbers is random, and that's probably not the case with Amigas. If you want true random, then you need a table. Sucks, but for many (most? all?) games highly irrelevant.
Quote:
Originally Posted by meynaf View Post
PPaint won't do this if i don't want it to ;-)
Sounds like a nice program
Quote:
Originally Posted by meynaf View Post
Yes they can and i don't want them to heal
What if you have a boss who's a monster?
Quote:
Originally Posted by meynaf View Post
Well, why not. But this concentrates blows on already wounded ones, and somewhat reduces playability (because more deaths for the player).
Not necessarily. It just means you have to play a smarter game. Depending on what you want, this can be good, or bad.
Quote:
Originally Posted by meynaf View Post
They usually won't be anywhere but in the back row. Other situations are too rare to add a big ai block.
You don't need a big AI block for this.
Quote:
Originally Posted by meynaf View Post
There are necessarily good chances it wins, else the other wouldn't flee !
It might be a trap. Lure a strong unit into your group by having it mindlessly chase you, and then easily kill it.
Quote:
Originally Posted by meynaf View Post
Variety may be important, but it's not a good reason enough to have bloated ai.
Bloated AI isn't needed, unless you want DeepBlue quality AI Really, there's a number of things that aren't very hard and will already make the AI play a smarter game, where the most obvious of mistakes are avoided.
Quote:
Originally Posted by meynaf View Post
Remember that the more complex an ai becomes, the slower it gets !
A complex AI probably isn't needed.

Another thing is that quite a few gamers complain about AIs being too weak. It's probably not very hard to fix at least some of those issues without ending up with some big and slow AI that does far too much anyway.

Just because an AI does a little bit more than just rush in all the time doesn't mean it has to be complicated
Thorham is offline  
Old 20 June 2010, 13:18   #333
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Indeed! They're only needed when you need true random, as in radio static anyway.
True random ? Tables will NEVER provide true random. A table is NOT random by nature.

Quote:
Originally Posted by Thorham View Post
Sounds good What my algorithm does is actually not random generation, but ensuring a sequence of numbers only has unique numbers. In a games where aspects of battles are randomized, you may want to ensure fairness, and that's where algorithms like mine come in handy.
Sounds like utility.library/GetUniqueID().

Quote:
Originally Posted by Thorham View Post
No, it's absolutely not more random than dice and is infact not random at all, unless the source for the numbers is random, and that's probably not the case with Amigas.
In a computer, only time is random because the user has very variable reaction times (when expressed in a small enough time units).
My random generator is based on time counters - like every random generator should be. It IS more random than a dice, and i've thrown enough of them to know that !

Quote:
Originally Posted by Thorham View Post
If you want true random, then you need a table. Sucks, but for many (most? all?) games highly irrelevant.
Once again, a table is NOT random !!!
Ok, it might be statistically balanced. But it's not unpredictable, and true random must be.

Quote:
Originally Posted by Thorham View Post
What if you have a boss who's a monster?
I certainly don't want him to heal.

Quote:
Originally Posted by Thorham View Post
Not necessarily. It just means you have to play a smarter game. Depending on what you want, this can be good, or bad.
Depending on what i want, it certainly is bad.

Quote:
Originally Posted by Thorham View Post
You don't need a big AI block for this.
Then just write it !

Quote:
Originally Posted by Thorham View Post
It might be a trap. Lure a strong unit into your group by having it mindlessly chase you, and then easily kill it.
And so ? There's nothing wrong with that - apart that your group could just have chased the strong unit to easily kill it.

Quote:
Originally Posted by Thorham View Post
Bloated AI isn't needed, unless you want DeepBlue quality AI Really, there's a number of things that aren't very hard and will already make the AI play a smarter game, where the most obvious of mistakes are avoided.
You never designed/wrote an AI, did you ?

Quote:
Originally Posted by Thorham View Post
A complex AI probably isn't needed.
An AI has to be somewhat complex anyway ; adding more complexity for little benefit isn't good.

Quote:
Originally Posted by Thorham View Post
Another thing is that quite a few gamers complain about AIs being too weak. It's probably not very hard to fix at least some of those issues without ending up with some big and slow AI that does far too much anyway.
Beginners will also complain that AIs are too strong.

Quote:
Originally Posted by Thorham View Post
Just because an AI does a little bit more than just rush in all the time doesn't mean it has to be complicated
You weren't talking about "a little bit".
So you want a good ai ? Write it !

On the other hand, as i already pointed, is it necessary for the ai to be smart ?

If you look at old civi1 ai and compare it to freeciv ai, you'll see that the latter is much smarter. Yet it makes it a pain in the arse, a real plague : okay, the game is more difficult - but it also becomes less enjoyable (not to mention much much slower and i really mean it).

An ai that's constantly pestering you, takes advantage of your slightest mistake and never seems to understand that it has lost, isn't enjoyable - especially when it takes ages to make its decisions.
Game play is important. Don't overlook it.
meynaf is offline  
Old 20 June 2010, 14:27   #334
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
True random ? Tables will NEVER provide true random. A table is NOT random by nature.
A table is random if the source of the numbers is random, for the simple reason that the table can not be remade from scratch. This is what www.random.org does. It produces tables of random numbers based on radio static. When you say that even such a table isn't random, than you're saying radio static isn't random
Quote:
Originally Posted by meynaf View Post
Sounds like utility.library/GetUniqueID().
I don't know about the functions in utility.libary, I wrote mine from scratch. This one uses a hardware counter as it's source (your idea ), not a table (the one megabyte data block is only that large for testing):
Code:
; Random sequence test.
;
start
	lea	tab,a0
	move.l	#2^8,d0
	bsr	rnd.sequence
	rts
;------------------------------------------------------------------------------------
rnd.sequence
;
; Generates random number sequences with unique numbers from 0 to (2^x)-1.
; Keep values lower than x^28, or remove safety check.
;------------------------------------------------------------------------------------
;in:	d0=Sequence size (numbers 0 to d0-1).
;	a0=Sequence table (long word entries).
;------------------------------------------------------------------------------------
	movem.l	d0-d2/d6-d7/a1,-(sp)

	move.l	a0,a1
	subq.l	#1,d0

.init_table
	move.l	d0,d7
	moveq	#-1,d1
.loop_x
	move.l	d1,(a1)+
	dbra	d7,.loop_x

.make_sequence
	lea	$bfd800,a1	;Counter from time of day clock.
	move.l	d0,d6
	lsl.l	#4,d6
	move.l	d0,d7
.loop_y
	add.b	(a1),d1
	rol.l	#4,d1

	move.l	d1,d2
	and.l	d7,d2

	subq.w	#1,d6		;Safety check in case the loop takes too long.
	beq.s	.end

	tst.l	(a0,d2*4)
	bge.s	.loop_y

	move.l	d0,(a0,d2*4)
	dbra	d0,.loop_y
.end
	movem.l	(sp)+,d0-d2/d6-d7/a1
	rts	
;------------------------------------------------------------------------------------
	section	data,data_f
tab
	dcb.b	1024*1024
Note: With this 'random' number method you can probably leave out the safety check. And besides, this check is probably too crude anyway. I only put it in while I was experimenting with different simple ways of generating the numbers.

Also, there's a small mistake in here, namely the stupid DBRAs
Quote:
Originally Posted by meynaf View Post
In a computer, only time is random because the user has very variable reaction times (when expressed in a small enough time units).
This is most certainly not random, because in theory the numbers can be reproduced. While this is extremely difficult, it's still possible with the right equipment. This is because what you're using as a base for your RNG isn't random to begin with. Time is not random.
Quote:
Originally Posted by meynaf View Post
My random generator is based on time counters - like every random generator should be. It IS more random than a dice, and i've thrown enough of them to know that !
You have not thrown enough dice to know this, because you'd have to throw them tens of thousands of times and preferably more often than that.
Quote:
Originally Posted by meynaf View Post
Once again, a table is NOT random !!!
Ok, it might be statistically balanced. But it's not unpredictable, and true random must be.
A table based on a true random source is unpredictable. If you can predict the numbers in a table generated using radio static, or based on radio active decay, then you're not a human, but an omnipotent being

I urge you to visit www.random.org, generate a table, and try to predict the numbers. It's not humanly possible
Quote:
Originally Posted by meynaf View Post
Depending on what i want, it certainly is bad.
Okay, then what do you want?
Quote:
Originally Posted by meynaf View Post
You never designed/wrote an AI, did you ?
Nope
Quote:
Originally Posted by meynaf View Post
An AI has to be somewhat complex anyway ; adding more complexity for little benefit isn't good.
It depends only on what you want wether it's good or bad.
Quote:
Originally Posted by meynaf View Post
Beginners will also complain that AIs are too strong.
Beginners will often complain about something being too difficult, so that's not a good reason. Having difficulty levels solves this.
Quote:
Originally Posted by meynaf View Post
You weren't talking about "a little bit".
Yes, I was. All I was trying to say is that what you said in the beginning was too simple, that's all.
Quote:
Originally Posted by meynaf View Post
On the other hand, as i already pointed, is it necessary for the ai to be smart ?
Depends on what you want, and we clearly want different things from games like this.
Quote:
Originally Posted by meynaf View Post
If you look at old civi1 ai and compare it to freeciv ai, you'll see that the latter is much smarter. Yet it makes it a pain in the arse, a real plague : okay, the game is more difficult - but it also becomes less enjoyable (not to mention much much slower and i really mean it).
Than they didn't do a very good job. I don't know if I could do any better, but it still seems that they could have.
Quote:
Originally Posted by meynaf View Post
An ai that's constantly pestering you, takes advantage of your slightest mistake and never seems to understand that it has lost, isn't enjoyable - especially when it takes ages to make its decisions.
Then the AI is simply too strong for the game, or you need difficulty levels. Balance is extremely important. An AI that makes all the mistakes in the book is equally bad, because there's no challenge at all.
Quote:
Originally Posted by meynaf View Post
Game play is important. Don't overlook it.
Indeed

Last edited by Thorham; 20 June 2010 at 19:00.
Thorham is offline  
Old 20 June 2010, 17:42   #335
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Small update from previous post:

Here's a two versions of the same algorithm, with the now useless safety checks removed, and a simple seed algorithm added. The first routine generates numbers from 0 to (2^x)-1, the second takes any number (sorry for the lack of comments ):
Code:
;------------------------------------------------------------------------------------
; Random sequence test.
;------------------------------------------------------------------------------------
start
	bsr	rnd.seed
	lea	tab,a0
	move.l	#2^8,d0
	bsr	rnd.sequence

	rts
;------------------------------------------------------------------------------------
rnd.seed
;
; Generates a psudo random seed based on the CIA timers.
;------------------------------------------------------------------------------------
	movem.l	d0/a0,-(sp)

	lea	$bfe001,a0

	add.b	$400(a0),d0
	lsl.l	#4,d0
	add.b	$500(a0),d0
	lsl.l	#4,d0
	add.b	$600(a0),d0
	lsl.l	#4,d0
	add.b	$700(a0),d0
	move.l	d0,rnd_seed

	movem.l	(sp)+,d0/a6
	rts
;------------------------------------------------------------------------------------
rnd.sequence
;
; Generates random number sequences with unique numbers from 0 to (2^x)-1.
;------------------------------------------------------------------------------------
;in:	d0=Sequence size (numbers 0 to d0-1).
;	a0=Sequence table (long word entries).
;------------------------------------------------------------------------------------
	movem.l	d0-d2/d7/a1,-(sp)

	move.l	a0,a1
	subq.l	#1,d0

.init_table
	move.l	d0,d7
	moveq	#-1,d1
.loop_x
	move.l	d1,(a1)+
	dbra	d7,.loop_x

.make_sequence
	lea	$bfd800,a1	;Counter from time of day clock.
	move.l	rnd_seed,d1
	move.l	d0,d7
.loop_y
	add.b	(a1),d1
	rol.l	#4,d1

	move.l	d1,d2
	and.l	d7,d2

	tst.l	(a0,d2*4)
	bge.s	.loop_y

	move.l	d0,(a0,d2*4)
	dbra	d0,.loop_y
.end
	movem.l	(sp)+,d0-d2/d7/a1
	rts	
;------------------------------------------------------------------------------------
rnd.sequence2
;
; Generates random number sequences with unique numbers from 0 to x.
;------------------------------------------------------------------------------------
;in:	d0=Sequence size (numbers 0 to d0-1).
;	a0=Sequence table (long word entries).
;------------------------------------------------------------------------------------
	movem.l	d0-d2/d6-d7/a1,-(sp)

	move.l	a0,a1
	subq.l	#1,d0

.init_table
	move.l	d0,d7
	moveq	#-1,d1
.loop_x
	move.l	d1,(a1)+
	dbra	d7,.loop_x

.make_bit_mask			;Algorithm from Hacker's Delight.
	move.l	d0,d1		;This fills all bits with one, starting from
	move.l	d0,d7		;the highest one bit.

	lsr.l	#1,d1
	or.l	d7,d1
	move.l	d1,d7

	lsr.l	#2,d1
	or.l	d7,d1
	move.l	d1,d7

	lsr.l	#4,d1
	or.l	d7,d1
	move.l	d1,d7

	lsr.l	#8,d1
	or.l	d7,d1
	move.l	d1,d7

	lsr.l	#8,d1
	lsr.l	#8,d1
	or.l	d1,d7

.make_sequence
	lea	$bfd800,a1	;Counter from time of day clock.
	move.l	rnd_seed,d1
	move.l	d0,d6
.loop_y
	add.b	(a1),d1
	rol.l	#4,d1

	move.l	d1,d2
	and.l	d7,d2

	cmp.l	d6,d2
	bgt	.loop_y

	tst.l	(a0,d2*4)
	bge.s	.loop_y

	move.l	d0,(a0,d2*4)
	dbra	d0,.loop_y
.end
	movem.l	(sp)+,d0-d2/d6-d7/a1
	rts
;------------------------------------------------------------------------------------
	section	data,data_f
rnd_seed
	dc.l	0
tab
	dcb.b	1024*1024
;------------------------------------------------------------------------------------
Thought you might like too look at this

Note: There's the same stupid DBRA mistake in this version The code still works, but not for numbers higher than 65535

Last edited by Thorham; 20 June 2010 at 19:06.
Thorham is offline  
Old 22 June 2010, 19:01   #336
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Sorry pal, but the time in microseconds that you take to perform a click is random and unpredictable !

On the other hand, a table isn't unpredictable once generated. What i'm saying is that the table is the OUTPUT of a random generator, not INPUT of it (for which it cannot be used), nor is it the generator itself, of course.

So, at the end, it's not useful at all for someone who wants to write a generator !

And i've thrown enough dice to just see them giving statistically totally unbalanced values !
Yet my random generator didn't show that, so it's better than the die.

Btw reading the CIA values isn't enough to do a good random generator. You also need to use the previously emitted value, so that regularly spaced demands will lead good results. Your code doesn't seem to do that.

If you want to discuss this further, why not, but there is now a better place to do so :
http://eab.abime.net/showthread.php?t=53462


Now about AI...

I wrote some AI code some time ago and i can tell you it's not the easiest of things, so far not. But you needn't a strong one to make something that's fun to play, which, to answer your question, is what i want.

You have no experience in the area, so i strongly suggest you try to do things before you speak.

After that, you can post there if you want, as i prefer the subjects to remain separate :
http://eab.abime.net/showthread.php?t=53463

There are also other places you may wish to post things in :
http://eab.abime.net/showthread.php?t=52876
http://eab.abime.net/showthread.php?t=49830
http://eab.abime.net/showthread.php?t=53464
meynaf is offline  
Old 23 June 2010, 17:00   #337
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
Sorry pal, but the time in microseconds that you take to perform a click is random and unpredictable !
Humans can't click that fast. Even milliseconds are too fast. Probably a tenth of a second or so. Not good for random numbers at all. Furthermore, humans are not truly random to begin with. This is evident in programs that generate 'random' numbers based on mouse movements; you get patterns. Best sources are things like radio static (random and you can get lots of numbers quickly).
Quote:
Originally Posted by meynaf View Post
On the other hand, a table isn't unpredictable once generated. What i'm saying is that the table is the OUTPUT of a random generator, not INPUT of it (for which it cannot be used), nor is it the generator itself, of course.
A table based on true random data (radio static) isn't predictable at all, that is, you can't recreate the table's contents with an algorithm, and you also can't recreate the table with the same random source (except by chance). What I want to know is why do you think that a table with numbers based on radio static can be predicted?
Quote:
Originally Posted by meynaf View Post
So, at the end, it's not useful at all for someone who wants to write a generator !
It actually can be. The only problem is that the table can be copied. This is no good for security based applications, such as password generators, but it's fine for anything else.
Quote:
Originally Posted by meynaf View Post
And i've thrown enough dice to just see them giving statistically totally unbalanced values !
That's the nature of chance. It's perfectly possible, for example, to flip a coin ten times and get heads ten times. The reason a die throw is random is simply because you can't predict the outcome properly.
Quote:
Originally Posted by meynaf View Post
Yet my random generator didn't show that, so it's better than the die.
Except that your RNG is pseudo random, because it can be predicted based on the machine state, while dice throws can't be predicted properly.
Quote:
Originally Posted by meynaf View Post
Btw reading the CIA values isn't enough to do a good random generator.
I know, I just wanted to show the sequence generator. This algorithm isn't a RNG, rather, it uses a RNG as input. I just used that simple timer based algorithm to get rid of the table input, that's all
Quote:
Originally Posted by meynaf View Post
If you want to discuss this further, why not, but there is now a better place to do so :
http://eab.abime.net/showthread.php?t=53462
Your thread seems to be more about the implementation of RNGs rather than the theoretical side. Perhaps this thread is better suited? If you don't agree, then please post your reply about this in your thread
Quote:
Originally Posted by meynaf View Post
I wrote some AI code some time ago and i can tell you it's not the easiest of things, so far not.
That's easy to imagine
Quote:
Originally Posted by meynaf View Post
Okay, I'll see if I've got anything to say, then
Thorham is offline  
Old 24 June 2010, 13:24   #338
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Your thread seems to be more about the implementation of RNGs rather than the theoretical side. Perhaps this thread is better suited? If you don't agree, then please post your reply about this in your thread
Yes, i've post my reply there.
meynaf is offline  
Old 19 January 2011, 18:29   #339
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Hi meynaf, got a couple of questions for ya

1) I've been looking through your system frame, and I have to ask why you don't use LVO includes? Isn't something like:
Code:
    jsr     _LVOOpenLibrary(a6)
a lot more readable than:
Code:
    jsr     -552(a6)
or am I missing something?

2) I've recently switched from AsmOne to Phxass+FrexxEd (finally power editing! That editor sure is overkill ), and I want to keep using AsmOne for debugging. Anything to watch out for that AsmOne screws up that Phxass doesn't?

3) A good while ago you told me you use MEmacs as your editor. What I want to know is why? Surely there are better (freeware) editors out there you can use? Or do you just like it spartan
Thorham is offline  
Old 20 January 2011, 11:12   #340
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
I don't think it's a good idea to resurrect such an old, bloated thread. I've answered you in the "dungeon" thread. It's not really off-topic.
meynaf is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Old KGLoad Discussion killergorilla project.KGLoad 357 20 January 2011 16:08
Castlevania Discussion john4p Retrogaming General Discussion 30 30 January 2009 02:10
ROM Discussion... derSammler project.EAB 41 29 January 2008 23:36
General Discussion Zetr0 project.Amiga Game Factory 12 15 December 2005 13:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18784 seconds with 16 queries