Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Oct 2013
Offline Last Active Today, 09:20 AM

#5295950 Why didn't somebody tell me?

Posted by Lactose! on 10 June 2016 - 06:53 AM

Something I've known for a long time and thought everyone knew:


When using Chrome, you can press Ctrl-Shift-T to reopen tabs you've just closed.

I wrote this on the previous page! Post #122

#5295144 2d animation using unity

Posted by Lactose! on 05 June 2016 - 03:57 PM

You either need to create multiple images for each animation, or use another tool to create this specific type of animation for you.

If you create the images yourself, each image of the animation is called a frame, and you'll need to create as many frames as there are changes in the graphics. You then need to, in code, drive that animation (by telling the object which image it should be using, based on e.g. elapsed time, or something else).

(Note that the different frames can be either 1 image per frame, or 1 big image containing all the frames in the animation.)


There are also certain changes you can do directly in Unity with a single graphic -- scaling and rotating spring to mind.


If you choose to use a different tool to create the animations, check out Spine. I'm not entirely familiar with the details of it, but it can be used in Unity and seems to fit the animation style you mentioned.


Maybe I should have gpogled my question

Yes, you should. If you want to make a game, you can't be too lazy to do a bit of research on your own. Especially given how just putting your subject into Google brings up quite a lot of relevant hits.

#5294530 Building a game like "Game of War"

Posted by Lactose! on 01 June 2016 - 02:52 PM

Would anyone be interested in helping to build the game?

Recruiting goes in the Classifieds section of the forums, not here.


If it were as simple as you say, then games wouldn't take as long (and require as many people) as they do. It doesn't matter how smart you are (or think you are), games are a lot more work than you give them credit for. Multiplayer games even more so. MMOs even more so, much much more than you believe.


Can you give any reasonably explanation as to why similar games have development times measured in years, with production teams measured in tens of people, if it were as easy as you think it is?


Unity will not be enough. Once you have all the assets you need, you can use Unity to put them together and make them do as you want, but in order to create and potentially process/adjust all the assets (images, sounds, etc etc), you will need other software (e.g. Gimp, as was mentioned).

#5293193 Confused About Frames Per Second

Posted by Lactose! on 24 May 2016 - 06:40 AM

you only need a solid 15 fps to be sufficiently responsive to be playable. once you hit 30 or so, your animation is smooth and your responsiveness is quite snappy. anything more is just smoother animation eye candy. turns out that lower framerates (within reason) aren't bad, variable frames rates are bad.

This reads like an absolute truth, but it isn't; it depends wildly on the game. While the games you make might be fully playable at lower framerates (and might also thus be what you're accustomed to), it does not mean that translates to every other game/genre.

For fighting and racing games in particular, higher framerates are easily noticable, far above 30 frames per second.

For a chess game without fancy movements/animations, 2 frames per second would probably still be playable (although possibly somewhat annoying with selection latency).

I can't think of a single instance where a higher frame rate would lead to a worse product, but I can definitely think of the inverse.


For VR games/applications, what is considered to be usable is also much much higher, although not for the same reasons.


That said, I definitely agree with constant frame rates being very important. Companies are also starting to catch on to this, e.g. by offering optional frame rate limiters if the frame rate varies, and even in some cases options for whether graphics quality or frame rate is to be prioritized (both of which, for console games, are a fairly huge change to the status quo).

#5293096 Looking for experience?

Posted by Lactose! on 23 May 2016 - 01:04 PM

Check out the Classifieds.

#5292943 SDL and Frame Timing

Posted by Lactose! on 22 May 2016 - 04:48 PM

I highly recommend the following article. It's related to the frame timing issues you were having here, and it might save you a lot of problems later on, when it comes to game logic, etc.

Fix Your Timestep!

#5291952 Determine what side of rectangle is hit by ball

Posted by Lactose! on 16 May 2016 - 03:39 PM

There are some mistakes in your conversion (notably: "t" without a number is not currentDeltaTime, it is the time at which the collision occurs). Your current code would always have k = 1*.


The magic f is just a variable that exists solely to ensure that a line segment is output instead of an infinite line.

However, I still have a feeling this is a lot more complicated than it probably needs to be.


*or divide by zero if currentDeltaTime and prevDeltaTime were equal.


While there might be edge cases where the following is not true, I would imagine this would work in most simple cases involving linear motion, and it should be fairly quick to implement/test:


Keep track of the ball's previous position (i.e. last frame's position) and the paddle's previous position, and whether a collision occurred in the previous frame.


If an intersection occurs, and there was no intersection in the previous frame, compare the positions of the paddle and the ball in the previous frame.

If the ball was to the left of the paddle in the previous frame, collision occurred on the left side of the paddle. Conversely, if the ball was to the right of the paddle before the collision occured, collision occured on the right side of the paddle.

#5291913 Plane equation, + or - D

Posted by Lactose! on 16 May 2016 - 12:44 PM

Randy is saying that we can make D be positive by doing essentially this...



Ax + By + Cz = d

Substitute -d with D


Ax + By + Cz - d = 0

Ax + By + Cz + D = 0

Ax + By + Cz + -(Ax + By + Cz) = 0


It doesn't change the result, it just adds a few parenthesis or sign changes through-out.

In some cases this might make it easier to do some math, or to remember it, or some other reason. The result stays the same, though.


EDIT: Typo.

#5291344 Where to start in game programming?

Posted by Lactose! on 12 May 2016 - 04:49 PM

Hello and welcome.


I recommend you start with the FAQ.

#5291324 Need some help on where to start

Posted by Lactose! on 12 May 2016 - 02:08 PM

Hello and welcome.


I recommend you start with the FAQ.

#5291280 Determine what side of rectangle is hit by ball

Posted by Lactose! on 12 May 2016 - 07:41 AM

Compare the x value of the ball to the min/max x values of the rectangle.

#5290898 Unity Raycast Being Weird

Posted by Lactose! on 09 May 2016 - 05:23 PM

While I don't immediately see the error, you could try doing the Debug.Draw in different colors based on i to see if it's always the same ray that's messing up, and then Debug print values for that specific ray and see if anything becomes apparent.


In the VerticalCollisions I was slightly surprised to see velocity.x used, but I guess it makes sense for movement collision? (Although HorizontalCollisions doesn't do the equivalent.)

#5290272 Time - the most important factor.

Posted by Lactose! on 05 May 2016 - 11:38 AM

That depends on you and what you want to make. If what you want to make is 3D, then you'll need to buy or create 3D assets.

2D games can still take a lot of time. I would suggest that you try making some very simple games first (like Pong), and then see what you want to do when you have a bit more experience.


As a beginner you are probably better suited with trying out free options (like Blender for creating 3D assets) before something expensive.

#5289934 Time - the most important factor.

Posted by Lactose! on 03 May 2016 - 01:51 PM

Quality takes time.

Making games is not easy. Making good games is vastly more difficult and time consuming.


There's just a massive amount of work needed, even for seemingly simple games.

There might have been several dozen big features tried, iterated on, rewritten, etc, etc, which you don't see in the final product, but was necessary in order to get to that final product.

#5289718 Is using the Factory or Builder pattern nessesary?

Posted by Lactose! on 02 May 2016 - 06:55 AM

So, if I don't want to, I shouldn't use the factory/builder pattern "just cause"? Correct?  As stated above there should be a legitimate reason to implement it.


Many thanks for the reassurance.


In your humble opinion, is doing this:

International international = new International(id, firstname, lastname, documents);

Okay? Given that it accomplishes what I need, and I fully understand what it does.