This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Mathematics required for 2d games in Java?

 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I want to develop basic 2D games in Java but I have no knowledge of maths. I always sucked at maths even in high school. Would you please tell me about the maths required for 2D java games ?
I know addition,subtraction, multiplication, division, percentage, basic set theory (union, intersection), addition and subtraction of matrices only.
 
lowercase baba
Posts: 13013
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
all programming is math. That's because math isn't computations and calculations, but is instead problem solving and analysis of complicated stuff so you can break it down into simpler components. Math is about THINKING - and so is programming.

Having said that, and having never done any game development, I would imagine a good foundation in geometry and trigonometry would be vital. I could be wrong, but that's my guess.
 
Bobby Sharma
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, Fred.. I already kinda guessed 2D game programming requires a good math foundation. The more math you know, the better. I will start with co-ordinate geometry and then move to geometry and trigonometry.
 
Rancher
Posts: 990
23
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will need more than a rudimentary understanding of the following to do complex gaming programming unless you opt to use readily developed gaming engines:

1 - Trigonometry: will describe how an object moves in free and 2D space.
2 - Geometry: you will need to know how objects are shaped and vectors for finding coordinates.
3 - Physics: this is for the more in depth game, tells how your world will interact (benefit and oppose) movement, energy, and etc for your games
4 - Basic number systems: so you understand things like
a - floating point accuracy (limitations number representation using floating point)
b - underflow
c - overflow
d - division by 0
5 - Algebra: ya, remember when you were in school and you said, "What do I need to know aX + b = C for?" Ya, this is it and it's coming back to bite you big time.
a - conversion between coordinates -- your local spot and where you want to go and how to tell if you are there or not, not to mention.
b - time displacement and movement of objects
c - targeting
d - basic implementation of everything, making your background scroll, resolving edges for movement and scrolling etc... (yes, Math describes it all).

I see the: I'm not good at Math, but I want to be a game programmer post all the time. The good news is: you can look it all up as you need it, and it's all free on line with tutorials. The bad news is: you're going to be crippled until you actually take the time and learn the basics, then get into the more in depth concepts.

Best wishes, and I'm glad to help you understand any parts you need to know.
 
Bartender
Posts: 2899
150
Google Web Toolkit Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wanted a heart shaped animation for my own marriage website in 2012. Without knowledge of mathematics this beautiful render would not have been possible:
http://marriage.salvin.in/#howWeMet
I even wrote down that equation under it

Any good animation would need good maths knowledge.
reply
    Bookmark Topic Watch Topic
  • New Topic