Dino

Members
  • Content count

    233
  • Joined

  • Last visited

Community Reputation

172 Neutral

About Dino

  • Rank
    Member
  1. Thanks for the feedback., Travis. The first article I wrote was about using Node.JS and Socket.IO together. Here are the articles so for: April 2011 - Getting started with an HTTP Game Server May 2011 - Entity Based Library and Object Serialization June 2011 - Adding run-time script language support July 2011 - The JsMagMUD Project and a client-side animation trick August 2011 - (none) September 2011 - (none) October 2011 (to be released) - Sprite Animation using JavaScript and CSS
  2. There is one other thing that can help you. ECMAScript 5 compliant browsers also allow you to freeze and seal objects. ECMAScript I the standard that JavaScript follows. Might be useful to you.
  3. So you are allowing users to add code for when certain events or actions happen, right? That means someone could submit an infinite loop, which would cause an individual browser to grind down, right? When dealing with user submitted code, especially those running on the client, there is little you can do to limit the JS execution. If you are interested, what you can do is build a framework in which the client API is a proxy layer to a message-based server. The server can be a JavaScript based server that can properly sandbox the user submitted code. That's your best option, IMO.
  4. Is this server-side JavaScript? If it is, then check out the latest issue (June 2011) of JsMag. My article on Game Development using Node.js in this month's issue talks about adding scripting language support to the game engine as well as sandboxing it. You can use the coupon code neb9v6k for a free issue.
  5. Article 3 is now officially published. While I was writing it with every intention on being about merging the two concepts from the May issue, things changed and I went down the road of adding run-time script language support to a Node.js Game Engine. Of course, that script language is JavaScript. ;) For all you out there who would want to read the magazine, here is a coupon code for a free copy of the June issue: neb9v6k
  6. I'm working on the June issue of the "Game Development using Node.js" series. It's a continuation of the May issue and will merge the two topics from that issue (Component-Based Entity Object Library code and Object Persistance using MongoDB) into a single usable class library. Does anyone have any suggestions for a July article? I was thinking about doing dynamic graphic generation using Node.js and a Canvas wrapper. Could be an interesting topic to write about and provide some use to people. Also, any feedback (good and bad, especially bad). I want criticism so that I can improve on it (if warranted). Thanks!
  7. [web] Is it possible to make...?

    Possible? Depends on your definition of bare-bones. To me, bare-bones means simple user management, forum groupings, and simple threaded topic listing with only the ability to add new topics and responses. I think that could all be done in 16 hours by someone with good SQL knowledge and PHP knowledge. If you want something more functional for people to actually use, then No. You need to add certain features that makes a forum usable (like searching, tracking, and rich posting features). That takes more time. I'm assuming you are doing this as a exercise because as Cygnus_X mentioned, there is a boat-load of free PHP forums already available.
  8. Regardless of what type of OS you are using (Linux or Windows) this is rather simple to do and requires zero programming, just some configuration on your end. Your clients will update their provider of their domain (i.e. GoDaddy.com) to have all www.usernamessite.com to go to a specific IP address (your hosting server). On the hosting server, you would set up virtual websites. On a windows PC, this is done in IIS by right-clicking on the Web Sites folder and the 'Add new web site'. At some point, it would ask you to enter in the host name, which would be www.usernamesite.com. You can have multiple ones listed here. On Linux, you would create a configuration file for apache and specify the host name using the ServerName entry. It's really easy to do and you just need to do some reading on it. Again, it's all configuration and zero programming.
  9. [web] text based game

    In every single MUD (which are the grand-daddy of all MMOs and online text-based games) I worked on, there was a size property. All of them used a Size enumeration (i.e.: Gigantic, Large, Medium, Small, Tiny) instead of the cube I provided. That is your call. However, you definitely need size because a small container, like a coin bag, shouldn't be able to hold a large item like a sword or a person. Position is also important. In MUDs, the position is the room or container that item is in. Direction is nice to have for items that are moving along paths, but not necessary. It is better for tile-based games than for room-based games.
  10. [quote name='sermi' timestamp='1305213267' post='4809806'] [quote name='Dino' timestamp='1305212286' post='4809801'] I can't speak to the other ones, but the client side framework that I use all the time is jQuery. It's lightweight, well-supported, and feature-rich. [/quote] The problem with jquery, from what i have read, is that its not built for large apps. [/quote] I'm not sure why that is. I use it in all my web applications for my job. I'm the manager and chief architect of a Web Development and Services for my current employer. My team develops web sites using advanced and cutting edge technologies. Never has jQuery been an issue for us. What constitutes a 'large app'? If you build your app correctly and just add in large plug-ins that are needed (e.g.: Don't add jquery-ui for just the 'button' feature or a single effect), then I don't see where the problem lies. I guess because we mostly use just jQuery and a small number of developer approved plug-ins (like SimpleModal and TableSorter) and develop our own custom plug-ins when needed, we avoid a good amount of the overhead that comes with adding new plug-ins willie-nillie.
  11. I can't speak to the other ones, but the client side framework that I use all the time is jQuery. It's lightweight, well-supported, and feature-rich.
  12. [web] text based game

    Not really. GameObject is your very lowest level class. It should only contain properties and methods that are applicable to all other objects in your game, like size, position, value, and visuals (i.e. images), and methods like Update, Initialize, and Destroy. Your Armor class would inherit from GameObject Your Sword class would inherit form Weapon, which inherits from Item, which inherits from GameObject. Your shop would technically contain a vendor who inherits from NPC, who inherits from Living, who inherits from GameObject. Again, this is the approach using classical inheritance found in .NET. Now I'm going to completely confuse you and make your head swim. There is another approach, and that is designing your objects where everything is an entity (basically, a class that inherits from System.Collection.Generic.Dictionary<string, GameComponent>) and you add components that give your entity functionality. Components would all inherit GameComponent and add in specific functionality based on their purpose. For example, a player Entity would have the following components: [list][*]Physics - Defines the physical properties of an entity like size, position, and direction[*]Visuals - Defines the visuals used when showing this to a player (images, description, etc).[*]Body - Defines the body attributes of an entity like race and limbs[*]Condition - Defines the health/condition of an Entity. This is often referred to as Hit Points.[*]Magic - Defines the magical properties of an Entity, include the level of magic points.[*]Attributes - Defines the Entities physical attributes like Strength, Intelligence, Wisdom, Dexterity, Constitution, and Charisma.[*]Combat - Define the combat system used by this entity[*]Inventory - Provides the ability for an entity to hold other Entities[*]Command - Handles command processing. When a player sends 'give book to Krem', the Command component receives that command, parses it, and dispatches the appropriate messages to all objects involved (player, Krem, and the book)[/list] A Sword Entity would have the following components: [list][*]Physics - Defines the physical properties of an entity like size, position, and direction[*]Visuals - Defines the visuals used when showing this to a player (images, description, etc).[*]Condition - Defines the health/condition of an Entity. In the case of a sword, this would indicate how worn an Entity is.[*]Weapon - Defines attributes specific to a weapon, such as the ability to wield, damage calculators, etc.[/list] A Chest Entity would have the following components: [list][*]Physics - Defines the physical properties of an entity like size, position, and direction[*]Visuals - Defines the visuals used when showing this to a player (images, description, etc).[*]Condition - Defines the health/condition of an Entity. This is often referred to as Hit Points.[*]Inventory - Provides the ability for an entity to hold other Entities[/list] The benefit of this system is that you can define small self-contained components that serve a single purpose and match them up at runtime to dynamically create new Entities at runtime. You can easily define entities using an XML file that simply states the list of components it uses. Take this as an example [code] <entity id="Game.Items.Weapons.Swords.Krem's Sword"> <component type="Physics"> <!-- Size is a cube (width, height, depth) in Inches --> <size>6,42,2</size> <!-- Weight in Lbs --> <weight>10</weight> <!-- A vector value in the format of X,Y,Z --> <direction>0,0,0</direction> <!-- Indicates if the entity is grounded or floating --> <grounded>true</grounded> </component> <component type="Visuals"> <!-- The basic text to output when someone looks at the entity --> <textDescription>Krem's sword is a typical double-bladed sword. It is quite bland</textDescription> <!-- The image to show when someone looks at the entity --> <imageURL>\game\images\krems_sword.png</imageURL> </component> <component type="Condition"> <!-- The maximum value for the condition of an entity --> <maxValue>100</maxValue> <!-- The initial/current value for the condition of an entity --> <currentValue>100</currentValue> <!-- The rate (as a decimal number) at which the condition is restored. Can be a negative value for Entities that decay like corpses. --> <regnerationSpeed>0.0</regnerationSpeed> </component> <component type="Weapon"> <!-- The attribtues required in order to use this Weapon. Some Weapons require more strength or dexterity than others to use them --> <requiredAttributes> <attribute name="Strength" minValue="5" /> <attribute name="Dexterity" minValue="5" /> </requiredAttributes> <!-- Maximum amount of damage this Entity can inflict. The actual damage is based on the hit success and could be greater than maximumDamage for special hits --> <maximumDamage>10</maximumDamage> <!-- The type of damage this Entity inflicts--> <damageType>Blade</damageType> <!-- Indicates how quickly an items can be used. Some weapons take longer to use, like reloading a bow or swinging a very large sword, versus others like a small dagger --> <usageSpeed>Normal</usageSpeed> </component> </entity>[/code] As you can see, creating a new type of weapon is as simple as putting together a new XML configuration file. When an entity is created, the engine will instantiate a blank Entity object. It will then loop through all the component nodes in the main node. For each node, it will create the appropriated Component object (using .NET Reflection) and pass the XML node to the component in the constructor. That component will know what to do from there.
  13. [web] text based game

    [quote name='invalid123' timestamp='1305101766' post='4809316'] [quote name='Dino' timestamp='1305053356' post='4809079'] To start off simple, you should have at least the following classes: [list][*]GameObject - A class representing an in-game object[*]Living - A class representing any living object that inherits from GameObject. This class will contain properties and methods defining the living's body as well as attributes and skills.[*]NPC - A class representing any NPC character that inherits from the Living class. This class will add AI to any living thing.[*]Player - A class representing a player. This class processes user input. You could technically make Player inherit NPC and override the AI part.[/list] That is your normal start to any Game Object library. Give it a go. At some point, though, you will want to look into Component-Based Entity Game Object Library [/quote] what do you mean for gameObject? its a piece of armor or weapon and it has the those items attributes or its an in-game object like a chair or something sorry for this kind of questions but this is my first approach to game programing [/quote] Everything in your game should be based off of GameObject. It represents any in-game entity that can be interacted with. Armor, Item, Chair, Person, etc. It also contains very fundamental functionality that all in game objects have, such as position and size. This is your typical class-based hierarchical approach.
  14. Very nicely done! It looks really nice
  15. [web] text based game

    To start off simple, you should have at least the following classes: [list][*]GameObject - A class representing an in-game object[*]Living - A class representing any living object that inherits from GameObject. This class will contain properties and methods defining the living's body as well as attributes and skills.[*]NPC - A class representing any NPC character that inherits from the Living class. This class will add AI to any living thing.[*]Player - A class representing a player. This class processes user input. You could technically make Player inherit NPC and override the AI part.[/list] That is your normal start to any Game Object library. Give it a go. At some point, though, you will want to look into Component-Based Entity Game Object Library