Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (702)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (774)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Discussions / Miscellaneous Topics / Re: Swine flu... on: 2009-04-28 16:54:32
Er... someone should point out that WHO has said no such thing.

Most recent information from their website-

"The Director-General has raised the level of influenza pandemic alert from the current phase 3 to phase 4.

The change to a higher phase of pandemic alert indicates that the likelihood of a pandemic has increased, but not that a pandemic is inevitable."
2  Game Development / Game Play & Game Design / Inventory System on: 2009-04-26 16:21:38
Time to re-factor the old inventory system in my MUD to something a bit more principled. At the moment it is composed of two types of classes:

WearEvent, PutEvent, DropEvent, etc. etc. - Events which represent the movement of an Item from one location to another, at present these simply identify whether the target in question is visible/exists, and that it is an item. They then call methods inside of...
Inventory - A god-class with too many responsibilities. Contains enum Location for all locations an item can be worn/held. Used in a HashMap<Location, Item> which is manipulated through various methods that are extensions of the events mentioned above. EG: Inventory.drop(Item) etc. etc.

My primary issue is that in a text-based game you have to tell the player very specifically why the command they entered failed, whereas in a graphical game you can play an 'error beep' and trust that the player understands that he can't wear a health potion on his head. So what I have is error messages entrenched very far past the above-mentioned events, within Inventory itself: 'You are already wearing something in that location', 'You don't have enough room to carry that', 'Your hands are full,' etc.

Any suggestions? I could just re-factor all logic and accompanying error messages into the events themselves, or create intermediary events which handle secondary logic beyond type-checking, but in either case I can't help but feel like I'm missing out on a more elegant, principled solution. This one is very seriously programmed to an implementation, as opposed to an interface.
3  Game Development / Newbie & Debugging Questions / Re: Giving orders from a core loop on: 2009-03-31 17:39:17
I think you're right, actually. Often times I find myself operating under the notion that giving two different modules two different call stacks, that they receive more attention than they would in a single call stack. In other words, that the two stacks are truly operating simultaneous to one another. The reality is, I think, that I'm just introducing synchronicity issues.

Okay, here's what I have for a core loop at the moment. If anyone can think of other generic MUD server functions (outside of specific architectural solutions) please let me know. Any and all feedback very much welcome.

Core Loop*
Check for incoming network connections
Monitor existing connections (Manage disconnect... hrmm should input be sent to players here? Or at end of loop?)
Player refresh (get input, create actions, update status)
MonsterBehavior (create actions, update status)
ProcessActions (Game logic to create event objects of some sort)
Publish narratives(send input to players)

*Each line represents a class or group of classes
4  Games Center / Archived Projects / Re: Test my platformer engine (WIP) Mac-testers appreciated! on: 2009-03-30 18:12:51
Windows 7 Beta
Intel Pentium Dual CPU T2370 @ 1.73 / 1.73 Ghz
GeForce 8600M GT

- ~55-60 constant fps. I tried all sorts of key-spamming to get this to go down. Never did.
- ~35-40% processor usage
- Log attached
- It's got some style Smiley
5  Game Development / Newbie & Debugging Questions / Giving orders from a core loop on: 2009-03-30 05:29:32
Hey All -

I'm creating a core server loop for my MUD that will command various modules of the game (each presumably running on their own thread) to refresh themselves. For example, the core loop would contact an actionsStack module and tell it to process a certain number of actions, contact a mobList module and tell it to command each mob to tick (retrieve actions, check if spell durations are up, lose health if bleeding, etc.), perhaps check on a newPlayerConnections module, maybe sleep, and then start all over.

My intention behind encapsulating all of the above functionality into various modules is that the core loop need not hang on any particular resource-intensive process, thereby delaying other processes.

A) Is this a reasonable solution to the problem?

B) If so, what is the best way to code a 'refresh' order from the core thread to secondary module threads? My first thought is to create a volatile boolean named refreshed, and have it set to false by the core thread. And the secondary thread would just loop while(!refreshed) {    doStuff;    }

6  Game Development / Game Play & Game Design / MUD 'action' objects on: 2009-03-23 20:25:17
Currently I'm working on a MUD as a hobby. Every 'action' in the game is implemented via abstract class Action and concrete sub-classes, like "Put", "Attack", "ChangeStance", etc.

I'm looking for suggestions on the design. It currently works, and is relatively open for expansion, but it just seems... messy. The architecture is especially messy in regards to sub-classes of Action which deal with Inventory functions.

These Action sub-classes contain three primary components:

- static ActionResult instantiateAction(String input) : This is called using reflection(so it has to be static)on the server, when a client enters a command that corresponds to this Action. The string is entered into another object which returns a Targetable object. If a Targetable object cannot be found, or if the object is not of enum TargetType.ITEM, then an ActionResult is returned with an error, the error is sent to the client(IE: "You can't pick that up, it's a monster!"), and the Action object is not created.

- Constructor(): createNarratives(), a private method, is called here in order to produce descriptions of the actions, which are in turn sent to clients. The action itself is also placed on the player's actionStack to be performed.

- initMechanics(): This is called when the action is actually performed from a mob's actionStack. As part of these particular sub-classes, an inventory function is called like Stow(Targetable), which can assume that what its getting is an item and isnt null, but not things like whether or not the item is in hand for stowing. Therefore this too returns an ActionResult which is checked for errors. If it has errors, then createNarratives() is called again, and its original (successful) narratives are replaced with an error. (IE: That item is on the ground. Pick it up first.)

Like I said, not the worst architecture in the world, and it works, but we ARE talking about a lot of eggs in one basket: recognition and response to client's text entry, narrative creation and error messaging, and actual nuts and bolts mechanics. (Although the latter is fairly well encapsulated into the Inventory object, this is not the case with most other Action sub-classes. Most of them contain about 25-30 lines of mechanics code. This provides for a TON of customizability in action specifics, but only because the developer is forced to work really low-level at all times.)

Thanks for any suggestions/feedback!
Pages: [1]
Lunch (30 views)
2016-12-06 16:01:40

ral0r2 (255 views)
2016-11-23 16:08:26

ClaasJG (391 views)
2016-11-10 17:36:32

CoffeeChemist (483 views)
2016-11-05 00:46:53

jay4842 (533 views)
2016-11-01 19:04:52

theagentd (544 views)
2016-10-24 17:51:53

theagentd (538 views)
2016-10-24 17:50:08

theagentd (491 views)
2016-10-24 17:43:15

CommanderKeith (487 views)
2016-10-22 15:22:05

Roquen (455 views)
2016-10-22 01:57:43
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!