MrSkullz

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

151 Neutral

About MrSkullz

  • Rank
    Member

Personal Information

  1. Experiences with Google App Engine

    Wow, that is quite the price hike!   Serapth && shadowisadog, what kind of traffic were you experiencing?  Did the app engine scale with users as promised?  How was the latency?  Did you use the datastore and what were your experience with that vs a relational db?   Thanks for your feedback.
  2. Generally Java is pass by value so what I think is happening at run time is that you are pushing a copy of the floats onto the stack and then telling appendVertexPositionData how many via an offset or counter when you use the '...' var args.  The second one you are passing a copy of a pointer to an array onto the stack.  So the first one will duplicate the floats when the method is called, the second will duplicate a pointer.  Memory wise the var args '...' will take up more space.
  3. As you mentioned you could provide an EMT style skill to help with non-catastrophic death which would provide a dead player the chance to remain unconscious for a minute or two and then some type of emergency service point like a hospital or ambulance station which gives them a chance to be stabilized.  It would be an interesting mechanic if the team had to interrupt their fight for a short time to drag their dead comrades out, plug any holes, pump them up with adrenaline, restart their heart, then carry them out to be picked up by the meat wagon.  If there was perma death teams would be that much more reluctant to venture into dangerous areas too far from emergency services.  Having a good healer (medic) on the team would be quite important.   Catastrophic death would still be catastrophic but that would also lend to more conservative strategies by the team because they would take great pains to ensure the fight was stacked in their favor.  You would probably need to really emphasize the "new" death dynamic in training missions.
  4. Input Required - Feudalism (game)

    That sounds sweet.  Not just SimCastle, SimCastle on crack!   It sounds like your primary motivation is to learn C++ (a noble endeavor, to be sure) I must ask if you want to learn C++ software development or graphics programming.  To me they seem to be very different things.  If you stick with an active graphics engine you can probably translate your C# skills (basic OOP) to C++ without much issue.  You will learn the syntax and then get into the gritty details of the semantics pretty fast and the big moving parts (design patterns, etc) are pretty much the same.   If you are going for graphics programming it really doesn't matter which language you pick because it has nothing to do with the programming language other than how the language interacts with the operating system and drivers.  In my experience C++ excels at this but the underlying procedures, abstractions, and techniques are really independent of the language and you use C++ because of its speed and ability to map low level operations onto high level objects.  Then you plug it into a C# or Python library and off you go.   My advice would be do pick a goal for 6 months (working map, working render engine, etc) and start with that.
  5. Input Required - Feudalism (game)

    Just FYI, the Unity engine uses C# pretty extensively.  And don't underestimate the power of run time dependency injection for testing.  Its painful to do in C++ which is one of the major advantages of Java/C# over C++.  I would take a page out of one of the lean startup gurus and leverage (yup, buzzword) existing libraries over building your own.  If you already have experience in C# then Unity sounds like the way to go.  You wouldn't write an operating system + network stack from scratch for your game, why would you write a game engine if one existed?  There are still PLENTY of problems to be solved in implementation. Building it from scratch in C++ will take way more than 3 years.  Stand on the shoulders of giants.   From reading your description I don't see any role playing elements other than the setting.  Is this going to be pretty much SimCastle?  SimCastle would be awesome.
  6. [color=rgb(0,0,0)][font=Arial][background=transparent]When interviewing new programmers I often ask "How would you model Age in years for a Person?" At first blush most will usually respond with "an integer!" and they are correct, but not correct enough. Actually there is no wrong or right answer (event saying "I wouldn't" because an Age may not be part of the requirements but lets leave that aside for the moment and assume that Age is required and you must model it).[/background][/font][/color] [color=rgb(0,0,0)][font=Arial][background=transparent]Okay, so an integer:[/background][/font][/color] age = 1 [color=rgb(0,0,0)][font=Arial][background=transparent]How about negative ages? Can someone be -3 years old? Not usually. Maybe in Dr. Who but you would need a Tardis class as well. You need to wrap the integer in an object to handle negatives:[/background][/font][/color] class Age: myAge = 1 def setAge(self, newAge): if newAge >= 0: self.myAge = newAge else: self.myAge = 0 [color=rgb(0,0,0)][font=Arial][background=transparent]You now have an Age class which is an integer with special logic. You have modeled the concept of age in a very simplistic form.[/background][/font][/color] [color=rgb(0,0,0)][font=Arial][background=transparent]The importance of wrapping the myAge in a class should not be understated. This has a lot of cascading effects in the rest of the program logic. For example, every Person has an Age so you can see if one Person is "older" than another. You write your logical statements around the concepts you are working with, not around integers, floats, or functions.[/background][/font][/color] [color=rgb(0,0,0)][font=Arial][background=transparent]If we define Person thus:[/background][/font][/color] class Person: myAge = Age() myName = 'My name here!' [color=rgb(0,0,0)][font=Arial][background=transparent]we then have two data models: Age and Person. The only things we are about with a Person is its age and name so our model is fairly sparse but could be sufficient. The fact that Person (model) has an Age (another model) makes it a data structure, meaning that one model is dependent on another. Data structures usually end up being trees or hierarchies with some kind of weird mesh of interrelated objects thrown on top. Generally speaking, a well defined and well maintained data structure is essential to a quality product because it clearly represents what is being modeled and how individual components interact with one another. Logic becomes clear, data pumps in and out, rivers flow with wine.[/background][/font][/color] [color=rgb(0,0,0)][font=Arial][background=transparent]What does this have to do with game development? Everything. And I would argue that good data structures and OO design matter more for game developers than for developers working in normal industry. Game developers are making up logic about made up stuff for people who don't know the program logic. Unless you have a very VERY detailed design document your code will be the "right" answer because it is the only one. So you modeled Age as an int, stuffed it into a database as an uint, shipped it to the client as a hex, then displayed it as purple text. Six months later you get told "players are mad because their characters are dying of old age after only a month of game play!". Which int is wrong? Was it a problem unpacking the UDP packet? Was it the database upgrade? Is it a display issue? Who knows, fire up the debugger and try to reproduce. My experience has been that when I cut corners and don't try to push things to the data structure I end up paying for it. And usually don't save any development time.[/background][/font][/color] [color=rgb(0,0,0)][font=Arial][background=transparent]Good data structures don't spring into existence after a whisky fueled brainstorming session, they evolve over time and through constant refactoring of the code. Very painfully they are expanded and then fixed, expanded and fixed. Stuff you thought you would need is superseded by a more elegant structure somewhere else and stuff you thought you wouldn't need anymore is re-added later. You know you have a good data structure when you bring a new developer on board and he or she looks at your structure and says "that's it? I could have done that in an hour!". What you have left is the simple solution that works. But you won't get there until you try many wrong paths.[/background][/font][/color]
  7. Movement Game Logic in a Python Text-Based Game

    Remember that everything in code is a model of something and the more complex (detailed) your model the more complex your code.  If you have an Age class which stores age in years as an int that is a model which restrictions.  You can't have half years because it's an int and you have to put logic in there to handle cases where age will be negative because that is outside the domain of an Age.  If years as an int is not detailed enough you could model Age as a start datetime and an end datetime but then you have to add code to handle conversions, pretty printing, etc.  It depends on what you need the model to do.   Get a pencil and paper and start to sketch out how you will model space.  As tp9 mentioned you could go the classic way of Rooms which have connections to other rooms which would be a great way to start.  You could build on a 2d plane and model the player's location as an x,y point but that is getting very complex.  Define the player commands (attack, move, etc) and then sketch a few possible sequences such as "player moves north twice and then attacks".  Well defined and thought out data structures lend themselves to simple code that works.   You will want to separate your user interface out from the game logic so that you don't have raw_input's next to move_to_room() functions or room data structures.   Personally I think a project like this (if you stick to the room based game) would be an excellent way to learn Python.  I would recommend getting basic functionality going and then looking around to see if there is a library to do it for you.  That will allow you to understand what the library is doing for you rather than treating it like magic.   Dive in, fix the stuff that doesn't work, break stuff trying to do something new.  Good luck!
  8. Question About Game State

    Could you tell me a little bit more about the context of these functions?  Are they part of a class such as a Player class?  Is this multi user or single user?  Also, can the current user have more than one UserState or is it basically a singleton for the current session?  Can a user be in both the PublicState and the UserState at the same time, meaning one deals with public things such as location, name, and UserState deals with the interface?   What I do when I need multiple state machines is to ensure that they are modeling different things.  I have a global GameStateMachine which would be in a BUILDING, COMBAT, etc state but then a CastSpellMachine which could be WATER_STATE, EARTH_STATE, etc.  The GameStateMachine doesn't care about the CastSpellMachine but the CastSpellMachine can't be started unless the GameStateMachine is in the COMBAT state.   In version 1 you have both a public_state and a user_state.  Do those make sense to coexist?  In version 2 you are essentially switching state from PublicState to UserState.   There is nothing really magical about state machines, they are just a way to pull the game logic out of the presentation logic and simplify the if-then-else a bit.  An int = 0 is a state machine with it's current state being zero.  States are the model of the model view controller design pattern and the controller is the "if in UserState then ..." logic.   So do you want a public_state && a user_state or are you switching from public to user modes?
  9. Tile-based multiplayer

      Yeah, what he said!
  10. Tile-based multiplayer

    I think it kind of depends on how you are modeling time and distance.  If the client is already doing the path finding you can send the intended path to the server when they click the destination square.  The server will be able to figure out if one player's path blocks another player's path before it happens and can notify the blocked player either right away or just before it happens (depending on how the game is supposed to be played).   If the players are snapped to the tile then they will be occupying that tile for whatever their tile per second speed is (assuming circular cows^H^H^H^H tiles) and the server will be able to sequence player movements and figure out when a collision has occurred.  If players are not snapped to the tiles you will have do decide what an "occupied tile" is.  Is it when the player has moved at least 30% across it or just barely snipped one of the corners?   Sending the intended path to the server will not get rid of the lag problem though.  If the lagging client thinks there is a player on a tile and computes a path to get around them but the player has already moved (and the server knows they have moved) the lagging client will still send the round-about path.  At that point it is about how often do you have the server update the client as to the world state (blocked tiles, etc) and will a client recomputed it's path if a quicker route suddenly opens up.
  11. Find a decent web app (ASP.NET, PHP, Struts, etc) developer and sit them down for a long brainstorming session.  Work through the requirements and keep asking "How would you do this?  How would you build this feature? What does it depend on?" The big elements of the WBS will start to appear pretty quickly but you need expertise in the web application area to help you.  Get really detailed down to the maintenance, feature expansion, disaster recovery level and then move onto resource scheduling and cost estimation.   Expect to do this across a day or two.  Pizza and beer helps.
  12. Motivating your team?

      When my project first started there was enthusiasm by the ton and there was a little bit of money flowing in.  Everyone wanted a piece of the pie but it was still very much a volunteer effort.  People started to drop off when they started to see that there was very little immediate return on their time.  Then the money dried up and it was 100% volunteer.  One thing I tried was to motivate people to use the project to pad their resumes because often times you will not be able to use the latest and greatest technologies in a production environment to the game project was a perfect way to work on a complex setup with cool stuff.  That worked with one or two individuals for about two months and then they dropped off as well.  Basically they were not totally enamored with pushing out a game.  They loved the idea of finishing a game but not the idea of working late midnight hours to do it and there was no incentive ($$$) to do it.   One thing I had to learn the hard way was that it took more of my time to try to coordinate and motivate them than for me to just work on the project.  I eventually had to take a hard look at the project and the team members and just let them go because MY return on investment in motivating them was very low.  If someone dropped out for two weeks and then came back I would have to spend an evening spinning them up to the recent changes and then something would come up again and they would drop off.  Wash, rinse, repeat.   I currently am casually 'advertising' for other developers to help but I tell them right away that it is a labor of love and they will only get experience out of it.  They also have to prove that they are motivated by diving in head first with no support from me for the first month.  It's harsh, it's not motivating, and I have had no takers.   When you are experiencing lack of motivation on your team take a step back and put yourself into their shoes.  What is their incentive to put the hours in?  In the professional world that would be money.  Maybe they will get experience but in my experience (pardon the pun) that only motivates your visionary A-game types.  Bragging rights and prestige will only be gotten after the game is successful which may never happen and even if it does it is a long time from now.  If they don't have an obsessive love for the project they will eventually quit.  Cultivate that obsession or start waving the money carrot.  And ask yourself what is the cost to the project to spend the time to cultivate an obsessive team.
  13. I'm looking at using the Google App Engine for my server + data for my slow twitch Facebook game and I was wondering what experiences people have had with it.   The things that really drew me to it were the really nice hand holding that the Python code had and the relatively quick data reads.  And scalability. The label on the tin says lots of scalability.  Basically everything is going to be over a rest ws with about 5-6 client-to-server messages a minute and latency of 1-2 seconds isn't a big deal.   Has anyone built a game server on top of GAE and lived to tell the tale?  How well does it scale in practice?   Thanks for the input!