Jump to content
  • Advertisement

Machaira

Moderator
  • Content count

    3486
  • Joined

  • Last visited

Community Reputation

1034 Excellent

About Machaira

  • Rank
    Moderator

Personal Information

  • Role
    Game Designer
    Programmer
  • Interests
    Design
    Programming

Social

  • Twitter
    MachXGames
  • Twitch
    MachXGames

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ideally, you wouldn't check to see if a pickup needs deactivated, it would let you know it's done. Something like this: namespace PickupManager { public class PickupTimerExpireEventHandlerArgs { } public class Pickup { public bool IsTimed; public bool IsActive; public bool AutoActivate; public float Time; public delegate void PickupTimerExpiredEventHandler(); public event PickupTimerExpiredEventHandler TimerExpired; public Pickup() { } public void Update() { if (IsActive) { //update timer Time -= PickupManager.FrameTime; if (Time <= 0.0f) TimerExpired(); } } } public class PickupManager { public Queue<Pickup> Pickups; public static float FrameTime = .1f; public event EventHandler PickupTimeout; public PickupManager() { Pickups = new Queue<Pickup>(); } public void AddPickup(bool isTimed, float time, bool autoActivate) { Pickup pickup = new Pickup() { IsTimed = isTimed }; pickup.TimerExpired += PickupTimerExpired; pickup.AutoActivate = autoActivate; if (Pickups.Count == 0) pickup.IsActive = autoActivate; Pickups.Enqueue(pickup); } public void PickupTimerExpired() { Pickups.Dequeue(); if (PickupTimeout != null) PickupTimeout(this, null); if(Pickups.Count > 0 && Pickups.Peek().AutoActivate) { Pickups.ElementAt(0).IsActive = true; } } public void Update() { if (Pickups.Count > 0) Pickups.Peek().Update(); } } }
  2. After a quick look at the code, why are you calling DeactivatePickUp every frame? Does your system require only one pickup active at a time?
  3. Machaira

    Learning something about game development

    I'm pretty much of the same mind as the previous posts. Iterate quickly and in small pieces of the game. At some point you'll have to do a couple of large pieces when you tie various systems together to make sure everything is balanced. As for your current design, the big problem that I see is that you're running the game under 800x600. Even if you're trying to get that retro feel, there's no reason IMO that you should be using anything less than 1024x768. Doing this should immediately fix your current problem even if you don't change anything else. However, you should also be considering giving the player the ability to change resolutions, which means more testing of the UI to ensure it works decently at various resolutions. Some specific things about your current UI: * the message window doesn't need to be that tall by default. Just show one or two lines and give the player the ability to increase the height, even if it's just a button to pop it up to a half-dozen lines high. Give the player the ability to hide the window as well. Hotkeys are your friend! * the window that shows health and other info doesn't appear to need to be as big as it is either, and should be in a corner. Other windows like inventory and such should probably be able to be moved around and overlap each other, just so the player can see more. * If you haven't already done so, consider coding your UI in an OO manner - have a base "Window" class or some such and several interfaces, such as IResizable, IMoveable, IDropTarget etc. and implement as necessary for each window. You're doing great so far, just keep it up and don't get discourage. You're working in the toughest genre of game IMO, so consider each little step you complete a victory.
  4. Machaira

    What's in an Inventory?

    So it sounds like inventory should be an interface that whatever class needs to can implement. "Can the player carry a bag in a bag in a bag?" Only when they're empty. Otherwise it just doesn't make sense. You then don't have to worry about nested inventories. "But you can carry corpses right?" I'd say no. Why would you? "Now, weight restrictions..." I'm all for these.
  5. Machaira

    Initial Results

    Nice job. The only thing I'd change is if you're using Entity for everything you might want to consider a bit of a redesign. I'd probably do something like: [CODE] public enum CompassPoint { North, East, South, West } public interface IUpdateable { void Update(GameTime gameTime); } public abstract class WorldObject { public int X { get; set; } public int Y { get; set; } public abstract void Draw(); } public class MoveableWorldObject : WorldObject, IUpdateable { protected CompassPoint _moveDirection; protected bool _isMoving; public void Update(GameTime gameTime) { //figure out if object should move, probably NPCs, monsters, etc. } protected void Move() { //calculate moving if applicable if (_isMoving) { switch (_moveDirection) { case CompassPoint.North: { if (Map.Instance.CanMove(X, Y, CompassPoint.North)) Y -= 1; break; } case CompassPoint.East: { if (Map.Instance.CanMove(X, Y, CompassPoint.East)) X += 1; break; } case CompassPoint.South: { if (Map.Instance.CanMove(X, Y, CompassPoint.South)) Y += 1; break; } case CompassPoint.West: { if (Map.Instance.CanMove(X, Y, CompassPoint.West)) X -= 1; break; } } } } public override void Draw() { } } public class Item : WorldObject { //add members for item //items don't necessarily need an Update method public override void Draw() { } } public class Player : MoveableWorldObject, IUpdateable { //only player object needs to poll input public void Update(GameTime gameTime, KeyState keyState) { //look at keys to determine if the object is moving //calculate moving if applicable base.Move(); } public override void Draw() { } } class Map { public static Map Instance; public bool CanMove(int startX, int startY, CompassPoint direction) { bool ret = true; return ret; } } [/CODE] Looking forward to the next post.
  6. Machaira

    The Plan

    I'd be happy to offer advice based on my RPG dev experiences. I've found RPGs to be the most fun to develop, although probably the most difficult.
  7. Machaira

    The New Name of Man vs. The MMORPG

    And here I thought it was 1337 g@m3rz 0n1y [grin]
  8. Machaira

    Man vs. MMORPG Gets its Own Community

    Gotta agree with Mike. Publisher requirements of having to add a chapter or two that's the same as in every other game dev book just wastes time and space. Hopefully you won't have to deal with that. For an MMORPG, the subjects I'd be most interested in would be (not an exhaustive list): AI - having NPC and mobs just standing around waiting to be killed is so several years ago [grin]. Spawning might tie in with this. Level loading - can this be made seamless? Being able to avoid mobs by zoning is, again, old school and something to be avoided IMO. Constructing and testing. Quest system - basically the heart of just about every MMO out there. Can we avoid "fetch me <x>" and Fed-Ex quests or at least make them interesting? Combat system - combos (both one-person and group), skill cool-down, weapon usage by class, breakage/malfunctions, agro (ties in with AI), etc. Skill system - +s and -s of trees vs. non-tree based, etc. Items - upgradable?, tradable?, a decent crafting system, etc. Hopefully the above makes sense.
  9. Machaira

    The Return of Man vs. The MMORPG

    Quote:Original post by JWalsh Quote:Original post by Moomin Is the book more of a postmortem or more a book teaching you how to do it? I'm more interested in the first (which is what originally excited me about your journal.) It will be a bit of both, as I'm developing a MiniMORPG in which to base the book on. While the book will spend a good amount of time on analysis, design, implementation, and optimization of the MMORPG, I will have completed development by the time writing is complete and publication begins, So...it's likely there will be a good amount of reflection in each chapter on the trials I faced and the mistakes I made. That's probably a better method than what I'm doing - developing code along with the text. Of course, my RPG probably isn't anywhere nearly as complicated as your MiniMORPG. [grin]
  10. Machaira

    The Return of Man vs. The MMORPG

    Heh. The same thing happened with the little series on XNA RPG development I was doing on my blog. [grin]
  11. Machaira

    MS Keynote

    Quote:Original post by superpig Announcing the ability to publish XNA Games to Xbox Live Arcade, directly. Just package up your game and submit it to the service; it gets peer reviewed but beyond that there's nothing stopping your game from being put in front of thousands of Xbox Live gamers worldwide. XNA will be able to target the Zune. I know a lot of people are probably going to flame MS (just because they're MS), but I'm personally very excited about this. I've already started my first project in anticipation of the beta. :D
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!