Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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  Games Center / Showcase / Re: Sphere CCG on: 2012-04-17 03:49:50
Updated www.sphereccg Beta with AI, so players can play vs computer opponent.
2  Game Development / Networking & Multiplayer / Re: [KryoNet] Game Loop on: 2012-04-08 05:46:24
From what I understand you don't want the Server to handle the task in the receiving because this can block it from receiving additional inputs.  Here's what I did for my game; it may help.

I extended the Kryonet Connection object:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public class UserConnection extends Connection
{
    //any other parameters you might want (user name, etc...)
   private ExecutorService tasks = Executors.newSingleThreadExecutor();

   
   
    public void addTask(Runnable newTask) {
        tasks.execute(newTask);
    }


Then make the server object return your UserConnection object.  In your Server code override new connection to:
1  
2  
3  
4  
5  
protected Connection newConnection() {

                return new UserConnection();
            }
        });


Then override received:
1  
2  
3  
4  
5  
6  
7  
8  
public void received(final Connection connection, final Object object) {
                ((UserConnection) connection).addTask(new Runnable() {

                    public void run() {
                        //game logic here

                    }
                });
3  Games Center / Showcase / Re: Sphere CCG on: 2012-04-08 00:21:58
Just released a new update to Sphere to make the Deck Editor more graphically based rather than text/table based. 

Thanks to those who have helped beta test - it is an immense help in allowing me to find random game bugs.  However, I could still use more beta testers, if anyone is interested, please help out - I can really use the input.
4  Game Development / Networking & Multiplayer / Re: [Kryonet] Serializing and transmitting a JOGL Texture object over Kryonet on: 2012-04-01 06:52:08
Sorry new to the forum, not really sure how active it is and therefore what constitutes "old"

Also, it doesn't just help the original poster but anyone else who is searching the web with a similar problem.
5  Game Development / Networking & Multiplayer / Re: [Kryonet] Serializing and transmitting a JOGL Texture object over Kryonet on: 2012-04-01 06:39:06
As everyone has already pointed out, it is probably better just to have the textures preloaded by the clients and send the reference from the server.

However if you encounter another object that you need to send with kryonet but can't serialize it try this:

Have the object implement Serializable

Then when you register the object with Kryonet try:
1  
kryo.register(nameofyourobject.class, new SerializableSerializer()); // this will cause it to be seralized (inefficiently) by Java's built-in serialization


You can also try:
You will need to create an empty constructor in your object for the serializer to use.
1  
2  
3  
4  
5  
6  
public nameofyourobject(){} //put this in your object to be serialized
----
//Put the following where you register your classes with kryo
FieldSerializer ObjectSerializer = new FieldSerializer(kryo, nameofyourobject.class); //kryo is your kryonet object
ObjectSerializer.setCanBeNull(true); //optional - set if some of the object's parameters might be null
kryo.register(nameofyourobject.class, ObjectSerializer);


 If your object has non-primitive parameters you may need to create a fieldserializer for each of these datatypes as well.  This method will be much more efficient than the first since it uses Kryo's serializer.

6  Game Development / Newbie & Debugging Questions / Re: Game Logic where? on: 2012-04-01 05:00:13
Yea I think I understand what you mean.  From where are the moves being sent?  Are they sent remotely (from a player on a different machine) or are they coming from the same machine?

I think either way, it will probably be more efficient for the player to push rather than have the game pull.
7  Game Development / Newbie & Debugging Questions / Re: Game Logic where? on: 2012-04-01 03:07:00
Maybe make an object that saves all of the pertinent game info and poll that when you redraw.  Once a player makes a move you can update the game object.
8  Game Development / Newbie & Debugging Questions / Re: Game Logic where? on: 2012-04-01 02:36:23
Why does it have to keep asking for move?  Why can't you just have it update once the move is received?
9  Game Development / Newbie & Debugging Questions / Re: Prevent jar from being easily reverse engineered. on: 2012-03-28 02:55:38
So my options are obfuscate + encrypt strings or convert to each os specific executable?

If that's the case, how can I convert the jar to a mac app?  Can I do this from a windows environment?
10  Game Development / Newbie & Debugging Questions / Prevent jar from being easily reverse engineered. on: 2012-03-28 02:39:36
I've read about code obfuscators but these seem insufficient to me.  I've packaged my application as an exe for now, but I want users from other operating systems to be able to run the game.  How much protection can I give my could in its .jar form?
11  Games Center / Showcase / Re: Sphere CCG on: 2012-03-21 22:11:23
I've made a lot of changes to the site, as well as updated the look of the game (see the new screen shot above).

Since it may be hard to find a game for a while, the application allows for the ability to run two instances side-by-side.  Just create two accounts and launch the program twice, and you can give the game a test.
12  Games Center / Showcase / Re: Sphere CCG on: 2012-03-20 04:41:01
yes, clicking "purchase cards" would lead to "connecting..." which would never happen

Ah, Ok.  There was a null reference to a resource that I was getting with the ClassLoader.  It didn't show up on my home machine because it was accessing the file, but came up null once packaged.  Got it fixed, the updated version is available on the site.

Thanks for helping me fix that =)
13  Games Center / Showcase / Re: Sphere CCG on: 2012-03-20 02:04:37
Thanks for the input guys!

I've simplified the registration process (I don't need all that info).

I will look in to the connection issues that you guys had.  Could either of you get past the initial login window (to the main window that displayed "purchase cards", "find a game", "edit decks", ....etc)?
14  Games Center / Showcase / Re: Sphere CCG on: 2012-03-19 18:33:41
The Sphere Beta is now available at: http://www.sphereccg.com/download/

I would love to have some feedback from some forum members, thanks!
15  Games Center / Showcase / Re: Sphere CCG on: 2012-03-08 17:18:43
Is there any one on today that has some spare time to help me test the Beta?  It's a two player game and I need someone else to join in.  I also want to see if the client can communicate remotely with the server.  I have converted the jar file to an exe so you will need a windows machine.

Just reply to this thread or send me a PM if you're available and I will give you the download link.
16  Discussions / General Discussions / Re: Eclipse vs. Netbeans on: 2012-03-08 04:37:10
A number of the replies in this thread suggest that Eclipse is buggy.  I have primarily used Netbeans and tend to favor it, however it is not bug/issue free.  My Netbeans cache gets corrupted and must be deleted several times a week.  I've also had so weird issues with refactoring files.

Even so I still prefer Netbeans, the layout is so much more intuitive and it's not "information overload" that Eclipse seems to be when I use it.
17  Game Development / Networking & Multiplayer / Re: Starting point for multiplayer development needed! on: 2012-03-06 03:55:21
I'd like to second the recommendation for KryoNet.  I am using it in my own game and it has greatly simplified the process of setting up my game for multiplayer support.

There's still a learning curve for it, but I'd recommend just looking at the source code for some of the example programs that are on the Kryonet site and just modify them to suit your needs.
18  Games Center / Showcase / Sphere CCG on: 2012-03-02 02:11:39
Hey guys, just came across this site.  Thought it would be a good place to showcase my virtual CCG that I am developing.  I am about a one to two weeks away from a beta.  I would love to have some of the forum members participate as they would be able to provide very relevant feedback.  In the meantime, you are all welcome to visit the site: www.sphereccg.com

The site is very basic, as I've focused most of my efforts on the actual program.

Here's a screen shot
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.

CogWheelz (18 views)
2014-07-31 11:08:39

Riven (27 views)
2014-07-30 08:09:19

Riven (16 views)
2014-07-30 08:08:52

Dwinin (14 views)
2014-07-30 00:59:34

E.R. Fleming (35 views)
2014-07-29 17:07:13

E.R. Fleming (13 views)
2014-07-29 17:06:25

pw (44 views)
2014-07-24 15:59:36

Riven (45 views)
2014-07-24 11:16:32

Riven (30 views)
2014-07-24 11:07:15

Riven (31 views)
2014-07-24 10:56:16
List of Learning Resources
by SilverTiger
2014-08-01 08:29:50

List of Learning Resources
by SilverTiger
2014-08-01 08:26:06

List of Learning Resources
by SilverTiger
2014-08-01 03:54:12

HotSpot Options
by dleskov
2014-07-08 17:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 14:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 14:47:22

How do I start Java Game Development?
by ra4king
2014-05-18 01:13:37

HotSpot Options
by Roquen
2014-05-15 23:59:54
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!