Jump to content

  • Log In with Google      Sign In   
  • Create Account

Gintas Z.

Member Since 27 Mar 2013
Offline Last Active Jul 21 2016 07:09 AM

#5290568 How can I optimize Linux server for lowest latency game server?

Posted by Gintas Z. on 07 May 2016 - 01:23 PM

Hey,

I'm running a game server for my mobile game. It runs as a Java 8 application and uses Kryonet. It uses both UDP and TCP quite oftenly - UDP for spamming update packets and TCP for shooting and a few other events. TCP and UDP uses different ports, not the same one.

 

I'm currently running 3 game server application instances, every on different ports of course.

 

Linux server runs on VPS, stock Ubuntu 14 with a few packages installed. Some players are crying, that they have high ping(> 100), even though they can play other games online well. I am aware, that location plays a big role, this question is not really about it.

 

What could I do? Is my OS choice bad?




#5282005 Why does it look so beautiful and how could I make it in-game?

Posted by Gintas Z. on 19 March 2016 - 08:43 AM

If everything is static, would it be possible to just bake everything into the texture to achieve this look in real-time? If I bake texture + GI/AO, would it be possible to later change the scene lighting in real-time easily?

How is radiosity different from AO?

 

@Kryzon god damn, it looks beautiful. He seems to be using the same magic lighting I'm trying to find out more about.

755ac623691359.563272ca96243.jpg




#5281935 Why does it look so beautiful and how could I make it in-game?

Posted by Gintas Z. on 18 March 2016 - 05:19 PM

the first image is fuzzy (AA at low rez perhaps?).

 

the second two are good.   hi rez.   doesn't seem to be textures, just high rez small solid voxels.   and good lighting with some shadows.

 

the last image is simply too low rez, and thus pixelated.

 

Tell me more about that "good lighting", that's what I want to know.

And in last image, I don't think that pixelation or texture is what makes it look bad, it's probably poor lighting and shading.




#5281903 Why does it look so beautiful and how could I make it in-game?

Posted by Gintas Z. on 18 March 2016 - 01:02 PM

What else could there be used in better looking ones? It seems that ambient occlusion is used and plays a huge role.




#5281848 Why does it look so beautiful and how could I make it in-game?

Posted by Gintas Z. on 18 March 2016 - 07:39 AM

Hi,

I know it's not related to voxels only. I started looking into them and found some cool works:

8l6uVCQ.png 1c324e33152463.Y3JvcCw4NjgsNjc5LDE0MSwzM

 

The whole scene looks warm and attractive, what makes it look that way? I know it's not geometry. What post-processing effects could have been used? Could ambient occlusion have been included?

How could it be achieved real-time in-game? I can see a lot of really bad looking voxel examples but I don't understand what is missing:

tumblr_inline_nxaw6eiHtk1slseez_1280.jpg




#5279746 Efficiently detect shoot direction with gravity playing a role?

Posted by Gintas Z. on 05 March 2016 - 04:24 PM

Damn, this is such a frickin mess.

There is no acceleration, only Y velocity is affected by gravity. X velocity is applied like this:

if(moving left)

    velocityX = -8;

else if(moving right)

    velocityX = 8;

else if(stopped)

    velocityX = 0;

 

 

Some bullets are quite slow and fast shooting interval, so correcting appropriately won't really work, plus it's gonna be a real mess. It would be cool to get the most accurate direction and then later I could just add some randomness based on bot's noobness level.




#5279725 Efficiently detect shoot direction with gravity playing a role?

Posted by Gintas Z. on 05 March 2016 - 02:23 PM

@Alberth, damn feeling stupid now, didn't notice that. Ok, so should I be doing it like this?

                float timeX = (aimingAtPlayer.getPosX() - bulletSpawnPos.x) / (bulletVelocity.x - aimingAtPlayer.getVelocity().x);
                float timeY = (aimingAtPlayer.getPosY() - bulletSpawnPos.y) / (bulletVelocity.y - aimingAtPlayer.getVelocity().y);

                float first = bulletSpawnPos.x + bulletVelocity.x * timeX + 0.5f * Constants.WORLD_GRAVITY.x * timeX * timeX;
                float second = aimingAtPlayer.getPosX() + aimingAtPlayer.getVelocity().x * timeX + 0.5f * Constants.WORLD_GRAVITY.x * timeX * timeX;
                float third = bulletSpawnPos.y + bulletVelocity.y * timeX + 0.5f * Constants.WORLD_GRAVITY.y * timeX * timeX;
                float fourth = aimingAtPlayer.getPosY() + aimingAtPlayer.getVelocity().y * timeX + 0.5f * Constants.WORLD_GRAVITY.y * timeX * timeX;
                if(Math.abs(first - second) < 0.1f && Math.abs(third - fourth) < 0.1f)
                {
                    isAimingAtPlayerBlocked = false;
                    // gather direction from vector2(first, second) or vector2(third, fourth)
                }
                else
                    isAimingAtPlayerBlocked = true;

And then do the same checking thing with timeY instead of timeX? Is this mess even efficient? No better way?




#5279712 Efficiently detect shoot direction with gravity playing a role?

Posted by Gintas Z. on 05 March 2016 - 01:25 PM

A formula to guess the position is:
x = posX + velX * time + 0.5 * gravX * time * time;

 

So we could get X intersection time:

bulletPosX + bulletVelX * time + 0.5 * gravX * time * time = playerPosX + playerVelX * time + 0.5 * gravX * time * time

 

Then get the time from Y parabolas. Then do something, but doesn't matter what yet, because how the hell do I extract time out of this mess?

 

Or is there a different way?




#5279675 Efficiently detect shoot direction with gravity playing a role?

Posted by Gintas Z. on 05 March 2016 - 10:40 AM

Hey,

how could I efficiently calculate shoot direction for enemy AI in order for it to hit the player? Things I know:

player position, player velocity, gravity, bullet spawn position, bullet initial velocity/speed(not direction, gravity is also applied for it)

 

7Afw7nR.png




#5276174 How could I solve edge-case death animation?

Posted by Gintas Z. on 17 February 2016 - 01:30 PM

Hmm, I don't think that shifting will work fine, because death animation is quick. Also, would really work on this one:

dhLTBX0.png




#5273344 GLSL rotated texture gets scaled when closer to 90 degree angle?

Posted by Gintas Z. on 30 January 2016 - 06:45 AM

I fixed it, thank you! All I did was just change my mask to be a square:

cDhCooz.png

Basically, just added some empty space. Seems to be a really scammy solution, but hey, at least it works laugh.png




#5270165 What should I know about making a multiplayer work on 3G?

Posted by Gintas Z. on 08 January 2016 - 04:10 PM

Hi,

I'm making a multiplayer synchronisation for my game and I have a goal to make players be able to play on 3G. It's a platformer shooter. I'm currently planning to send a partial update(players pos + velocity) and a full snapshot every few seconds right now. I heard 3G has some latency issues.  What should I know about it before making? Should I avoid TCP and use UDP only or no?

I'm hoping someone with more experience could tell something useful.

And by the way, should I even be aiming to support 3G? Is it still widely used? Didn't HSPA/HSDPA took it over?




#5268023 Suggest a name for my game(15$)

Posted by Gintas Z. on 26 December 2015 - 07:45 AM

@Hobo, this name sounds very commercial dry.png

 

EDIT:

how do these names sound like?

Gangfort (2)

Brigade Fort (2)

Brigade Camp (2)

Brigade Bastille (2)

Brigade Base (2)

Squad Fort (2)

Squad Camp (2)

Gang Camp (2)

Gang Station (2)

Gang base (2)

Vote your top 3 please :)




#5267894 Suggest a name for my game(15$)

Posted by Gintas Z. on 25 December 2015 - 04:35 AM

I want something simple and catchy. Gang Garrison 2 is a perfect name in my opinion, it would be cool to have something similar.




#5267821 Suggest a name for my game(15$)

Posted by Gintas Z. on 24 December 2015 - 01:30 PM

Hey,

I'm making a Gang Garrison 2 style game. Main focus is for mobile. I want to open a development blog, share some progress and start gathering fanbase, but I need to think of a title first. If you guys have any ideas, write them down below. Basically, suggest alternative titles for a Gang Garrison 2 game.

To increase motivation, I can offer 15$(paypal) if I get a name that will be used.

Thanks. smile.png






PARTNERS