Tuesday, October 18, 2011

Better living through algorithmic

I'm spending some days at my mom's house. The next point I wanted to do is the H-events missing in the previous release. But I can't do them when she is around me. So, when I can't do H-events, I work in the next point from my list: "Improving the depth assignation algorithm."

More than a list, it should be a diagram:

The fact is that I was examining my first depth algorithm and I discovered than it actually doesn't need to be improved, because it was quite good. That's why is good to know algorithmic. Here you have the explanation of how it works: WARNING - the next part of the entry can be really boring.

The objective of the depth algorithm I first designed is to order the sprites in game (Beth, enemies, items, rocks, trees... etc) by its Y coordinate. So, sprites with higher Y coordinate must be drawn above sprites with less Y coordinate. So, each photogram, I must re-order the array of sprites by its Y coordinate and give them the corresponding Flash's depth.

Most of people believe that the best sorting algorithm is Quicksort. They are wrong. The best sorting algorithm for a problem depends of the problem. In this case, the event of a sprite moving behing another is something that rarely happens. Thus, the array of sprites doesn't need to be sorted in most of cases, or at lest, barely sorted. And for those cases, the best sorting algorithm is Insertion, that in this case is mostly linear -> O(n).

And that's why I haven't needed to change my depth assignation algorithm.

24 comments:

  1. When my mom is not around me, H-event animations.
    When she is close, I'll program some code: sex tables, sex skills and sluttyness function.

    ReplyDelete
  2. sorry ... I misspelled
    or you can try to expand the map, new chests, one way to find money, that is, Sachi dropping money from enemies killed in a random manner, saving to find other tickets, in fact there are things that are embarrassing you could do to time

    ReplyDelete
  3. Right, but I have to pick one to start with...
    :)

    Once I finish the list I wrote, I'll start to expand the map and make new enemies.

    About "...a way to find money, that is, dropping money from enemies killed in a random manner...", all this is included in my "loot system" point.

    ReplyDelete
  4. I saw on one of your posts ,I'm not sure which, someone mention having her get an NPC. You could move that in so many ways. Beth could do a simple mission for someone and have them like her. If she asks them to help her they can ask for "motivation", and if her sluttyness is to low she will offer cash or something. whenever the NPC is hurt they can refuse to move until she "motivates" them.Sex with the NPC can increase health. if Beth is raped the NPC can revive her, but every time she is raped the NPC's hornyness goes up. Once the NPC's honyness gets "to high" the will start to join in on the monster rape.

    ReplyDelete
  5. Some interesting info. :) I'm still learning to program, so tidbits like this're useful for me.

    ReplyDelete
  6. I'd laugh if she was like "That code...you're programming a SEX GAME!!!"

    ReplyDelete
  7. @Anon1
    Well, the NPC companion of Beth is a project still far. I haven't even decided if could be a person, animal or what.
    Anyway, it's a great idea giving Beth the option to motivate that NPC.

    @Anon2
    That's the prove that study could be important. Even for making -porn- games. xD

    @Kyrieru
    You know... sometimes you can't avoid your brain saying "do it in the right way".
    xD

    ReplyDelete
  8. Ahhhh...constant time complexity is a wonderful thing. Funny how much they push quicksort around like it is the end all in school yet how many times do you ACTUALLY deal with that huge dataset where it really pays off?

    ReplyDelete
  9. The sorting algorithm is used 24 times per second. So, that's not a problem for a processor that can perform millions of operations per second, unless the array is too large (as it happens in my case).

    ReplyDelete
  10. I found a way to get her only in her bra and panty can you get her nude and is the red dress able to use

    ReplyDelete
  11. I found a way to get her naked....*g*

    ReplyDelete
  12. In the current game, and without cheats, you can only get her in bra and panty.

    And the red dress is implented in the v0.377, but the item is not in the game. I haven't decided how it will be available (quests, on sale... )

    ReplyDelete
  13. Have been interested in this for a long time; first time posting.
    I'm glad to see people being patient waiting for updates - it's rare, especially for a pr0n game.

    At any rate, as regards the Red Dress, I'd suggest having it as a reward for a long-ass quest chain, just to be sure that you really, really want it.
    There may also be a possibility to add a variant, depending on Sluttiness & Seduction stats, called "Little Red Dress" (google image search for it, you might find a design you like).

    I'm familiar with how long programming can take, and how a seemingly insignificant change can feck up your entire workload of the lst couple of days. Backup is vital.

    Keep up the good work, looking forward to anything you put into this =^-^=

    ReplyDelete
  14. I definitely have very loyal followers. :)

    I looked for "Little Red Dress" in google images, and I found a design I loved. What do you guys think?
    http://c0170361.cdn.cloudfiles.rackspacecloud.com/1874557_170073_c1d933c051_p.jpg
    I'll surely add this as reward of some quest. About the chinise red dress... I accept more suggestions.

    And I hope you still like my future updates.
    :)

    ReplyDelete
  15. Little red dress is pretty hot. But as it is a strapless dress, it will be better if Beth use it braless...

    ReplyDelete
  16. A thought; Maybe certain quests and parts of the game can be skipped with a high enough sluttyness. Say, quest-givers are withholding items and information until you get them an item from a cave, beth trades sexual favors for the quest rewards instead of doing the quests themselves. It could be a good way to gain sluttyness but players could find themselves hard-pressed later in the game without the experience and loot from the quest itself?

    Love watching this game develop and playing each new version, keep it up and thanks again for another update! :)

    ReplyDelete
  17. Since the beginning, I planned that some quest will be solved using sex instead of combat. Having sex with some questgivers could be one of those ways.

    I also want to add side-quests that are not really necessary to complete the game.

    ReplyDelete
  18. not sure how much of an idea you have for the sluttyness/seduction stats, but...
    I thought it'd be cool as like a sexual version of attack/defense, but not really
    if her sluttyness is high, she can initiate sex with someone. if the opposing sluttyness or beth's seduction is high enough (or a function of the two), then the sex is successful

    or the reverse for when another initiates-the more seductive the thing, and the more slutty beth is, the more okay Beth is by the sex.
    And it even works for rape creatures-if beth is willing enough, she doesn't get hurt or she can have an orgasm that heals her or something.

    but don't change plans on my behalf :-P

    ReplyDelete
  19. I didn't planned sluttyness as a combat stat, but in some way it works as you explained. When it's high, she enjoys rape sex.

    About seduction, is mostly for starting a voluntary intercourse. So it could be more like seduction=attack (high seduction=good attack) and sluttyness=defense (high sluttyness->bad defense).

    ReplyDelete
  20. the combat thing was just an analogy.
    I just thought it would be cool if the rape monsters did less harm if she was slutty (and more used to it/enjoyed it)

    ReplyDelete