General > Your Projects

Text Based Game RPG

(1/3) > >>

Purged post

For your type of app, starting with a core written in C++ rather than Java is probably a smart move, if you are planning to expand on it in the future.  The native side gives you a lot more control over the memory, which is a big deal if you ever add graphics to the game.  You will probably still need to use some Java for the front-end, so you'll also be getting the good experience of working with the API and dealing with the normal app life cycle and whatnot.  There are a lot of devs on here who I'm sure will be happy to help with any specific problems you run into along the way (or at least point you to a good resource).

Well of a good place where I can learn Java?

Since you have a foundation in c++, you will find Java to be very easy in comparison.  (I also learned c++ first and then Java much later in life).  For this project, you won't need to get too deep into Java anyway, since you'll be writing most of it in c++, and only using a little Java for the front-end.  I'll find you some good resources when I get home from work this evening if I have some free time.  In the mean time, you could just start by googling "beginner's guide to Java" "Java getting started", etc.  There are a lot of good "getting started" type of tutorials all over the web.

The main thing you'll find difficult at first is the concept of Objects.  In Java, when you say something like "a = b;", then a ACTUALLY equals b, not a copy of b (so if you change b's members, a's are affected as well).  This behavior is true for anything extending an Object (which is most things), but not native types like "int", "float", "boolean", etc (those behave the same as in c++).  One you get that concept down, the rest will be easy.

The other basic concepts you'll want to learn are static versus dynamic, hierarchy (extending), and interfaces.  Once you have those, you will probably have enough knowledge to start right into some of the Android example programs.  If you want to get further into the weeds with Java first, I'd recommend Oracles "Java Tutorials", on their website.  Those will go way deeper than you need, but might be good practice to solidify the language for you.  Another good concept to learn eventually is Threads and synchronization (this is done way differently in Java than in c++), but for this project you probably won't be dealing with multiple threads on the Java side anyway.  (Just good knowledge to have for the future).

Yes, it is different, but basic programming skills are universal regardless of the language.  You'll find that a good foundation in C++ makes it considerably easier to learn Java than someone with no prior experience at all.  I'd compare C++ vs Java to Shakespearean English vs modern English.  C++ is more archaic and unwieldy than Java, but if you can do one, then the other isn't a huge stretch to learn.  The main differences are the ones I mentioned (in particular the concept of the Object, which is not quite a pointer, will take a while to get used to).  Using an IDE that you are used to (such as Eclipse or NetBeans) will go a long way to easing the transition as well.

I found a really good site for C++ programmers trying to learn Java:

It may be a bit too much theory to grasp right away, especially if you are having trouble relating the C++ concepts to the explanations.  You may just want to start with a couple of "hello world" examples first to explain what tools you need and how to actually start a project (googling "Java for beginners" pulls up a lot of good basic tutorials).  Eclipse has some resources as well:


[0] Message Index

[#] Next page

Go to full version