Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
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  Game Development / Networking & Multiplayer / Game Machine - Open source multiplayer engine on: 2014-06-07 08:28:53
This is a project I started roughly a year ago.  It still has some rough edges with documentation, but the core is solid and usable.

The core of the engine is based on the JVM and uses Akka, which opens up interesting possibilities for java games.  The server side is fully distributed, and a client in java can basically be a member of the cluster, making a fully distributed architecture end to end. 

But anyways the best thing is to just check out the project, it's on github:

https://github.com/gamemachine/gamemachine

Follow the getting started guide to get a working server.  While the only official client I have right now is in C#, java integration should be straight forward.  I'd be happy to offer pointers on how to go about that and get it working with minimal effort.

Chris
2  Game Development / Networking & Multiplayer / Re: Client threads in a thread-per-client online game on: 2014-06-04 16:21:48
I heard the old paradigm is the new thing, so I abandoned NIO for now.

That is the best practise for Threads on the client, when using standard java Sockets? One thread for UI, and one for networking? Should I just reference the networking Thread in the UI-instance?

How would they communicate? Adding packets to a thread-safe queue for sending to the server, and then looping checking if there is something to be read from the InputStream? Is it okay to have both input and output on the same thread?

How would this networking thread work? I can't just loop (apparently) because reading from the inputstream will block.

So how is this done? Examples and pseudocode are appriciated Smiley

It would be a slight learning curve, but Akka (http://akka.io) would change your life forever when dealing with threading, and it has networking built in.  I use it on a large server multiplayer engine, but it's light enough to use on the client.  It basically gives you a high level abstraction for threading and networking that is just better then anything else currently out there in java.

3  Game Development / Networking & Multiplayer / Re: Event based TCP, IO/NIO and other questions on: 2013-09-07 23:43:20
The main thing I would say is don't solve already solved problems.  Google Netty, Apache Mina, Grizzly, and Akka for starters.

I've been writing network code for around 15 years, and there is just no reason to write your own networking for a server from scratch.

Non blocking io is pretty much the standard now days.  Finding a modern server that doesn't use non blocking io, especially in the java world, is pretty rare.  That's primarily because it would be silly to write a networking framework that limited itself to just a few hundred connections at most, so no one does it anymore.

Chris
4  Discussions / General Discussions / Re: The ignorance of the android industry about good porting solutions like Libgdx on: 2013-08-24 19:28:13
The only thing C# has that Java doesn't is the ability to use pointers... which a JIT compiler I'm sure will create with equatable Java code. Java has been multi-platform for a long time, C# is just starting... it will have years of hiccups I'm sure.

(I'm talking about Java 8 )

That's not correct. C# has a lot of small features java is missing (Properties, Real Generics, operator overloading, optional parameters, Extension Methods, LINQ, nice operators like "??", the "var" keyword, real dynamic objects etc.). All in all those are mostly some small code syntax improvements, but it makes working with C# a pleasure and removes a big amount of boilerplate code Cheesy in my opinion (this is important, it's only my opinion) C# is simply the more beautiful language than java (i notice it everytime i code something in java). But I still have to say, that I prefer eclipse over visual studio.

C# as a language IMO beats java hands down.  The problem with C# is mainly on the server side, where linux is king.  It's lagging horribly in mature concurrency libraries and frameworks, smaller choice of libraries in general, etc.. 

My only gripe about C# is it's kind of a kitchen sink language.  They had the benefit of seeing what java did poorly and improved on it, but it's kind of done in an ad hoc manner.
5  Discussions / General Discussions / Re: Making a Static Free Engine on: 2013-08-04 20:01:21
Statics are often the only way to do certain things.  While I try to keep global variables to a minimum, sometimes the alternative is worse then just having a global.

The only architecture I've used that makes it easy to avoid any statics is something  like the actor model where everything is message passing.

Most of the time, statics in my code are reserved for thread safe variables that are used to share data across threads, such as thread safe queues or maps.  I also find that the need to use those  patterns shows up more on the server then the client.

I think a better overall goal to shoot for that will also give you very few statics is making your code thread safe.   There are a lot of advantages to being able to reuse chunks of client code on the server (game logic especially), and not being thread safe makes it a real pain.
6  Discussions / General Discussions / open source virtual world client engines? on: 2013-08-03 23:02:40
I'm looking for a basic 3d virtual world game client to use for testing a server side engine I'm working on.

The main features I need are the ability to put objects in the world, move them around, and the engine should be able to handle rendering a lot of objects at the same time,  the more the better.

Are there any java based clients like this that are open source?  I'd rather not create this myself if something already exists. 

Ideal would be someone that is working on a virtual world java game but doesn't want to handle all the networking and server side stuff.  I'd be happy to do that for them for the right engine, provided that they let me open source all my contributions.

Chris

7  Discussions / Business and Project Management Discussions / Looking for indie team working on a virtual world game on: 2013-07-19 08:03:56
I've spent the last several years working with social games, was the lead dev on a dozen or so successful games,including 2012 social game of the year.  I'm now working on an open source server side engine for massive multiplayer games.  I'm getting to the point where I want to work with this project in the context of a real game.

In exchange for taking a chance on a completely new engine, you would get an experienced dev who would help with game specific logic as well as the work I will continue to do on the core engine.

The project needs to be a virtual world.  I'd prefer to work with people who are somewhat experienced and where our talents compliment each other.  Most of my work is in the evenings and on weekends, I have a full time day job outside the game industry right now (which is why I even have time for something like this:) )

The game engine is a mix of java and ruby using jruby http://www.jruby.org.  It uses the Akka framework http://akka.io to provide a solid actor model with messaging.  Netty http://netty.io to provide UDT/UDP connections for the client, and a built in entity-component system for game logic and messages between actors.  Most of the foundation that you need for a scaleable platform is in place.  I'm currently working on server side game object/player tracking and navigation/pathfinding.  You can read a bit more about the engine here:

https://github.com/chrisochs/game_machine

Anyone interested in talking about this, just send an email to chris at ochsnet.com

Cheers,

Chris Ochs
8  Game Development / Game Mechanics / Re: Inter-Entity Communication in an Entity System on: 2013-07-17 05:47:01
While I haven't played with this on the client side at all, I've been using Akka a lot for a server side engine based on entities and components.  It might be a bit memory hungry for the client, but it's a natural fit for entity systems.  Akka is an actor based messaging system that uses the java 7  fork/join framework.  It's a really nice abstraction for concurrency, probably the best I've ever used. 

I have things setup so my 'systems' are actors, and messages are entities.  I use state machines in the systems for flow/logic control.

Chris
9  Game Development / Game Mechanics / 3d spatial libraries on: 2013-07-17 05:28:07
I'm writing a server side engine and looking at ways to track game objects in 3d space and do things like tracking 'objects near me'.   What are some good libraries for doing more advanced things like proximity searches, seeing if a point is within a region in 3d space, etc..?

Specifically, I've been thinking about an approach where I divide the world up into fairly small pieces, say cubes.  Instead of trying to calculate all the players near an object, I track which cube each object is in as it moves through the world.  Then getting objects near me becomes just reading the list of objects in adjacent cubes.   Then I send the client a list of these objects with their vector, heading, and speed.

Another idea I had was that I might be able to use a mix if 2d and 3d.  Say we are tracking players in the world.  I record their locations in a 2d matrix, but they also have a 3d point.  To get players near me I get adjacent entries from the matrix, then also do a distance calculation on every player whose z axis is outside of a certain range.  The assumption being that many times, the landscape will be fairly flat.

If I'm crazy or way off base let me know.  And if anyone knows some good libraries that would help me out here, that would be great!


Chris

 
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Elsealabs (10 views)
2014-12-28 14:39:27

CopyableCougar4 (17 views)
2014-12-28 06:10:29

BurntPizza (21 views)
2014-12-28 02:38:51

Mr.CodeIt (14 views)
2014-12-27 08:03:04

TheDudeFromCI (19 views)
2014-12-27 06:14:49

Mr.CodeIt (26 views)
2014-12-23 07:34:11

rwatson462 (57 views)
2014-12-15 13:26:44

Mr.CodeIt (47 views)
2014-12-14 23:50:38

BurntPizza (94 views)
2014-12-10 02:41:13

BurntPizza (115 views)
2014-12-08 08:46:31
How do I start Java Game Development?
by gouessej
2014-12-27 23:41:21

Resources for WIP games
by kpars
2014-12-18 14:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-10 02:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-03 02:36:02

List of Learning Resources
by Longor1996
2014-08-16 14:40:00

List of Learning Resources
by SilverTiger
2014-08-05 23:33:27

Resources for WIP games
by CogWheelz
2014-08-01 20:20:17

Resources for WIP games
by CogWheelz
2014-08-01 20:19:50
java-gaming.org 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‑gaming.org
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!