Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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] 2 3 4
1  Games Center / Showcase / Megablobber on: 2014-12-11 16:09:26
Greetings,
As of recently i have picked up java game programming again. And what is a better place to start than gamejams?
This is a small game i made with 2 companions.
http://deeepgames.com/about/

Anyways, the game. Match colours. Simple right? no. Its not.
Link:
http://deeepgames.com/games/megablobber/

For those who prefer to play on desktop (might be an older version):
http://deeepgames.com/filesys/release/megablobber.jar

Screenshots (also note, we all 3 are programmers. so simple shapes suit us best):



Support us on ludumdare!
http://ludumdare.com/compo/ludum-dare-31/?action=preview&uid=47213

Any feedback greatly appreciated!
2  Game Development / Newbie & Debugging Questions / Re: What is the best practice for updating a game? on: 2013-09-25 19:59:22
That would be the case if you have gigabytes of code. Which is highly unlikely.
3  Discussions / General Discussions / Re: libGDX + IntelliJ = :( on: 2013-09-24 22:35:54
i have never been able to get the HTML part working, but everything else is well documented. if you havent fixed the working directorys yet, here is what i always do:
-Run your app once
-Close the app
-Press on the drop down menu with the name of your app on it
-Edit configurations
-change working directory

Works like a charm.
I stumbled upon Intellij once when i was still using eclipse. I found it so much faster and the autocompletion is in a whole different league with intellij.
4  Game Development / Newbie & Debugging Questions / Re: Instantiating from constructor with non primitive on: 2013-09-16 19:14:24
Thanks. Silly me for not reading trough the api Emo. Turns out i had made another change which threw an error in the constructor from a totally different class.
Thanks a bunch!
5  Game Development / Newbie & Debugging Questions / Instantiating from constructor with non primitive on: 2013-09-16 18:55:48
Hello,
I'm working on some network code, and i want to instantiate an object. I'm sending the EntityType over the network which goes fine. I've got a class called EntityList which holds all the classes and the types (hashmaps). That works good as well. Now the last thing i'm trying to do is instantiate the object with a constructor.
1  
2  
Entity entity = EntityList.getEntity(((EntityCreation) object).entityType).getConstructor(EntityCreation.class).newInstance((EntityCreation)object);
entityManager.createEntity(entity);

Sadly enough this doesnt work. to clarify some more, i'm sending an entityType of 1 here. Which returns TestEntity.class from the entityList.
TestEntity extends MovingUnit extends SelectableUnit extends Unit extends Entity.
This is the constructor i'm trying to acces:
1  
2  
3  
public TestEntity(EntityCreation entityCreation) {
//CODE here
}

Now it is throwing a "java.lang.reflect.InvocationTargetException". With the .getCause() function i'm trying to debug it, and it is returning a NullPointerException. I take it that it can't find the constructor?
Any help would be greatly appreciated!
6  Games Center / WIP games, tools & toy projects / Re: Lightless (Updated with New Video)[9.1.2013] on: 2013-09-04 10:37:48
Make a movement timer for example. Something like this:

float movementTimer = 0;

public void update(float deltaT){
movementTimer+=deltaT;
if(movementTimer>=1)}
move();
movementTimer-=1;
}
}
7  Games Center / WIP games, tools & toy projects / Re: Chico vs. The Feline Army on: 2013-09-03 12:18:31
I second the white lines. also if there is something solid at the left of you, and you press left and right at the same time, you will dance.
8  Games Center / WIP games, tools & toy projects / Re: Tarot-Buddy on: 2013-09-02 13:02:02
Looks fancy! It would be nice if i could move the window though
9  Games Center / WIP games, tools & toy projects / Re: Balanced Energy [Very early build] [WIP name] on: 2013-09-01 12:43:26
Haha there is not much to see yet. Working hard on implementing pathfinding and networking code
10  Games Center / WIP games, tools & toy projects / Re: Balanced Energy [Very early build] [WIP name] on: 2013-09-01 12:36:22
Cool i'm working on an rts as well. Id love to see your pre alpha Smiley
11  Games Center / Showcase / Re: BlockWars - Multiplayer FPS for PC on: 2013-09-01 10:34:05
There actually is. Maybe not in the showcase forum?
12  Game Development / Networking & Multiplayer / Re: Event based TCP, IO/NIO and other questions on: 2013-08-31 23:45:14
I've had some nice reads.
One thing though, i can make the reading blocked. But how would you do the writing? You will always have to wait poll there to see if there are packets in the list?
13  Games Center / Archived Projects / Re: Name Generating Lua Script on: 2013-08-31 16:54:24
It's rather cool. But it doesn't really look like Java though persecutioncomplex.
I need something like this in the future though, thanks for bringing up the idea.
14  Game Development / Networking & Multiplayer / Re: Event based TCP, IO/NIO and other questions on: 2013-08-30 12:26:42
Well it is a RTS. so synchronisation errors are a big thing that i'm trying to avoid. All the clients have the same entities from the server. And if you make a unit for example, you will request the server. The server will then send a new packet to all the clients that a new object has been made with the identity type and position included.
With the movement i send the current position of the id, and the first node to go to. And as soon as an entity reaches a node i let everybody know so they can interpolate if the entity isn't there quite yet. I think this might be a problem since at the moment i'm using the delta time for movement, and i'm afraid that if you have a slower computer that your unit might end up somewhere later or something.
I'm thinking of changing the movement so that units will move everytime they receive an update packet from the server. This way your units will only be behind your lagg, but this requires a heavy amount of data though. Also i'm definitely using tcp so the packets will always arrive in correct order.
As for the server, i try to do as few calculations on it as possible. It should just be a link that all the players can communicate with each other with a very low level of cheating prevention (checking your resources if you want to make a unit, if you dont have enough no new unit creation packet will be send).
15  Discussions / Miscellaneous Topics / Re: I HATE coffee on: 2013-08-30 11:54:39
nobody needs sleep. Sleep is an activity made up by parents so they had the night alone
16  Game Development / Networking & Multiplayer / Re: Event based TCP, IO/NIO and other questions on: 2013-08-30 11:07:05
Have the server's game loop send updates of the game state rather than sending packets in the client thread which should be used for receiving data.

Thanks for your response. Looks like i don't need NIO after all, lucky me Smiley .
The polling idea is alright, i'll implement that (will have to figure some threading issues out, but no biggy).

as for the sending of the game state, i'm not sure i understand. That would mean that the server has a gameloop. That's something that my server doesn't have at the moment, and sending the gamestate could work. My servers job as is is:
If somebody wants to join, check if they are allowed to join. Then send him an connection id. If the packet received is a gamepacket then it will just send it to all the other clients.
17  Games Center / Featured Games / Re: FarSky on: 2013-08-30 10:34:31
It looks really smexy! Except for the energy system on the suit. I actually liked that idea a lot persecutioncomplex.
18  Game Development / Networking & Multiplayer / Event based TCP, IO/NIO and other questions on: 2013-08-30 09:26:04
Hello
I've finished up a small server client library for myself. I'm only stuck with a couple of questions on how to improve it. At the moment i'm using normal IO for sockets instead of NIO. I looked NIO up and it varies a lot what people think about it. Some say it increases performance, others say it only increases performance on large file transfers and others say it doesnt increase performance at all, but rather makes it more scaleable. The only advantage that i can see is the non blocking write and reading. And it has a channel selection. However this isn't very important on a game server i was thinking by myself, since i dont write a lot of data (positions, entity creations and entity actions mostly) and i have few clients (never more then 20). So would it make sense to rewrite the library and to make use of NIO?

Also secondly, as it is now i always have a ping of 3ms when localhosting, and i'm aware of the reason that causes this. Basically every connection is a thread in which is read and written. but since i dont actually dont do anything most of the time i added a Thread.sleep(1) call, just to give the application some rest (and not drain all the cpu). Is there any way to circumvent this? my loop on both the server and the client looks something along the lines of:
1  
2  
3  
4  
5  
while(connected){
  if (inputStream.available() != 0) {read in packet}
  if (!packetsToSend.isEmpty()) {send a packet}
  Thread.sleep(1);
}

It works very well and i get a good connection to somebody from america (i'm from the NL) with an average ping of around 130. Of which i'm happy. But i like to improve it some more since sometimes there are some odd spikes.

And lastly i got another question. How to syncronize the connection and the game properly? As it is now i'm using libgdx and my own library. Whenever i get a packet that belongs to the game, i put it in an arraylist (and if not, i handle the packet right away). Then every update cycle of libgdx i read out the arraylist. something along the lines of:
1  
while ((packet = client.getPacket()) != null) { check for the packet and execute the correct functions blabla}

where get.Packet() is:
1  
return (connection == null) ? null : connection.getReceivedPacket();

and the getreceivedPacket is:
1  
2  
3  
4  
5  
6  
7  
8  
    public Packet getReceivedPacket() {
        if (receivedPackets.size() > 0) {
            Packet packet = receivedPackets.get(0);
            receivedPackets.remove(0);
            return packet;
        }
        return null;
    }


This solves multithreading problems quite well and i never get a problem doing this. I was just curious if there are other (better?) ways to handle this.

This must've been quite a read, i'm sorry for that! I'd highly appreciate it if somebody could help me out on one, or multiple, questions i've got!
19  Discussions / Miscellaneous Topics / Re: I HATE coffee on: 2013-08-30 09:03:34
I always eat pure chocolate to stay awake. Its not much better than coffee. But apparently its healthy to eat some chocolate and it makes you feel happier.
20  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-08-30 07:50:29
applets are sooo out. On some browsers java is even disabled by default because of all the security flaws it has.
21  Games Center / WIP games, tools & toy projects / Re: Izzy's Revenge on: 2013-08-29 17:57:27
What are the challenges going to be? Will there be enemies or will it be a puzzle solver most of the time?
I like the cute textures though:)
22  Game Development / Newbie & Debugging Questions / Re: Depth libgdx on: 2013-08-29 14:17:38
Yeah i too found the first 2 links. The third one seems rather intresting. A more math based explanation. Thanks. I'll have a look at the drawing of the Actors and Stage.
23  Game Development / Newbie & Debugging Questions / Depth libgdx on: 2013-08-29 13:05:53
Hello,
After a project which i recently made, i came up with a question. How is depth handled normally? The way i do it is draw upper sprites later on. But what if you want to make an isometric game for example? Then you'd have to check if the player is in front of the tree or behind the tree, and after that youd move the tree to a list which will get drawed after the player. With 1 player  or moving object i dont see a big issue here.
But what if you are trying to achieve the same effect with say 200 units? You'd have to check for every single unit on the map within the viewport. Is that right?

Is there some other way to draw a sprite "deeper" than another sprite? Instead of just having it drawn later in the draw function?
24  Game Development / Newbie & Debugging Questions / Re: OpenGL OS/X, Linux problems on: 2013-08-28 20:13:43
@princec

You can easily boot hacked distributions of OS X to work on a normal pc. (Retail dvd is tough to use).

This guide helped me to make my hackintosh and I dual boot windows 7 and mountain lion using NIRESH ISO.

Niresh's OS X 10.8.2 <-- download niresh

And here's the guide.

How to install OS X Mountain Lion on your PC with Niresh

Be sure to install windows 7 and os x on two separate hdds.

fixed it for you Smiley
Also i dont see how using hackintosh would be less inconvienient than a mac mini. Especially the drivers are real annoying to get right.
25  Games Center / WIP games, tools & toy projects / Re: Legends of Yore 2 on: 2013-08-28 20:10:46
Looks very neat!
Only the rain really looks like its stuck in a tile. Not sure if that is your intention
26  Games Center / WIP games, tools & toy projects / Re: Ninja Game on: 2013-08-28 17:41:34
Also the lava collision is off.
How to detonate the TNT?
27  Games Center / Featured Games / Re: The Intergalactic Trashman - [UPDATED - 08/12/2013] on: 2013-08-28 17:28:59
It's looking very interesting!
28  Discussions / General Discussions / Re: Do you get bored, discouraged or demotivated with your projects? on: 2013-08-28 17:28:12
The taking a break is ver important. But be sure not to take your brake too long because you might forget how stuff works if you're on a big project.

Something that i think that helps is to work in a team.
29  Games Center / WIP games, tools & toy projects / Re: Ninja Game on: 2013-08-28 17:21:51
Not too bad for 2 weeks.
Not too many levels though. And i didnt see that it was lava right away (maybe make it more obvious)?
Also if you are next to a TNT piece and you jump while holding down the right arrow, you jump really high.
30  Games Center / WIP games, tools & toy projects / Re: Project Nemesis on: 2013-08-28 16:49:02
Yeah i second what nerb said. I just walked around a bit. Saw some monsters spawn randomly but they arent walking yet.
But the collision is working, so is the animation. Keep it up!
Pages: [1] 2 3 4
 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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

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

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

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

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

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29: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!