Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Edvinas Kilbauskas

Member Since 01 Jul 2011
Offline Last Active Yesterday, 01:01 AM
*----

#5062283 Movement speed vary on different machines

Posted by Edvinas Kilbauskas on 16 May 2013 - 08:06 AM

I'm happy to help you! Thank god I helped at least for someone at this forum :)

 

I use nanoTime() because it is very precise, and I divide it by 1000000000.f so that it would convert it to seconds. So that everything that you multiply by deltaTime variable will return, in this case, the amount of pixels it should move in this frame so that by adding up all frames per second, it will move exact value you specified in the left side, for example:

 

value = 150 * deltaTime;  // this will increase the value variable by 150 every second,
value1 = 45.2 * deltaTime; // this will increase the value1 variable by 45.2 every second.

 

 

I don't really know how to explain this in the right way.

 

And about 32bit and 64bit systems, I don't know why SHOUDLN'T it work. 32 bit and 64 bit only means that your computer's bus width is 32 or 64 bit, and it determines how much different RAM addresses your computer can recognize. So in reality it has nothing to do with performance of your computer, let alone the game which you are making.

 

I hope that answered all of your questions, if not, tell me what you didn't understand yet.

 

Cheers!




#5060865 Movement speed vary on different machines

Posted by Edvinas Kilbauskas on 10 May 2013 - 08:38 AM

I'm not sure why nobody mentioned the right way to handle delta time.

Try this. It should independent of FPS, and computer's speed.

 

 


long startTime = System.nanoTime();
...
public void update(long milliseconds) {

// calculate delta time
long time = System.nanoTime();
float deltaTime = (time - startTime)/1000000000.f;
startTime = time;

// Handle all of the ship logic
 
// Update player position base on velocity

 
position = position.add(velocity.multiply(deltaTime));
 

 
// movement code
 
if(direction.equals("left"))
{
position.setX(position.getX() - speed*deltaTime ); // for example if speed = 100, then it will move 100 pixels per second.
}
else if(direction.equals("right"))
{
 
position.setX(position.getX() + speed*deltaTime );
}
}



#5059149 Good maths for jump in 2D beatmup in Game Maker?

Posted by Edvinas Kilbauskas on 04 May 2013 - 08:06 AM

You should have something like this:

 

float velY = 0.0f;
float playerY = whatever;
const float jumpHeight = 20.0f; // you can and should adjust that

const float GRAVITY = 100.0f; // adjust this also

while(true){ // your main game loop

if(some kind of button is clicked (but not held down)){
   velY = -jumpHeight;
}

velY += GRAVITY * deltaTime;
playerY += velY * deltaTime;

// draw player using playerY coordinate

}



#5054512 sprite top position after angle change

Posted by Edvinas Kilbauskas on 18 April 2013 - 04:50 AM

I think I understand what you want to do. 

 

Is this right?

 

second_frame.png

 

So how to do this?

 

Like this:

 

static const double TO_RADIANS = 3.14159265359 / 180;

float distanceFromCenter;

float cannonAngleInRadians = yourAngle * TO_RADIANS;

cannonTopPositionX = cannonTopPositionX + (cos(cannonAngleInRadians) * distanceFromCenter);
cannonTopPositionY = cannonTopPositionY + (sin(cannonAngleInRadians) * distanceFromCenter);

 

 

So cannonTopPosition variables will give you the position of the the cannons top.

 

distanceFrom center variable should be spriteHeight/2, or spriteWidth/2 depending on if your sprite is drawn horizontaly, or verticaly, also it may be whatever distance from center you want it to be;

 

Hope this helps you.




#5054459 Opengl 3+ rendering to a texture

Posted by Edvinas Kilbauskas on 18 April 2013 - 01:12 AM

Yes, you can use same fragment and vertex shaders for your framebuffer texture as well as for your rendering you main scene objects/textures.




#5053727 Where to publish my first 2D Game!?!?!?

Posted by Edvinas Kilbauskas on 16 April 2013 - 01:11 AM

why-not-both.jpg

 

Seriously, what holds you back from publishing for both platforms? 

If you said you are willing to change controls to touch screen, then go ahead and do that! You should publish your game at as much places you can, so that you would generate greater revenue. That's just my opinion.

 

Also how do you know if steam will accept your game? I heard that it is hard to get your game on there. Also try out http://www.indiecity.com/. It is free to publish there, so why don't give it a go?




#5045645 Steps on How to Become a game Developer

Posted by Edvinas Kilbauskas on 22 March 2013 - 10:29 AM

I think you aren't ready to teach anyone about game development. I read your comment on youtube saying "I actually don't have any published work to show you but I assure you that I had experiences." and I thought to myself: What? This guy has no published games and he is trying to accomplish VERY difficult task of teaching you everything about game development? This is got to be a joke. So I watched your video and the video quality is not very good. I'm not taking about resolution, and lighting or those things, but about how you speak. Some moments are awkward, and others are cheesy. Also sound quality is very low. It is really hard to understand what you are saying.

 

Almost every fact you gave in this video can be questioned, for example, in the video at 07:40 you said: "Is Life a Game too? no, because it doesn't have any limitation." 

Really? I think it has a lot of limitations. I cant , I can't shoot laser beams out of my eyes. I can't go faster than a speed of light (as far as we know it) I can't do many things in real life because it HAS limitations. 

 

I'm probably a horrible person for saying all this stuff. But I'm a natural born critic, and nothing passes through my eyes without getting noticed. So sorry if I really insulted you.




#5041422 When to start with C++?

Posted by Edvinas Kilbauskas on 10 March 2013 - 01:27 AM

I personally learned C++ first, as my first language. It took me a while (about 1.5 years) to just get grasp of all of it's features.

After that I did some game programming for PC, and then started to learn Java so that I could start programming for Android. , I was suprissed that I learned Java very quickly (it took me about 1 month to get grasp of all of it's differences and new features between C++. And knowing both languages is satisfying feeling, because with those two, you can understand almost every other popular programming language like C or C#.




#5035401 New to Game Development but not Programming

Posted by Edvinas Kilbauskas on 22 February 2013 - 08:06 AM

Thanks for all of the replies, guys. I plan on primarily developing for the PC for now, so I think I am going to stick with C# and go that way (I've enjoyed working with C# a lot more than Java, honestly... so that plays into it also). I'm looking into the Unity3D engine and hopefully can pick up on how to use that.

 

Does anybody have some good tutorials to point me to for this specific route?

 

Thanks again for all of the advice. Helped a lot and I'm really looking forward to getting started.

Some good tutorials from this guy:

http://www.youtube.com/watch?v=bjUBKe3FzdQ




#5033645 New to Game Development but not Programming

Posted by Edvinas Kilbauskas on 18 February 2013 - 12:58 AM

My biggest concern is graphics. I have absolutely no concept of graphics and am not exactly an artistic guy. What do you do for graphics?

 

First, which platform you want to program for? If you know C# and Java. You can choose from Android, Windows Phone, PC, Linux and Xbox 360 (although I heard that Microsoft no longer support XNA framework). You didn't specify on which platform you want to develop, so I will assume that you will be developing for PC.

 

Second, you will need to choose your graphics library. 

Here are some choices: SFML, SDL, OpenGL, Allegro.

Ok, so SFML, SDL and Allegro use 2D graphics, but not JUST graphics. They also give you tools for sounds, input, network.

Pluses of these libraries is that they are easy to learn. SFML is probably easiest to learn, is fastest, and has real-time scaling and rotating, while other 2 don't. Also, SFML is based on OO Design, while others aren't. SDL and Allegro is kind of outdated. But with SDL you can make games not just for PC, it's cross-platform.

My recommendation would be SFML. It has bindings to C# and Java.

 

And now comes OpenGL it's a hardcore graphics ONLY library. You can do 2D, and 3D graphics. For 2D graphics you should know basic trigonometry. But 3D is little bit more involved. So if you will go with OpenGL I recommend you to start small, and don't just dive in 3D right away.

OpenGL is supported by both C# and Java.

 

Oh I forgot to mention that you can use SFML + OpenGL. So that you will use OpenGL for graphics, and SFML for sounds, input, etc. That's a really great way to go.

 

 
Of C# and Java, which would be best? (I know, I know.. the generic no language is best answer). What's positive/not-so positive about each of these languages in game development terms?

 

I myself use Java for android game development. I had no problems with it. I have never used C# so I don't have opinion on it.

 

 

Ok, we have programming part sorted out.

 

 
am not exactly an artistic guy

 

Me neither, but you can always find free sprites and graphics on the internet for starters, and later on you could hire someone to do the graphics for you.

 

For more in depth game development I recommend watching Extra Credits on youtube.

http://www.youtube.com/watch?v=WCuUWGmatpU

http://www.youtube.com/watch?v=kqFcF_jRrx0

http://www.youtube.com/watch?v=_HmtmoGwpZc

 

There's alot more, I recommend subscribing him, he uploads great videos every week.

 

 

I hope this post helped you at least a bit. By the way, sorry for my imperfections in English, and for stupid grammar mistakes.

 

 




#5030351 Any good java programming books for begginers?

Posted by Edvinas Kilbauskas on 09 February 2013 - 06:16 AM

Hello! After I heard that Microsoft is cutting xna, and i tried experimenting with it, I decided that would like to use java as my first programming language. Now, are there any good game programming books for it? I looked, but I have seen books that are outdated. Thanks in advance!

 

EDIT: I see that I am an idiot and spelled beginner wrong *facepalm* 

Head first java. Without the doubt the best book out there. One of the authors is some kind of learning teacher, so they explain everything super effectively. They even have tips on how to prepare your brain for learning :) 




#5030114 How you design your games? And where to start?

Posted by Edvinas Kilbauskas on 08 February 2013 - 10:44 AM

Hello. I'm a newbie game developer, i'm almost finished reading a book, and I planned that after I finish it, I will go and try to make my first full game (not like other ones, which never even got finished because of my poor planning, and programming skills). 

Every time I wanted to make a game, I just got to my PC, and started writing code, without any planning or anything in mind. 

And now i'm starting to realize that that's not how things go.

 

And so now I came here with a question: where to start? By that I mean how should I start designing my game? How do you do it? 

Yes, I heard that you just need a piece of paper, a pencil, eraser, a lot of free and just go start sketching. But I want to know it little bit more in depth. 

 

Also, I wanted to tell that i'm not going to make a console or PC game with tear dropping story line or some kind of magical gameplay mechanics. What I am going to develop is a mobile game, more specifically android game, with simple gameplay mechanics and minor or non story line. (Because I know how hard it is to make a good story line)

 

Thank's in advance.

 

 




#4954232 Does CryEngine code C++?

Posted by Edvinas Kilbauskas on 30 June 2012 - 01:21 AM

If you've not programmed in C++ before you have no chance of making a game yet. Even then cryengine bends experienced programmers backwards and breaks them for awhile. Cryengine is a AAA engine not aimed at beginners in any way, it is highly unsuitable for your use. Also its not suited to MMORPG's either, its default networking code struggles beyond 30 to 50 odd players which is not considered mmo size. You would need to rewrite the entire networking back end yourself which is only possible with a full license costing well over $100k. Good luck with that if you can't afford $25. Although your original question: cryengine uses C++.

MMORPG's and shooters are bad starter projects aswell and C++ isn't exactly beginners friendly in its own right.

Btw you've tagged this thread as C# not C++, other than having a C in their name and being object orientated theres no relation.
Although seeming as you've tagged C#. C# isn't exactly a beginners language either but is much easier than C++, also you get access to XNA. Brilliant framework there although windows only (and for a fee paid to microsoft you get xbox 360 indie games marketplace and windows phone 7, I think its $25 each + live gold on the xbox, don't quote me on that though).


Don't start with making games, work upto it. If you jump straight into making games you will get hopelessly lost with your coding ability, get frustrated and quit. You have to put work in before you will get any out.

Well said! :)


#4950311 I learned C++ and SFML, What now?

Posted by Edvinas Kilbauskas on 18 June 2012 - 11:07 AM

Thanks guys! You gave me some really good advice's. I don't use forum very much (I made only 6 posts or so) But from now I'm going to use it more often :)


PARTNERS