Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 8 9 [10]
 91 
 on: 2017-10-04 22:49:19 
Started by Optimo - Last post by Riven
Blah blah blah Cranky

Back on topic please, or I'll wake the chatchat monster from it's slumber.

 92 
 on: 2017-10-04 18:40:30 
Started by forrest10351 - Last post by bmanmcfly
I'm somewhat new to programming and newer still to libgdx. I am working on a turn based, tactical, rpg similar to fire emblem or final fantasy tactics, after having worked through some tutorials. So far I have been able to render an enemy, a player, and let the player move in a turn based fashion. Now I want to set up some basic "AI" for the enemy. basically I want it to move along the X axis until it is 1 tile away from the player, but for some reason it is not working. here is the relevant code. if anyone has any help for a newb it is appreciated.
 https://pastebin.com/MpkU8BBn
 https://pastebin.com/dwHPhRiK
 https://pastebin.com/5juT8jez

First off, I think you should scale down your project considerably.  Since you are new to programming, and particularly graphical programming. (I suspect you got into it because you wanted to make games, right?)  You'll get alot more out of making a graphical tic-tac-toe game as a beginning.

To answer your question though, if you want a turn based system you would have to split the logic between "player turn" and "process entities" for that turn once the turn is complete, for every turn.

Just to give an idea of just how much you'll need to work out :
- player controls
- leveling
- map loading
- camera controls
- NPC's
- enemies
- probably going to need pathfinding
- collision detection (with enemies for fighting, NPC's for talking, etc)
- a quest system (because there needs to be a reason to go into the dungeon)
- HUD
- Inventory system
- save / load
- sound / music
- transitions
- finally, getting into the finishing touches of special effects, transitions, etc.
- almost forgot, then the balancing... because you don't want your level 3 mage to be able to take down the last boss

Another factor, because you are going to wind up with hundreds of classes and sub-classes and dealing with alot of similar but slightly different code (a rat will use similar logic to a warlock, but the warlock might be able to cast spells), so, before you get into making an RPG, you will probably want to get into an entity based system (like ashley).  That involves it's own learning curve thinking in terms of components and systems that process those components.

So, you'll be much better off if you only need to concern yourself with:
- defining the map (3x3)
- determine whose turn, whether player or AI
- determine a winner

Then, after 2-3 weeks working on that and getting it solid, you'll be much better prepared for something a bit more complex...

After working on increasingly larger projects your confidence and skills will improve and you will have a better sense (and a code base).

I can tell you from experience, when you start on a too large of project you will not consider things that may not seem important but will ultimately break your code as you add to it. That frustration leads many to just give up. Better to start by debugging a project with 5-10 classes than when your project is 20% done and you've got to sort through 50+ files to determine which interaction is causing some obscure bug. 

There's a reason why a game like final fantasy tactics took a team of around 200 people several years to complete.

 93 
 on: 2017-10-04 17:26:39 
Started by Optimo - Last post by jonjava
@Icecore
I'm being racist? Really? Do you even know what it means? What makes the hammer and sickle logo any less murderous, reprehensible or pathological than, say, the swastika?

I'm all for criticism by the way. I think it's vital for a free society to be able to criticize anything and everything. That goes both ways of course.

 94 
 on: 2017-10-04 16:23:53 
Started by forrest10351 - Last post by Riven
It's basically the distinction between a comparison
==
, and an assignment:
=


What you basically did was:
1  
2  
3  
4  
playerturn = false;
if(playerturn){
   ...
}
As you assigned 'false' to 'playerturn', before the if-condition was evaluated.

 95 
 on: 2017-10-04 16:12:05 
Started by Optimo - Last post by Icecore
There is plenty Free Web hosting in internet – with 400gb+ or even unlim bandwidth
+there are many file hosting with wait 30 sec to download
Or you can use Google drive or similar ^^
(steam 100$ for game + free bandwidth XD)

@jonjava
IMHO: Sorry but: that racism (or similar words) to criticize someone for their site logo and life position.

Quote from: gouessej
I get away from the extralegal censorship of the asocial networks under imperalist control
Its not so simple as it looks – custom server can’t help with censorship
– it can be blocked in 1 minute by IP (or even by server internet provider)

“until you not dangerous - no one cares about you”
and even sites like “Pirate Bay” may live for years and years
– but if “they” want – they can block it in all form less then 1 day
- its very easy – simple no one care )

p.s I support “gouessej” position to be independent ^^
(until his action not harm others)
why? because hi at least trying change something in better way
Yes, trying to be independent may go wrong way and its f**k up something important XD
But we don’t know future)
(believe you or not but in couple 50-100 years people will be paying for Air)

pp.s IMHOOOOOOOO "Amazon S3" is full crap
 - never ever use it: their prices are ridiculous their stability not bigger than other big providers VPS
(same as Microsoft Clouds XD)
Its sad to see so many brainwashed people believe in fluffy Ads (with magic inside)
All you need is simple pay little more and all that magic can be yours Wink

 96 
 on: 2017-10-04 15:57:01 
Started by forrest10351 - Last post by forrest10351
Thank you very much, I've gone through at least a few java tutorials and either never learned or forgot about that distinction! felt like I was going crazy haha.

 97 
 on: 2017-10-04 15:27:06 
Started by forrest10351 - Last post by Riven
1  
if(playerturn = false){

This does not do what you think it does Pointing
It sets playerturn to false, then checks whether it is true.

1  
if(playerturn == false){

 98 
 on: 2017-10-04 15:03:29 
Started by forrest10351 - Last post by forrest10351
so I have been playing around with the code and I think i have figured out the fundamental issue im having. any help is greatly appreciated.

at the end of the (player) move method i have a condition.
if(energy==0){
         playerturn=false;
      }
basically once the player has used all of their energy, the boolean that controls if the player move or enemy move method is active, is set so that the enemy has their turn. however the enemy move method doesnt seem to recognize the change in the boolean's state. it starts off as such:

public void enemyMove(EnemyCharacter activeEnemy){
   
      if(playerturn = false){
         System.out.print("test");
but it never prints out test in the console.
however if I change the enemy move method to:

public void enemyMove(EnemyCharacter activeEnemy){
   
      if(energy==0){
         System.out.print("test");

it starts to work. I dont understand why using energy to change a boolean value doesnt work but relying on the energy value itself does. Once again thank you for any help you can give!

 99 
 on: 2017-10-04 12:27:35 
Started by DavidBVal - Last post by Gornova
I'm also looking forward desktop version!

 100 
 on: 2017-10-04 07:41:09 
Started by Vierarmig - Last post by Vierarmig
Timur Ruby promo


https://soundcloud.com/vierarmig/sets/kitchen-social-game

Pages: 1 ... 8 9 [10]
 
Ecumene (48 views)
2017-09-30 02:57:34

theagentd (72 views)
2017-09-26 18:23:31

cybrmynd (182 views)
2017-08-02 12:28:51

cybrmynd (180 views)
2017-08-02 12:19:43

cybrmynd (187 views)
2017-08-02 12:18:09

Sralse (193 views)
2017-07-25 17:13:48

Archive (744 views)
2017-04-27 17:45:51

buddyBro (876 views)
2017-04-05 03:38:00

CopyableCougar4 (1423 views)
2017-03-24 15:39:42

theagentd (1316 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!