Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Project X [RPG]  (Read 1722 times)
0 Members and 1 Guest are viewing this topic.
Offline Warden
« Posted 2014-08-27 02:57:56 »

Project X
Title name is subject to change


Description:
Project X, As I'm calling it temporarily, Is a 2D RPG Game coded in Java. Maps/Levels are rendered using 16x16 tiles. Which have a fixed scale regardless of resolution, Though a larger resolution will offer the advantage of being able to view more of the map at once. For more information, Consider the paragraphs below for reading, or drop a comment(Preferably after you've read everything below).



Objective:
Basically it will be the same as Diablo II, Where you have Quests to complete. It will also offer the same unmediated pvp style. I do want to implement some kind of home base system though, Like Minecraft. Without the customization feature. So players will be able to have homes in the world, But can't individually design them.



Features:
  • Multiplayer [0%] - The game will offer multiplayer game play, Players will connect to a dedicated server using their accounts.
  • Map/Levels [66%] - When it comes to the in game levels, They will be semi-static themselves. But, Objects on the maps will be placed dynamically. Hopefully not in hot Lava. Currently, Maps/Levels are loaded using XML files. But, Once the development of the multiplayer server begins. Maps/Levels will be loaded using the multiplayer server instead.
  • Entities [1%] - I'm currently thinking, That entities will be rendered similarly as the tiles. Where each entity will extend an abstract class called entity. This may seem like common practice to some developers, But I'm rather new at this so forgive me if I elaborate too much.
  • Collision [99%] - The system handling collisions, Is pre-coded into the tiles, Which uses a boolean field called PassThrough. So, if (!PassThrough) { move(0, 0); }. Seeing as everything rendered in game is tile based, Entities will also use this system of collision. Except perhaps Ghosts O.o


Planned Improvements:
  • Implement Component Model Class for Tiles
  • Assimilate Tile Classes into Class Members, Once individual Tile Classes are completed


GUI:
Currently, This is my GUI for the project. As you can see there are no in game menus currently, Though there are plans for a system which resembles that of Diablo II. You'll notice the player sprite is loaded in the upper left hand corner in the image below, This is solely for testing purposes. Which has to be done during map development, Seeing as walking around on transparent void tiles isn't possible with the collision system already in place.





Inquiries:
If you have them, Please comment below. You may actually help me avoid problems down the line by asking questions as I'm pretty well learning as I go. I don't have a story line yet, But, I'm thinking something like a Zelda/Diablo hybrid? Idk..

Downloads:

Project X v1.0
Project X v1.1
Offline Warden
« Reply #1 - Posted 2014-08-28 00:05:32 »

Update:

So for todays progress I implemented a generic Launcher for the game. Which sounds easier than what it was. I had Launcher code from another project I thought I could simply copy/paste. But, I encountered JPanel duplications and, extended class errors. All in all, The problems are sorted out and, This is what the launcher looks like without decorations.

If you seen the image of the GUI above, You'll notice the launcher in the image below appears smaller. That's because I changed the height/width through the Configuration menu prior to screenshotting. So I wouldn't have a bunch of desktop icons in the screenshot.

Offline Gibbo3771
« Reply #2 - Posted 2014-08-28 11:49:55 »

I'll be bold and say you are over-reaching.

I have no idea how experienced you are but from what you described it sounds easier than it actually is.

Don't mean to bring you down but most people that on here with plans like this usually end up in a corner crying lol.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Warden
« Reply #3 - Posted 2014-08-29 00:17:25 »

I'll be bold and say you are over-reaching.

I have no idea how experienced you are but from what you described it sounds easier than it actually is.

Don't mean to bring you down but most people that on here with plans like this usually end up in a corner crying lol.

Well, I definitely didn't mean to imply that I'm trying to achieve the same user base, graphics or, game play as Diablo II or Zelda. But, Let's just say that's what I'm aiming for. It never hurts to set the bar high, As that usually inspires people. Any ways, I may be new to Java. But, From what I've learned already, It's flowing pretty good. I do have coding knowledge other than Java and, Despite how little it may be it's definitely a help. I have already coded a server/client in a previous project. So the multiplayer aspect of the game shouldn't be very difficult. The worse part of the process right now seems to be hard coding my tile classes into the game. Especially with 12 variations of each corner tile.
Offline Drenius
« Reply #4 - Posted 2014-08-29 18:14:05 »

Quote
It never hurts to set the bar high
Actually this is one of the most frequent problems we see. You might quickly lose motivation when not reaching it, but it's up to you to know where your limit is.  Smiley

Quote
I have already coded a server/client in a previous project. So the multiplayer aspect of the game shouldn't be very difficult.
Well, we will see...

However, good luck.
Offline Warden
« Reply #5 - Posted 2014-08-30 19:38:33 »

Update:

Sorry if this update is a disappointment, But it is significant in regards to the Launcher. I made the buttons and fonts all dynamic. Along with squishing a duplication bug, Which caused buttons to appear in the Configuration screen from the Launcher screen. Even though there was already a code implementation in place to stop this, It still happened. So, I had to further code a fix for that bug. Which appears to have completely eliminated the bug. I also added screen resizing based on resolution, This can be done through the Configuration menu. By default it's 800 x 600 and, Only offers resizing based on the 4:3 aspect. There is a little delay when changing screen sizing, This is due to Thread.Sleep which had to be implemented to negate the save delay. Anyways, This is the Launcher as is:



The next update should be more game play related, I just decided to work on the Launcher this time. As hardcoding Tile classes got boring after doing three dozen. I think I have another four dozen to go, Including drawing the tiles.
Offline SauronWatchesYou
« Reply #6 - Posted 2014-08-31 10:59:53 »

Update:
As hardcoding Tile classes got boring after doing three dozen. I think I have another four dozen to go, Including drawing the tiles.

How come so many? persecutioncomplex
Offline BurntPizza
« Reply #7 - Posted 2014-08-31 15:11:08 »

Many dozens of tile classes sounds like the perfect place to use a component model.
Offline Warden
« Reply #8 - Posted 2014-09-01 00:18:13 »

How come so many? persecutioncomplex

Well, I think the best way I can explain it is like this. Take the grass tile for example, It's 16 x 16 and, For that tile I have variations with water an lava. So there is North Grass, East Grass, South Grass and, West Grass. For North Grass, The grass is at the top of the tile and the water increments per tile from the bottom and, So on for the other ones. Then there's North West Corner Grass and, North East Corner Grass.

Those tiles each consist of Grass on one of four sides or, In the case of the corner tiles, On two out of four sides. With water or, lava on the other sides. Every tile has a higher incrementation of water or, grass depending on how you look at it. Until the grass/water gets close to the tile boundary.

The reason I did this was so that I could customize the size of things like ponds, lakes and, rivers. Most of these tiles the player can't walk on. If I would have chosen to do this on a per level basis, I would have had to do 8 grass tiles with one water tile in the middle. Which eats up a lot of screen real estate, With my method I can do 1 directional grass corner tile and, I'll end up with four tiles which show grass on all sides of water. As shown in the two tables below.



The brown/tan pixels in the tiles below is suppose to represent a dirt/sand transition to the water. In the previous layout, You'll notice there is no dirt or, sand. That's because I would have to add yet another two rows and two columns in the grid to permit dirt/sand transitional tiles in a already limited area.


The grid above shows four corner tiles of the same grass/water increment. If the reason why I have so many tiles is confusing, I hope its clarified now.

Many dozens of tile classes sounds like the perfect place to use a component model.

I'm already using an abstract tile class, Which isn't quite as efficient as a component model. But, Is somewhat easier to understand amidst the rest of the code. Though, I can see the payoff.
Online LiquidNitrogen
« Reply #9 - Posted 2014-09-01 00:25:00 »

Hmm.. you're not using a separate class for each grass tile variant are you?? If you are, it's much easier to make a single grass tile class, and store its variant as a member.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Warden
« Reply #10 - Posted 2014-09-01 00:31:38 »

Hmm.. you're not using a separate class for each grass tile variant are you?? If you are, it's much easier to make a single grass tile class, and store its variant as a member.

I'm actually not using members right now, But would peg it as a future efficiency upgrade. Once I have all the individual classes coded, I could transition them to class members. It's a lot easier to copy/paste classes and, comment 12 of them out of the tile initializer right now as opposed to commenting out twelve class members. I'll add this to the "todo" list.
Online LiquidNitrogen
« Reply #11 - Posted 2014-09-01 00:41:20 »

you could do it roughly like this:

1  
2  
3  
4  
public class Tile{
    public int type;
    public int variant;
}


use type to record what sort of tile it is: GRASS, WATER, LAVA, etc.
and variant to record what variant it is: NORTH, WEST, etc.

then your game logic can just check these values as it needs them, and your rendering can use them to decide which tile graphics to use.

There's plenty of different ways to do this of course, but using a separate class for each one is probably really over complicating things for yourself.
Offline BurntPizza
« Reply #12 - Posted 2014-09-01 00:47:30 »

Precisely. I've been posting this often as of late, but here's some ideas on how to automate tile map joining in the manner than you describe: http://www.angryfishstudios.com/2011/04/adventures-in-bitmasking/
Offline Warden
« Reply #13 - Posted 2014-09-01 00:58:02 »

you could do it roughly like this:

1  
2  
3  
4  
public class Tile{
    public int type;
    public int variant;
}


use type to record what sort of tile it is: GRASS, WATER, LAVA, etc.
and variant to record what variant it is: NORTH, WEST, etc.

then your game logic can just check these values as it needs them, and your rendering can use them to decide which tile graphics to use.

I was thinking of something along the same lines as a Component Model, Like what BurntPizza suggested.

There's plenty of different ways to do this of course, but using a separate class for each one is probably really over complicating things for yourself.

As I'm currently coding the classes independently and, debugging them. The complication isn't much of a bother. Other than redundantly adding three lines per tile class. But, I will definitely implement this once I know the classes are bug typo free.

Precisely. I've been posting this often as of late, but here's some ideas on how to automate tile map joining in the manner than you describe: http://www.angryfishstudios.com/2011/04/adventures-in-bitmasking/

I actually looked at that link, Which you posted in a previous post. But, I think it's a little over complicated for this project. Though I can see how it would eliminate the need for tile variations. Seeing as you could simply apply a mask over the map at the specified coordinates and, essentially achieve the same outcome with less graphic work. In many cases where project authors don't produce their own tiles, I can see how this would be a great concept. Correct me if I'm mistaken.
Offline Warden
« Reply #14 - Posted 2014-09-05 22:09:16 »

So, I've been slowly stepping through all my tiles and, I can finally see the end in sight. I only have the south corners left to make. But I decided to refresh the map file to reflect some progress. I work a lot and, have a daughter. So any progress is a landmark in my books. I'm sure any parents here can atest to that. Anyways, Enough excuses, This is what I have so far;



I also realized, That I may need to make inverted tiles. For instances like the one above, Where the grass is bordered by water. Also, I'm aware of bit masking, But opt'd to do things this way for a simpler integration with a multiplayer server.

Which gives me a couple options;
- On Demand tile system, Where the game retrieves tiles from a web server. This cuts down on the overall installation size.
- Increased tile modding by players (Wink, Wink)
- Simpler client communications with multiplayer server, Map packets end up being shorter when you don't have to declare bit masking. Probably not that significant of a difference though.

Anyways, Now that the weekend is here, I'm going to try to polish off the list of grass tiles I have left.
Offline Gibbo3771
« Reply #15 - Posted 2014-09-05 23:18:09 »

Which gives me a couple options;
- On Demand tile system, Where the game retrieves tiles from a web server. This cuts down on the overall installation size.

Don't do this, you will make people very angry when suddenly their internet gets throttled. Best way to have, and this is no argument, client handles the graphics side and is dumb; server handles logic.

This means client should always have the assets, the server should be telling the client what to do with them.

In cases where the player could edit the assets in order to gain an advantage (like MC X-Ray RP's) then you will have to implement some way for the server to check file to see if it matches with the instance of a client on the server side.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Warden
« Reply #16 - Posted 2014-09-05 23:27:25 »

Don't do this, you will make people very angry when suddenly their internet gets throttled. Best way to have, and this is no argument, client handles the graphics side and is dumb; server handles logic.

This means client should always have the assets, the server should be telling the client what to do with them.

Sorry, I meant to clarify that. I recognize the matter regarding network instability and, Also don't want a "online only" game. So, The game would download the Tiles whilst the Launcher is onscreen. Unless, The player configures the game not to.

In cases where the player could edit the assets in order to gain an advantage (like MC X-Ray RP's) then you will have to implement some way for the server to check file to see if it matches with the instance of a client on the server side.

Editing the assets in this project, Won't give an advantage to the player. Think of Zelda for instance, Making the grass on the map transparent doesn't really offer any benefit. I think where you're concerned about "X-Ray like" hacks only applies to 3D games.
Offline Gibbo3771
« Reply #17 - Posted 2014-09-05 23:29:03 »

I think where you're concerned about "X-Ray like" hacks only applies to 3D games.

Could always have buried treasure under those tiles! :p

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline VIrtueeL
« Reply #18 - Posted 2014-09-06 04:13:28 »

yup rpg games takes lots off time and coding if its gona be good

i do devlogs and i do tutorials check em out
https://www.youtube.com/user/InidDevo
Offline Warden
« Reply #19 - Posted 2014-09-07 06:15:48 »

Yep, I took yet another break from completing my Grass Tiles. This time I've added a Mouse class to handle mouse clicks an such. There was a minor hiccup as some JGO members may have witnessed. But, The matter has been resolved and, A updated zip of the project can be found in the original post. There's not much you can do right now, Other than just walk around. From here, I plan on finishing the Grass Tiles and, Further developing the entity classes.
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (26 views)
2014-09-07 01:10:19

mitcheeb (34 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!