Author Topic: Text Based Game RPG  (Read 9017 times)

Offline Jimlarck

  • bit
  • Posts: 8
    • View Profile
Text Based Game RPG
« on: August 21, 2012, 10:41:36 PM »
Purged post
« Last Edit: May 07, 2017, 11:56:44 PM by Jimlarck »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Text Based Game RPG
« Reply #1 on: August 22, 2012, 03:23:17 PM »
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).
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Jimlarck

  • bit
  • Posts: 8
    • View Profile
Re: Text Based Game RPG
« Reply #2 on: August 22, 2012, 11:49:46 PM »
Well of a good place where I can learn Java?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Text Based Game RPG
« Reply #3 on: August 23, 2012, 04:47:00 AM »
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).
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Text Based Game RPG
« Reply #4 on: August 23, 2012, 02:27:08 PM »
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:
http://pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/

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: http://wiki.eclipse.org/FAQ_How_do_I_get_started_if_I_am_new_to_Java_and_Eclipse%3F
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Jimlarck

  • bit
  • Posts: 8
    • View Profile
Re: Text Based Game RPG
« Reply #5 on: August 23, 2012, 03:52:44 PM »
Ok, I'll probably be looking into those. Thank you very much. If I have any question's I'll probably come here.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Text Based Game RPG
« Reply #6 on: August 23, 2012, 06:59:38 PM »
No problem.  BTW, when you get around to writing your app, be sure to take a look at examples for NativeActivity, which will allow you to write almost all of your program in C++, with just a small Java piece on top.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline lolpinky

  • bit
  • Posts: 2
    • View Profile
Re: Text Based Game RPG
« Reply #7 on: September 26, 2012, 12:28:11 PM »
Text based games are generally pretty straightforward. I can't wait to try it out! Good luck.  ;)
Oh, and Java is way easier in comparison to C++ imo. Especially when using an IDE like Eclipse which practically tells you what each thing does.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Text Based Game RPG
« Reply #8 on: March 17, 2013, 08:33:45 PM »
It is great to hear that I inspired someone :)  Since I'm into 3D, my recommendation would be to start playing around with jPCT (http://www.jpct.net) and get some ideas from there.

jPCT a 3D engine for Java, with an Android port (jPCT-AE).  There's a forum over there too, and the dev, who goes by the alias EgonOlsen, is one of the most helpful people I know.  I personally never would have gotten into Android at all if it weren't for jPCT.  My other big project, the 3D SoundSystem library (which was used in Minecraft BTW), was also a product of my playing around with jPCT and wanting to help out the great community over there by creating a simple 3D audio engine to go along with EgonOlsen's graphics engine.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Jimlarck

  • bit
  • Posts: 8
    • View Profile
Re: Text Based Game RPG
« Reply #9 on: March 17, 2013, 08:35:37 PM »
I sent you an Email, sorry.

Anyways seems interesting. I'll take a look at it. Thanks :)

Offline Benrox

  • bit
  • Posts: 9
    • View Profile
Re: Text Based Game RPG
« Reply #10 on: May 23, 2014, 01:06:06 PM »
SoundSystem library (which was used in Minecraft BTW),

So that's what you did in minecraft sorry for random post thingy but I was kinds confuzzled upon what you did for minecraft since in the console it prints out this website(how I got here) I was curious to what you actually did now I knows ;u;