Jump to content

Clackdor

Members
  • Posts

    227
  • Joined

  • Last visited

Posts posted by Clackdor

  1. Or even shorter:

     

    sequence=1+KeyDown(KEY_W) or KeyDown(KEY_A) or KeyDown(KEY_S) or KeyDown(KEY_D);

     

    Damnit! I have some obnoxius switch-case statement here. Love the elegancy of 1 line of code.

  2. Rick said what I was thinking.

     

    I've seen community mod projects that have been fantastic (for the curious check out Stainless Steel mod for Medial 2 Total War). But never a community game.

     

    I still voted yes, but I think I could learn a lot from participating in such a project.

  3. I think you can't call a class "main", because it conflicts with the main function. You could call it "Main" though, and class names should always start with capital letter.

     

    Says who?

  4. This story might inspire some and demoralize others.

     

    I recently took a new job. My first day was right after I uploaded Swords and Skellies up to the Asset Store. Turns out, telling people in an interview that you've been working on a video game in C++ makes them think you are a programmer. I'm now neck deep in VB.NET code that somebody else wrote 7 years ago and 5 others tinkered with since. (How do you software developers deal with that stuff?)

     

    I asked them today, "Did you know that somebody erased your SQL queries?" "No." "Do you have any backups." "I don't think so."

     

    unsure.png

     

    So, the "moral" of the story is comment well, make backups, and hey, making a video game might well get somebody to pay you gobs of money to do something you love, plus program a few things. I get to do other cool things like manage a dark fiber network and help design a multi-million dollar electric utility control center. cool.png

     

    I'll get v 0.2 of Swords and Skellies out sometime.

  5. I was actually very wary of implementing my own GUI. I looked at CEGUI and a few others and thought the learning curve was too high for what I wanted to do. I reluctently started to develop my own using Paint.net (for design) and the LE commands only. Turns out it was much easier to do it this way. I am only implementing push buttons and progress bars so far, but I think do-it-yourself is the way to go, at least until you get into some more advanced GUI usage.

  6.  

    Either way, debating aside, I hope Clackdor has enough food for thought to do some investigation into these areas of AI control.

     

    Yes, this thread plus the optimizing thread have given my plenty to digest.

  7. The first thing I did was take a look and see if my code was doing anything stupid. For instance, the 0.1 version of Swords and Skellies updates each skeleton including controller, animation, everything, even if it is clear across the map. In the working copy of 0.2, I only update skeletons in a certain radius of the player, and am currently working on animating only if the entity is being drawn.

     

    Just the first thing above, though, saved 60 FPS. WOW!

     

    There is a profiling library posted on the Asset Store. I have not used it yet. It's marked as broken, but Pixel recently posted that he fixed it.

     

    http://www.leadwerks.com/werkspace/files/file/142-profiling-code-for-c/

  8. This is a more high level question based around programming technique.

     

    I have programed my NPC skeleton class in "Swords and Skellies" to take commands, but not to determine its own behavior.

     

    The behavior is based on the player position and whether she is armed or not. I have a procedural program that calls one of 7 class functions to tell the skeleton what to do: Idle, Pursue, Flee, Attack, Die, Revive, Return (to start position). I could make all the behavior governed inside the object.

     

    How do others do this? Do you think it would be wise to have all of the behavior defined in the object instead of having the procedural program make the call? Is this a pure style question? Other opinions?

  9. For the coins, it is a simple distance calculation, so it is polled every single update. I recognize that callbacks can help my optimization and allow for some other really neat stuff.

     

    I totally forgot about looking in the Wiki. I didn't realize there were examples there. I like your method of assigning the this pointer. I'm going to have to play around with that.

     

    I'm specifically looking for how to ENTITYCALLBACK_DRAW so I can skip animation if the entity is not on screen. It's one of the things Josh recommended to me in a status last week.

  10. Can you be more specific? Below is the essential code I use for controlling my skeletons. Works pretty well except for the running into stuff and use of too many constants.

     

    PointEntity(enemy_pivot,player_pivot);
    turn = EntityRotation(enemy_pivot).Y;
    move = 3.5f;
    UpdateController(controller,turn,move,0,0,10);
    

  11. Yeah, I would render first to one buffer, then another, and then draw the first buffer's color texture onscreen wherever you want it, use it on a 3D surface, or whatever you are doing.

     

    This is exactly what I want to do for an overhead camera. I'm just not sure I know how to do it. Buffer documentation is a little lacking here.

×
×
  • Create New...