Jump to content

  • Log In with Google      Sign In   
  • Create Account


mikeman

Member Since 10 May 2004
Offline Last Active Today, 06:25 AM

#5141677 There got to be a better way to manage animations.

Posted by mikeman on 24 March 2014 - 05:07 AM

Well, another solution you could use that would make the code a bit cleaner without changing the logic too much would be to implement a module which "chooses" which animation should be played based on registered rules and conditions. This is basically what you do here, deciding the animation based on the state(s) the character is in, with the difference that now is hardcoded.

 

So you could have something like this:

 

 
struct AnimationRule
{
    std::set<int> states;
    std::set<int> excluded_states;
    int animation_id;
};
 

 

Each rules contains a set of the states that need to be active and a set of the states that need to be inactive in order for animation_id to be played.

 

Then you can basically feed the Animation Manager a list of an arbitrary number of rules, using some kind of priority system(could be an explicit number you assign to each Rule, or just based on the order you register them), and the manager would evaluate those and have the first rule that has its conditions satisfied play the corresponding animation_id. That way at least you get rid of all the hardcoding, and you can even encode the whole thing in data files.




#4856454 What does GDNet think about my game engine?

Posted by mikeman on 01 September 2011 - 02:42 PM

Heh. Anyone can see here that there are some members who are giving constructive criticism, and there are some others who are taking delight in making the OP feel bad; in fact if I know phantom(which I do, as a notorious jerk), that's pretty much the only reason he posted('what makes it next gen? what makes it next gen? I'll keep repeating it even though it's completely irrelevant to anything just to point out that I am working for about 1 month and a half in a so-called 'next gen engine' myself and you don't! Hurrrr!").

(Seriously, he already mentioned it twice in this thread - we get it dude!)

Pretty sad if you consider the state of the community some years ago, which was hobbyists all around the world supporting one each other(not 'wow, this is great!" meaningless comments mind you, that's not what I'm talking about).

Whatever, dudes. SteveDeFacto, don't let them keep you down man. You have what you have and the video looks decent. Keep working on it, take the advice from this thread into consideration, and I expect some even better videos in the future.


#4856245 Critisize my cover letter

Posted by mikeman on 01 September 2011 - 06:05 AM


Well in the 'jobs' section of the company site, it explicitly says 'provide a detailed cover letter introducing yourself' and 'include samples of your work, preferably links of samples of your work'. That's why I wrote it this way.

Ah OK. Still, maybe consider separating the samples of your work from the cover letter just to keep it tight and focussed?


Already did it. I now have 3 files attached, the resume, the portfolio and the cover letter(in which I mention that I have the portfolio attached).

I also did away with the second paragraph about when I started programming and jumped right away to my current knowledge, I think I have made it apparent that I have a passion for gamedev that I don't need to share stories even about my childhood :P The letter is now just one page long.

And I have taken Gaenor's advice and lost those sentences, you were totally right that they were somehow 'off'.

Thanks a lot guys, great advice so far!


#4843206 What do you think about the Revelation?

Posted by mikeman on 01 August 2011 - 12:49 PM

And it seems that you, mikeman, are not the only christian who feels this way:

http://www.bbc.co.uk...-wales-14257755


I believe there are many Christians that would not miss some parts of the OT if there was thrown out. Some things just don't add up. Let's start again with the previous example, the man that was put to death because he was gathering sticks on Sabbath. God, says the Bible, order him to be killed. Yet, the same God, incarnated, told the exact same nation that "Sabbath was made for man" when his disciples plucked weed on such a day. And he also stopped a stoning of an adulteress. That doesn't mean He abolishes the law(and Sabbath is, in my opinion a good law, a day of the week that must be dedicated to rest and celebration of life), it's just that he introduces forgiveness. But it's the same God. Jesus Christ is Yahweh incarnated. One one occasion, he orders the Jews "kill the trepassers" and on the other occation he orders the Jews "forgive them"? It's not even about questioning God or throwing away parts you "don't like", it's about completely opposite orders for the same situation. Anyone with common sense will most probably suspect that there's something 'off' going on here, especially when Jesus said "not one stroke or letter of the law will pass as long as Earth and Heaven exist". Most honest Christians I know either struggle with these questions or they just ignore them, saying pretty much 'that stuff don't count'. But it's not like that, not for me at least.


#4842844 What do you think about the Revelation?

Posted by mikeman on 31 July 2011 - 08:55 AM

Of course God doesn't need our love. It's the other way around, we need a loving relationship with Him. All those commands are for the benefit of man entirely, God doesn't need anything, he could spend all his time blowing up galaxies or something for all he cared.

Of course you might say 'I don't need that', but many times people have poor judgement. Take for instance Brain in A Vat, who believes his mind is not fundamentally different from a TiVo or a vacuum cleaner. That's a pretty sad state to be in. And no,his blabberings about the subject don't have evidence that support them; the issue runs quite deep. I'm reading right now a marvellous and well-sold greek book of a famous astrophysicist "I Komi Tis Verenikis" that deals with astronomy,cosmology,evolution and sociology and he poses the question 'can just the increase in calculations complexity of the brain give rise to what we define as the conscious mind, with the abilities to self-reflect and introspect?'. And his answer is 'probably, no'. But of course he is a wise man, not some adolescent that discovered Logic 101 last year and wants to shove his naive ideas to everyone's throat. But I digress...

Another point: There are things in the OT that disgust me too. There's this passage about a man that was gathering sticks on Saturday and was put to death. Now, does that sit well with anyone? I hope not. Where's mercy and forgiveness? Put a human being, a precious life to an end because of a ceremonial law? Wasn't Jesus that said 'Sabbath was made for man, not man for Sabbath'? Now what I say will probably horrify most Christians, but I don't care as I'm not really a part of any denomination, my faith is personal: It is very possible that the vast compilation of books that is the OT was edited and re-edited hundreds of times, with passages edited, deleted or even added by,say, the Sanhedrin. In this case, what is described here is possible that never happened: The Sanhedrin(or whoever else) added it to 'scare' the Jews into proper observation of the Sabbath. That's only a theory, but it is a logical assumption. And now, you might say, how do you know what part of the OT is the word of God and what is man-made? Well, the same way as ever: Using your mind. I never accept truths just because they're written, I accept written things if they ring true to me. And so it is for me. I'm sure most Christians would not agree, but there you go.


#4839203 What do you think about the Revelation?

Posted by mikeman on 22 July 2011 - 09:36 PM

You know, what's with this all "I think we should quit talking about this" and "I can't believe we're talking about this God thing". This is the Lounge, ffs. We had a thread about peeing at the bathtub. You can indeed not talk about this, by not posting in this thread. What, it annoys you that much to have a discussion thread in the front page that has something to do with religion?


#4839116 What do you think about the Revelation?

Posted by mikeman on 22 July 2011 - 02:58 PM

If we can agree there's no such thing as an extra-physical "soul", then how exactly do you define "free will"? From my point of view, my choice to eat a sandwich or not eat a sandwich is no different from my TIVO's choice to record NOVA Science Now or not record it.


Well, I argue that I do have an extra-physical "soul", a "self", a "core" that is independent of the deterministic laws of nature and pure chance, and that makes me very, very different from my TIVO. You can disagree, of course. You can also call me ignorant, but last time I checked you're didn't have access to the Absolute Truth About Anything And Everything, in which case I'd go my way and you'd go yours.


#4839113 What do you think about the Revelation?

Posted by mikeman on 22 July 2011 - 02:45 PM


See, now we're getting somewhere. I believe in free will, because I want to believe. (Obviously, I argued initially from the reverse side to make a point). I don't want to think that my actions are all the result of "dumb", mechanical chemical processes in my head. Obviously, I do believe genetics and chemistry play a role(I too have suffered from depression incidents that were alliviated by medicine), but I also believe that there is a "core" of "self" that is beyond deterministic laws or pure chance(if you want to go "quantum", although it's not proven if quantum mechanics play any role in the brain function). I want to believe that, because, to believe otherwise, would indeed make me depressed :). That's just me. Inside my current worldview, I consider this free will as a gift from God.

Things are more complicated that you guys are making them to be. It's not like a read a book about magical beings and stories and went 'oh yeah, that's the truth'. There was much critical thinking that went into the process, at least for me, and there still is, for years(I was an atheists, and I still like very much many atheists for their ability think free- you can't deny that). The New Testament, for example, is the story of the founder of our faith, and the various authors(of gospels, epistles, Acts, etc...) state that this story is real. This story contains many very deep material about morality, the relationship of man with the divine(if you want to accept that there is such thing), love, compassion, forgiveness, etc etc, that, if someone wants to ridicule them, the joke's on them. Even strong atheists like Dawkins pay respect to the figure of Jesus and have formed the 'atheists for Jesus' group).

Other than that, it's your choice or not to believe the authors, that are witnesses and state that the stories are real. The decision will have many factors in it, your whole 'self', biological, historical, moral, personal, rational, emotional(the story just moved me, personally) etc etc. My method was down-to-top. I read the story of Jesus, and admired his moral teaching. Regardless of his divinity or not, I believed that those words, if applied, could radically change human nature and societies at large. At some point, I decided that the existence of a Creator of the physical universe can be a possibility, and, if it existed, I would wanted to be like the God Jesus described. I then decided that the authors, and Jesus himself, were not lying or being delusional, and that the words were true, that it was not just some magnificent human moral teaching, equal to others before that(say Konfucius) but knowledge handed over by that caring Creator to the human race, as a means for bettering ourselves. The Sermon on the Mount was a critical factor in that decision. I still have many unanswered questions, like the problem of evil(I throught, for example, that isn't it a bit hypocritical to hear,say,the Pope pray to God to help those inflicted by the quake in Japan, where God is supposed to have full control of nature?), but I consider them just that: Unanswered, and very possibly outside of my mental capabilities. I don't regard my faith as a dead, stationary thing: It will change, and hopefully new things will be revealed in the future.

Now, If you still want to equate that long process with "beliving in fairies or the Easter Bunny", go ahead. But I won't take you seriously, as I assume you are not taking me. Oh well.


So to sum up. You believe because you like the teachings of Jesus, think of them as divine and you just want to believe that.
I'd argue that sermon of the mount is nothing extraordinary, some parts are immoral (thought crimes?!!!) etc. but apart from that you still haven't provided any evidence.
Therefore it's still valid to compare god to fairies or Santa (at least Santa brought me presents every year a long time ago :-) )


So, to sum up: That's your view, and what "you'd argue" is of no more of higher value that what "I'd argue". End of story. You can shout all you want and compare whatever with whatever, that doesn't change. I'd argue that your comparisons are utterly stupid.

Amazing. In a thread like this, the atheists are more rigid and judgmental than the theists.

Bye. Nice nick by the way.


#4838397 What do you think about the Revelation?

Posted by mikeman on 21 July 2011 - 05:58 AM

Also, the holocaust happened because of religious issues? Well, if you count National Socialism as a religion I suppose, but still...

I'd even argue that things like the Crusades are just business as usual and happened for the usual reasons - political and economical, and religion just gave to soldiers something to shout when in battle, but we'll get way off topic...


#4838372 What do you think about the Revelation?

Posted by mikeman on 21 July 2011 - 04:08 AM

I disagree, and so does study after study.


Site your sources, please? Note that I'm a firm believer that IQ doesn't tell you anything more than your score on a fraking test designed based on several assumptions. But for the sake of argument, let's see the study and review it, per scientific method. Also, since I'm skeptic about everything, even in the Bible, I did a bit of digging around. Let us hear the professor Helmuth Nyborg himself that did the research(in which, btw, Anglicans scored higher than both atheists and agnostics!). From this article: http://www.guardian....gion-iq-atheism

The study begins with two sets of a priori assumptions. First, [intelligent] people have a brain based biological capacity for solving complex problems, and for acting rationally when confronted with fundamental questions about existence, human nature, underlying causes, or the "slings and arrows of outrageous fortune". Second, [unintelligent] people lack this protection and are therefore unfairly ordained to live in a pre-rational world based on poorly validated evidence and little accumulated insight. They accordingly often find themselves in cognitively, emotionally, or morally challenging situations and have to use plan B, that is, to call upon easily comprehensible religious authoritative guidance and to submit more or less uncritically to culturally given stereotyped rituals. Frustration with their life may also make them seek redemption or faith in an after life.High-IQ people are able to curb magical, supernatural thinking and tend to deal with the uncertainties of life on a rational-critical-empirical basis, and to become prosperous servants of society, whereas low-IQ people easily become trapped in religious magical thinking, in addition to achieving, earning and serving less well.


Those are not results derived from the study, they are a priori assumptions! Nice! Woe, uneducated, stupid, religious and poor! But wait it gets more interesting:

The ultimate causal level presumes that geographically separated peoples were subjected to different evolutionary pressures over extended time-periods. Those living under the hardest of evolutionary pressures, in cold or arctic areas, were gradually and over many generations selected for enhanced g (for details of the Climate Theory, see Lynn, 2006; Rushton, 2000). They had to replace ancient pre-rational supernatural beliefs with more effective rational approaches in order to survive under the harsh conditions given. People living in warm or tropical areas enjoyed in general more relaxed selective conditions, and low g individuals were not severely punished, as their survival was not seriously compromised by uncritical reference to ancient supernatural thinking, irrational beliefs in souls, invisible worlds, Gods, forces, angels, devils, hell, or holy spirits. A contemporary belief that supernatural forces control behavior, feelings and thinking is accordingly seen as a reminiscence of pre-historic animism and magical thinking.


Nyborg has also published papers on the difference on IQ between male and female, which he found to be on average about 8 points.

For further reading, please check out some of the work of Nyborg's associate in those studies,Richard Lynn, having to do with race differences in intelligence.

http://en.wikipedia....in_Intelligence


#4779819 reason i love my wife

Posted by mikeman on 27 February 2011 - 02:39 PM

With regard to the people calling MikeP's post harsh:
Boy it must suck to live in a world where honest commentary that was implicitly asked for was delivered. Does it make you sad to know that people probably hate you for no reason, and some probably hate you for a reason, and some of those people and reasons might actually be valid? Welcome to the internet.


Oh come on. "Maybe she wouldn't bother sticking around" was an "honest commentary"? Whatever. That's trolling of the highest degree. All because he made a like-Ubunty thread?

The funny thing about people like MikeP is that they genuinely think they're intelligent. Sucks to be them in a decade or so, when they realize they're actually not.


#4767068 Proof God doesn't exist?

Posted by mikeman on 30 January 2011 - 10:30 AM

About the clashing with family and friends, I would say that if a Christian gets through life without doing some serious clashing, to quote lolcats: YOUR DOIN IT WRONG. Which can be said of a lot of us lukewarm American Christians.


Yeah, I probably phrased it wrong. But it doesn't mean one has to be cutoff from the people they love. Which is what would probably happen if I announced my family I was to become a Muslim, or a Muslim announced to their family that they're going to be Christian.

The parts of the Koran I've read aren't opposing Christianity as such, as far as I can tell. I could be wrong. But they(or similar texts, like Rumi's beautiful poems) even have helped me look at some of the OT with new light. I don't want to pretend I'm one of those 'open to any religion' type of folks. I'm not. But of course the worldview is different, because people are different. My view of Christianity is probably very much different from many other's. There's no real problem with that, the way I'm thinking it. Everyone's got his own 'language' when thinking to himself and about his life and general. The fact that we still want and achieve, some times, to communicate in a common language is kind of amazing, if you think about it.

People might need to feel comfort that some guiding force is there. They might need to know the answer to why are we here. They might need comfort in knowing that there's an afterlife. They might need to know why we have sentience. None of these are particularly spiritual in nature. Philosophical, psychological? Certainly.



I don't disagree with anything you said above, actually. That's what I meant. I don't mean 'spirit' as an invisible ghostie thingy that occupies space. I'm not into metaphysics much, anyway. Not my cup of tea. Not even in movies, even(I think I have discussed here my beef with BattleStar Galactica :P). I mean it as a combination of questions about our nature,intelligence,courage,kindness,forgiveness and such things.



#3946652 Python Dynamic Class Creation

Posted by mikeman on 23 April 2007 - 04:01 PM

You can use the classobj() function from the module 'new'. The first parameter is a string for the class name, the second is a tuple containing the base classes, and the third is the dictionary of the class(containing the members). Creating an empty class 'Foo' would mean:

from new import classobj
my_class=classobj('Foo',(object,),{})

And I think that, at least with the latest versions, you can just do:

my_class=type('Foo',(object,),{})

Now, if you also want to actually add a global variable named 'Foo'(which I don't consider necessarily a good practice):

globals()['Foo']=my_class


PARTNERS