Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
What's on your mind?; Your daily crap.
Topic Started: Jul 29 2010, 05:18 AM (64,062 Views)
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Post whatever is on your mind at the moment. It doesn't matter what, just post it!
Blog|EHS
Offline Profile Quote Post Goto Top
 
Replies:
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Ugh its so quiet everywhere <_<
If this is gonna be the rest of my vacation I will be bored to death before school even starts again..
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Dr. Best
Jun 12 2012, 12:09 AM
Yes, it is a company for architectural visualization.

They probably told you why they want you to contact them, didn't they?
They didn't say why. So, I didn't respond.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Schade Holland alles ist vorbei, alles ist vorbei, alles ist vorbei!
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
I just got back from a high adventure trip with my Scout troop. We went to Louisiana and Florida. Some things I learned from it:

  • Louisiana is a dump for the most part.
  • New Orleans, at best, is the armpit of the United States.
  • Florida is very nice, and between the mild climate, the sea breeze, the soft white sand on the beaches, and the emerald-tinted waters, I see why so many old people retire there.
  • That very same nice white Florida sand gets into everything, including your shorts and your sleeping bag.
  • A Scout leader's reaction after just climbing out of his tent only to see one of the boys walk by in a Speedo is priceless.
  • Taking generic brand Tylenol PM and eating 40 oz of Starbursts with a friend results in talking in a thick Southern accent while imitating a disgruntled housewife with a cheating husband and ungrateful children.
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
@Gandalf,
LOL, seems like you had fun.
Dr. Best
Jun 18 2012, 12:10 AM
Schade Holland alles ist vorbei, alles ist vorbei, alles ist vorbei!
NOOOOOOOOOOOO :(
First 20 minutes went well..
I don't know what it is with our soccer team, they seem to lose their pacing really quick. They play extremely well for a few minutes, then fall back to being completely dominated by the opponents. In the match vs Portugal they where able to play well for an extended period compared to previous matches.. but only one goal.

I was watching yesterday with my friends, and only one yellow card :C . Germany as reliable as ever won from Denmark (which was needed if we where to have the slightest chance of making it).
Edited by Reikyrr, Jun 18 2012, 07:21 PM.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
My new couch arrived today. Was a pain putting together alone. Typical Forever alone moment :P

Posted Image

Attached to this post:
Attachments: 457902_191715804290303_886477721_o.jpg (139.17 KB)
Edited by Despellanion, Jun 18 2012, 08:05 PM.
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Despellanion
Jun 18 2012, 08:02 PM
My new couch arrived today. Was a pain putting together alone. Typical Forever alone moment :P

http://z1.ifrm.com/7059/133/0/p1025772/457902_191715804290303_886477721_o.jpg

Thats a nice couch, me jelly.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
What would be the optimal way to calculate the chance of a critical hit? Right now I got this:

Code: Bennu script
 

function CriticalChance()
private
int dice;
int probability;
int critical_rate;
end
begin

//Random dice throw between 1-100
dice = rand(1,100);
//Higher level enemy equals lower probability of success
probability = ((player_level - opponent_level) * (player_luck + player_concentration)) / 0.1;
//Critical success rate formula
critical_rate = (player_power + player_concentration + player_luck) + ((player_concentration / 20) * 0.015);

if(probability>100)
probability=100;
end

//Calculate the probability of landing a critical hit on enemy of opposing level
if(dice > 0 && dice <= probability)

//If successfull, calculate the critical rate over the dice throw
if(dice > 0 && dice <= critical_rate)

//Critical hit successfull
critical_hit=true;

end

end

end


EDIT: I can see my error in the code.
Edited by Despellanion, Jun 20 2012, 06:47 PM.
Offline Profile Quote Post Goto Top
 
alexmach1
Member Avatar
Graphics addict
[ *  *  *  *  *  * ]
imo it depends on stats. if someone has higher spot/vision/sight and high dexterity, they are more likely to spot and target weak points. if someone has a lot of strength, they are more likely to cause internal damage. if someone has a high level but not the combat expertise, it is very unlikely that they could cause critical damage.
Edited by alexmach1, Jun 19 2012, 11:46 PM.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
alexmach1
Jun 19 2012, 11:45 PM
imo it depends on stats. if someone has higher spot/vision/sight and high dexterity, they are more likely to spot and target weak points. if someone has a lot of strength, they are more likely to cause internal damage. if someone has a high level but not the combat expertise, it is very unlikely that they could cause critical damage.
I was more referring to programming wise ^_^ I got the stats worked out already.
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
These are what I see right away:
Code:
 
maxValue(player_level, opponent_level, null, null) - minValue(player_level, opponent_level, null, null)

I suppose it depends on the language you use and how it goes about these particular functions, but you might want to test if it's faster to just use abs(player_level-opponent_level) instead of a maxValue function and a minValue function.

Code:
 
probability=(blah blah blah)/0.1;

Why not multiply by 10 instead? I know in most languages that multiplication is faster than division, which is why a lot of math libraries include functions for reciprocal square roots (besides the Newton's approximation converging faster).

Code:
 
critical_rate = (player_power + player_concentration + player_luck) + ((player_concentration / 20) * 0.015);

First, convert that division by 20 to a multiplication by .05. Then, since multiplication is commutative, multiply .05 and .015 together and simply multiply by .00075 instead. You can simplify the equation even more by combining like terms. Therefore, the equation becomes:
Code:
 
critical_rate=player_power+player_luck+(player_concentration*1.00075);


Although, your probability formula is a little strange. The success rate will be the same if the enemy is twenty levels above the player as if the player is twenty levels above the enemy.

Overall, my personal preferred method of calculating critical hits would be more like a Dungeons and Dragons style skill check or the way Dungeons and Dragons actually calculates a critical hit (rolling a high number on the d20, which is dependent on the weapon the character uses). Instead of checking if your dice roll is within the probability of a critical hit on the enemy, then within the critical hit rate, you might try something more like this:
First, calculate the difficulty of a critical hit on the enemy. Then roll the die and add a variety of modifying stats to the roll's value, and compare it to the critical hit value. If the die roll plus modifiers is higher, it's a critical hit.
Here's how I would personally calculate it (forgive my C++ syntax, I know you're using Bennu, but it's more comfortable to me):
Code:
 

//In this code, Player represents a base class that includes both users and NPCs.
//p_RNG is a pointer to a generic random number generator of some sort.
bool TestCritical(const Player& attacker,const Player& defender)
{
//Calculate the difficulty value for a critical on this particular enemy.
int criticalDC = defender.getLevel()-attacker.getLevel()+defender.getLuckModifier()+20;
//Calculate a random die roll modified by the attacker's luck and concentration.
int dieRoll = p_RNG->GetRandomInteger(1,20)+attacker.getLuckModifier()+attacker.getConcentrationModifier();
return (dieRoll>=criticalDC);
}


I don't know, that's just how I would do it. I tried to incorporate the stats you wanted criticals dependent on. This could be used for the player attacking the enemy and vice versa, and it is based on a d20 (since I'm a D&D nerd), but if you decide to use a system like this, you should change the die roll to create the balance that you want. As you can see, this algorithm also raises the difficulty if the enemy is a higher level, but it lowers it if you are a higher level.

I don't know how well you understand C++ (or if you do), but I hope the use of pointers and references doesn't obscure the code's meaning too much.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Gandalf20000
Jun 20 2012, 03:24 AM
These are what I see right away:
Code:
 
maxValue(player_level, opponent_level, null, null) - minValue(player_level, opponent_level, null, null)

I suppose it depends on the language you use and how it goes about these particular functions, but you might want to test if it's faster to just use abs(player_level-opponent_level) instead of a maxValue function and a minValue function.
minValue/maxValue are my own custom methods for dealing with finding min/max values, as the developers of Bennu thinks such functions are too trivial to implement, and I agree :P
I'll play around with the formulas some more, got really close to satisfying results last night.

EDIT: I know that the probability formula is strange, I wrote it late at night when I was pretty tired and wasn't exactly thinking clearly, and changed it the next day :P

Gandalf20000
 
I don't know how well you understand C++ (or if you do), but I hope the use of pointers and references doesn't obscure the code's meaning too much.

I do, don't worry ;)
Edited by Despellanion, Jun 20 2012, 06:55 PM.
Offline Profile Quote Post Goto Top
 
alexmach1
Member Avatar
Graphics addict
[ *  *  *  *  *  * ]
one of my friends became a meme face
Posted Image
oh joy
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
alexmach1
Jun 20 2012, 10:04 PM
one of my friends became a meme face

oh joy
Looks more like the dafuq-did-i-just-read-face :P

Posted Image
Edited by Despellanion, Jun 20 2012, 10:13 PM.
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
Ah, how I despise Java. My brother and I are planning on developing a game for the Android Marketplace. Unfortunately, most Android development must be done through Java, and the framework (LibGDX) we're using is also Java-based. My brother doesn't know how to program yet (I have no doubts that he will be able to learn, especially because Java is a simple language), but I find myself trying to program C++ instead! In addition, after not having done any serious Java programming since the end of my sophomore year of high school (a little over a year ago), the notion of automatic garbage collection seems frightening and a little repulsive, if that makes any sense. Also, it feels weird to not pass by pointers or references, since in C++ that would result in creating a new copy. In short, I've spent so much time with C++ that it feels like I don't have any control when I'm programming in Java.
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Off-topic · Next Topic »
Add Reply