Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Legend of the Secret - Text/GUI based RPG - My first game project  (Read 6247 times)
0 Members and 1 Guest are viewing this topic.
Offline LiquidNitrogen
« Reply #30 - Posted 2014-03-09 10:56:31 »

cool thanks, i didnt have the -jar option. runs now but still get no print out.

Offline Davideis
« Reply #31 - Posted 2014-03-09 12:03:31 »

Well, I can't figure it out right now, I was able to see the errors but I am having trouble fixing it. I need to go to bed. I will look at it tomorrow. Thank you guys for helping me Smiley.
Offline Davideis
« Reply #32 - Posted 2014-03-10 02:05:03 »

I really hate Java sometimes, I forgot to have 2 of my new classes implement serializable and the errors were caught but i didn't have them say anything so i didn't know. Of course I am using BufferedImage and found out that its not serializable  so I have to figure out how to get my color data, i am thinking an array but if anyone has any ideas let me know.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jacob Pickens

JGO Ninja


Medals: 32
Projects: 5
Exp: 10-12 months


Do things you don't know how.


« Reply #33 - Posted 2014-03-10 02:08:11 »

Im pretty sure arrays are how its done (I don't get color data myself though). When I was watching some beginner tutorials I saw something along the lines of this:

1  
int[] colors = new int[];


or something like that.

Live development of whatever I feel like making! http://www.twitch.tv/jacob_pickens
Offline Davideis
« Reply #34 - Posted 2014-03-10 02:11:51 »

I might just do that, I have an image that i was getting rgb data at a point x,y. i think ill just have it run a loop and read the color data from the entire image to an array and go from there.
Offline Jacob Pickens

JGO Ninja


Medals: 32
Projects: 5
Exp: 10-12 months


Do things you don't know how.


« Reply #35 - Posted 2014-03-10 02:26:08 »

Remember when doing loops with x and y always do y first. It looks like this:

1  
2  
3  
4  
5  
6  
7  
8  
...
for(int y = 0; y < pixels.length; y++) { //Assuming your pixels array is names pixels
     //Do Color setting things for y here
     for(int x = 0; x < pixels.length; x++) {
          //Do color setting things for x here
     }
}
...


Thus for every Y pixel, you set the color data or what ever for a whole row of x pixels. I may actually have this confused with spritesheets and rendering and color data all mashed up into one though, so don't hold by that code too much.

Live development of whatever I feel like making! http://www.twitch.tv/jacob_pickens
Offline Davideis
« Reply #36 - Posted 2014-03-10 03:28:26 »

This works, now it just need to rewrite the rest of the code. 

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
private int[][] green = new int[800][600]; 
   
    public MapUtil()
    {
        File mapLoc = new File("src\\Menus\\map.png");
        try
        {
            BufferedImage image = ImageIO.read(mapLoc);
           
            for(int x = 0; x < 800; x++)
            {
                for(int y = 0; y < 600; y++)
                {
                               
                    Color c = new Color(image.getRGB(x, y));
                    green[x][y] = c.getGreen();
                }
            }  
           
        }
        catch(IOException ex)
        {
           
        }
        catch(ArrayIndexOutOfBoundsException aioobe)
        {
           
        }
Offline opiop65

JGO Kernel


Medals: 161
Projects: 7
Exp: 4 years


JumpButton Studios


« Reply #37 - Posted 2014-03-10 03:32:56 »

Just a heads up, your loops won't cycle through the whole image as you are only instructing the loops to loop through until it is one pixel away from the size of the image. Right now you are saying loop until x or y is less than 800 or 600, when in reality it should be less than or equal to 800 or 600. I think... unless I'm thinking about this wrong!

Offline Davideis
« Reply #38 - Posted 2014-03-10 03:36:17 »

I think you are right.
Offline LiquidNitrogen
« Reply #39 - Posted 2014-03-10 03:37:26 »

the pixels should have indexes 0 to 799 horizontally, total:800.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline opiop65

JGO Kernel


Medals: 161
Projects: 7
Exp: 4 years


JumpButton Studios


« Reply #40 - Posted 2014-03-10 03:48:12 »

Yeah, I was just thinking that. I'm too tired to deal with 0 based... stuff right now, sorry OP Sad

Offline Davideis
« Reply #41 - Posted 2014-03-10 03:56:26 »

It's all good I don't like it either... Anyways, the game is now playable... here is the link Download.
Offline LiquidNitrogen
« Reply #42 - Posted 2014-03-10 04:15:09 »

i found no monsters after walking all around the place. if i quit without saving, then load the character again, the movement buttons dont work. it also says i cant afford items when i should be able to afford them. and i can rest with full health.

moving around is a bit funny, you have to keep checking the map to see which direction you need to go next. the only thing i can think to help with that would be a little view of the area around you somewhere on the main screen.

Offline Davideis
« Reply #43 - Posted 2014-03-10 06:18:50 »

Well I better get back to work.  Smiley
Offline Davideis
« Reply #44 - Posted 2014-03-12 08:48:03 »

I think I fixed the problems. Download

1. Added the map to the main screen.
2. Fixed the enemy spawns.
3. I forgot to update the shop current money display after purchase, that is fixed now.
4. I do know that the player location jumps far when leaving town, I will look at that later.

Offline LiquidNitrogen
« Reply #45 - Posted 2014-03-12 09:05:44 »

still no monsters attack me, and the window is too big for my 1366x768 screen now.

Offline Genius Coder

Junior Devvie


Medals: 1
Exp: 4 years



« Reply #46 - Posted 2014-03-12 16:43:42 »

Its a neat little game Cheesy I'd love to see some combat implemented, if this is already in the game please correct me. Thye current gameplay and interfaces are nice and tidy. One thing I did realise is there is a button at the bottom of the screen that is too small so it just says "R..." Nice little game though

I love making games...
Offline Davideis
« Reply #47 - Posted 2014-03-12 22:00:09 »

I don't know what's going on with the battle system, its working for me in netbeans, i'll have to run it outside of it. I have an idea for a smaller map, it will take a while for me to implement it.
Offline Davideis
« Reply #48 - Posted 2014-03-13 09:10:03 »

I have decided since I have been having some issues and alot of my code is kinda crazy, I am going to rewrite about 90% of my game. It should work alot better and be alot easier to make minor changes and add features. I just finished the early stages of my leveling system and its crazy awesome, I cut the leveling up code from about 300 lines of code to about 20 plus now instead of hard-coding all of the level increases I can have either 10 levels or 1000 levels and only have to change one line of code. I did some research on RPG game forumlas and now I have some formulas that scale with the level increase and if its unbalanced I also just have to change a couple lines of code. Hopefully in the next week or two I can get everything finished and then start working on storyline and quests. Again, thanks to everybody who has given me input and tried out my game, I don't even know how bad it would have been if it wasn't for the input.
Offline Davideis
« Reply #49 - Posted 2014-03-25 01:24:57 »

Does anyone have a good suggestion for a map interface that shows where the location of your player is and will let you set some areas off limits?
Offline Davideis
« Reply #50 - Posted 2014-04-02 22:22:51 »

New Test Version

I have been hard at work and I have a new test version ready. You can move around on the map and go into the store and inventory but most of the using and purchasing of weapons and items are disabled at the moment. I have to re-code the functionality of most of the features so it will take some more time. Also the battle system while you can go into it also needs more work, I need to figure out the damage formulas and code it. Let me know what you think about the movement speed on the map and if the interface is a good size. I will update as I add more features.
Offline LiquidNitrogen
« Reply #51 - Posted 2014-04-02 22:42:17 »

Nice layout. The keyboard movement feels uninspiring though. Perhaps holding down the mouse button on the map to move toward the mouse pointer would work better? Have you thought about adding more actions to the battle window? Theres not much you can do in a battle besides attack or run away, it could be quite interesting if there were more options to use to affect the outcome of each battle.

Offline Davideis
« Reply #52 - Posted 2014-04-02 23:48:01 »

I will look at adding mouse controls. I don't know what else I could add to the battle besides maybe spells. Also I am planning on adding armor later like you suggested in an earlier post.
Offline LiquidNitrogen
« Reply #53 - Posted 2014-04-03 00:00:55 »

well things like dodge: if you fail you get hurt badly, but if you succeed the enemy is off balance for 2 turns. this would give you a last ditch chance if youre almost dead. special moves, etc. so that you feel like youre making decisions in a combat situation, rather than clicking on a button that says attack. probably dont worry about it for now, but its an idea you could play around with .

Offline Davideis
« Reply #54 - Posted 2014-04-03 01:01:45 »

Those are good ideas. Thanks. Grin
Offline BrendynT

Junior Devvie


Medals: 3
Projects: 1
Exp: 7-9 months


CRTL + SHIFT + F = OP!


« Reply #55 - Posted 2014-04-03 03:45:45 »

I think "Navagation" should be "Navigation" with an I instead of another A. Unless it's different for certain places, not sure.

- The Firm Night Owl
Offline Davideis
« Reply #56 - Posted 2014-04-03 06:05:44 »

I think "Navagation" should be "Navigation" with an I instead of another A. Unless it's different for certain places, not sure.

I was trying to figure out what you were talking about and then I saw the screenshot above. You are right it should be Navigation, but I don't have that part in the program anymore.
Offline Hermasetas

Senior Devvie


Medals: 6
Projects: 2
Exp: 3 years


I do gamez, yes!


« Reply #57 - Posted 2014-04-04 03:52:09 »

It's really coming along nicely Cheesy

It is kinda boring without the combat though Wink

And is it meant to launch you 10 steps away when you walk north from the starting city?

Btw how are you rendering the map at the moment? A static image and then an X drawn on to it?
Offline Davideis
« Reply #58 - Posted 2014-04-07 22:50:20 »

I think you might be playing an old version. In the latest version there is combat but you have to click the battle button. I haven't finished coding the battle encounters. Also the map is a little different and there is no longer an x, its now a little person. As far as rendering the map, its nothing fancy, just a label with the map as an icon with another label with the character image as an icon on top.
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 08:26:44

Mr.CodeIt (20 views)
2014-12-14 18:50:38

BurntPizza (42 views)
2014-12-09 21:41:13

BurntPizza (76 views)
2014-12-08 03:46:31

JscottyBieshaar (37 views)
2014-12-05 11:39:02

SHC (50 views)
2014-12-03 15:27:13

CopyableCougar4 (47 views)
2014-11-29 20:32:03

toopeicgaming1999 (114 views)
2014-11-26 14:22:04

toopeicgaming1999 (102 views)
2014-11-26 14:20:36

toopeicgaming1999 (30 views)
2014-11-26 14:20:08
Resources for WIP games
by kpars
2014-12-18 09:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 21:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 21:36:02

List of Learning Resources
by Longor1996
2014-08-16 09:40:00

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

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

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

List of Learning Resources
by SilverTiger
2014-07-31 15:29:50
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!