Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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]
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (748 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (595 views)
2018-03-24 14:43:53

Solater (95 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (378 views)
2018-03-02 22:15:33

buddyBro (1038 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!