caleb_yau

Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

122 Neutral

About caleb_yau

  • Rank
    Member
  1. The "Veg Pledge"...

    The most important question we should be asking ourselves is "Why is it immoral to kill?" Most of the simple answers (increasing a "net utility", golden rule type arguments, etc ....) inevitably lead to the inclusion of animals. You really have to work hard to come up with a reason not to kill that excludes animals and isn't somehow arbitrary and brittle. Also the idea that nature dictates ethics is a fallacious one. If someone is born naturally to be a child molester, it certainly doesn't make it ethically correct to allow that person to molest children. In the same vein because we have always been eating meat, and we can eat meat, doesn't mean it is the ethically correct thing to do.
  2. Best AI programming language?

    I would think the language with the richest ai history is prolog. But again just like everyone is saying, the best language is always a situationally dependent question.
  3. Need help with screen "blinking"

    alright i'm getting desperate, does anybody know of any way to enable vsync in a linux python application without opengl?
  4. Need help with screen "blinking"

    Yeah like i said the third step is unnecessary but I put it in there for debugging purposes to see if software debugging might be able to help at all. So it turns out that pygame does not have a default way to vsync. It also turns out that my open source ati driver does not have a way to vsync. After some digging I found the problem is a lot deeper. It turns out that X11 has no standard way allowing for one to wait for a vertical retrace. http://bugzilla.libsdl.org/show_bug.cgi?id=406 This is so weird to me because X11/SDL has been around forever and so many games have been written for SDL and linux, and now it turns out that all of them have this flickering effect, however it may be more obvious in certain types of games. I've been reading that I can bypass this issue if I use opengl as a backend. Does anyone have any experience interfacing pygame/SDL with opengl? Is this complicated? Would it be easier to just rewrite the code using pyglet or something?
  5. Ok this might be difficult to explain but the effect i'm seeing is like blinking and hints of vertical retracing. The part where it shows up most is a part of the background where its mostly white except for 1 pixel thick lines. There it almost looks like when the screen scrolls it gets a lot darker, but if you pay closer attention you can see horizontal lines flickering in and out. How my painting works is this: clear back buffer-> draw on back buffer -> blit back buffer to front buffer -> diplay.flip() I don't believe the back buffer is necessary since pygame/SDL automatically do it automatically I believe, but i'm just being extra sure. I've tried to also use software surfaces (SWSURFACE) and got nothing better. Also my animation feels kind of jerky in general. I use a variable frame rate but I have a max. Switching the max between 20 and 60 doesn't seem to make a difference in this simple zelda style rpg. I'm ready to try anything, oh and i'm using pygame.
  6. pitch detection using java

    From what I know about autocorrelation, i'm pretty sure that it is tool used in the time domain, meaning it is completely outside the scope of a fft. I think what me and Nypyren were alluding to is that after a signal is transformed to frequency space, its peak frequencies will be exposed. If the waveform consists primarily of the frequency that your looking for, or rather that its frequency domain signal peaks at the wanted frequency, then you have a match.
  7. pitch detection using java

    FFT's take an a finite amount of points representing a wave form (must be a integer squared) and converts them from time space to frequency space. Good luck decoding that! :)
  8. pitch detection using java

    Seriously man, what your asking for is no joke. Lookout for the nyquist sampling theorem, and make sure you have a fairly sufficient bandwidth, I doubt what your looking for is exactly one frequency.
  9. DeadLock Question

    Right I like the timeout idea a lot. I will keep looking for some way to script movement in the meantime, I'm sifting through kq code as I speak.
  10. Stackless Languages?

    brutal answer, thanks a lot!
  11. DeadLock Question

    The reason the threading works so easily for me is because of the scripting. This is the first time i'm using scripting in a video game and it seemed like a trivial way to handle npc's would be to define their scripts like so (define (npc-movement) (move npc 'right 2) (move npc 'left 2) (npc-movement)) I would definetly be interested to see a better way to implement this both with or without threads, I had no idea that their would be a gigantic overhead using this method. I will also be looking into cooperative threading. But still the problem remains ... Let me rephrase it though: So i'm writing a tile based multiplayer rpg where all of the users are obviously free to roam around wherever they want. I'm thinking about having it so that when they enter a certain tile then some sort of semaphore like construct comes up that lets it so that only process can access the contents of a tile at a time. Of course the obvious question is, what happens if user A is going from tile U to tile V, at the same time that user B is going from tile V to tile U? What's the most elegant way to handle such a type of situation? Edit: I looked it up and with 100 npc's doing very simple moving and mostly sleeping, it takes up 70% of my cpu. I would definetly like to know how simple run of the mill rpg's do it while also having very simple scripting commands for letting them move around specified or random paths. [Edited by - caleb_yau on March 3, 2009 7:09:36 PM]
  12. So i'm writing a tile based rpg where all of the NPC's roam around and are governed by their own threads. I'm thinking about having it so that when they enter a certain tile then some sort of semaphore like construct comes up that lets it so that only process can access the contents of a tile at a time. Of course the obvious question is, what happens if NPC is A is going from tile U to tile V, at the same time that NPC B is going from tile V to tile U? What's the most elegant way to handle such a type of situation?
  13. Question about this board ...

    gotcha, thanks!
  14. Unity Message Passing

    Come on SmallTalk, let this be the beginning of your magical comeback!
  15. Question about this board ...

    Check the drop down box yourself and have it show all posts. On the left it shows that every single post on this forum has been retired