Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (511)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: LibGDX and Getting Pixels From Sprite on: 2014-04-16 14:23:30
Thanks Grunnt, but I wasnt saying I wanted to use Java2D with my current LibGDX setup, I was simply asking if there was a possible way to get it going. I would use a tint, but the tint does not give me the same look I was going for. Tint gives me some crazy dark colors, and I can only go so far with some things.

I'll take a look at it again, and If I run into more trouble, I'll post my code after work.
2  Game Development / Newbie & Debugging Questions / LibGDX and Getting Pixels From Sprite on: 2014-04-16 03:03:14
I want to implement the ability for people to change the way players characters look, and by that I mean that I want to give the players the ability to change the colors of their given hero. Which is an png. The only problem is that I need the image as a sprite to make use of LibGDX's flip and scale functions to the nearest pixel, so I retain that awesome pixel-y look. No methods, not even Pixmap, are giving me what I need. I thought about taking a BufferedImage, saving the data, writing the data as a new player png (Which I may have to do so I dont keep loading in the same stupid thing and messing up) and then just assigning that to the player. But what if the player makes 10's or hundreds of characters? I would have 10's of hundreds of .pngs of different heroes my player would probably not use. I also noticed that when Notch made Minicraft for LD22 a long time ago, he performed exactly what I would like to do!

My question is, with LibGDX's given library, is there a way I could copy Notch's Minicraft attempt at saving the images as grayscale, and just applying colors at runtime?
3  Game Development / Game Play & Game Design / Re: Text based strategy game examples? on: 2014-04-12 02:27:58
I only googled Pocket Kingdoms and saw an picture and immediately thought of a game I have played before.

http://www.reddit.com/r/incremental_games/comments/1tvnh1/civclicker_the_road_to_v10/

It is called CivClicker, and these style of games are called Incremental Games. Where you just keep clicking to see where you end up. I even linked to the reddit post in the subreddit with even more incremental games.
4  Game Development / Newbie & Debugging Questions / Re: Reading/Writing JSON Constantly on: 2014-04-11 12:19:43
Sorry guys, I was meaning to say if my code is clunky. Because it feels clunky and I, personally feel like im doing it wrong and want to learn the right way to do it.

Im just trying to save my needed player data into a JSON.  Grin

Last night I also agreed to not save data constantly. Im just going to do a "Save and Exit" kind of deal, just writing once, but shouldnt I really use JSON? Will thrre be performance issues later on using this over XML or CSV or something?
5  Game Development / Newbie & Debugging Questions / Reading/Writing JSON Constantly on: 2014-04-11 03:42:24
Hello Guys, im back from a long needed break from programming and I'm back with another question.

I've never had to approach json in java before and I had to get an external library to get everything working properly. So bear with me for a moment.

I'm trying to make the json file of the player basically a "database" for the player. Something I can reference from other classes using methods I have built. Etc. This is the code that I have currently WORKING, but something does not feel right. I feel like there is a terrible problem with the implementation of the code. Can someone tell me how they would do theirs? Maybe some advice? Thanks.

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  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
package com.rojarstudios.prisma.saveSystem;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;

public class SaveSystem {
   
   JSONObject obj = new JSONObject();
   ReadData read = new ReadData();
   
   File playerData = new File("assets/data/player.json");
   
   private boolean levelUp = false;

   public SaveSystem() {

   }
   
   public void Ding(){
      levelUp = true;
   }
   
   public void DataManager(String file) throws IOException{
      // Call all the needed methods that make changes to the json file.
      PlayerDefaultFile();
      changeLevel();
      changePlayerHP();
      // Then use the collected obj refrences to write to the file.
      writePlayerData(file);
      if (Gdx.input.isKeyPressed(Keys.SPACE)) {
         Ding();
      }
   }
   
   @SuppressWarnings("unchecked")
   public void changeLevel() {
      if (levelUp) {
         obj.put("level", (read.readData("assets/data/player.json", "level") + 1));
         levelUp = false;
      }
   }
   
   @SuppressWarnings("unchecked")
   public void changePlayerHP() {
      if ((read.readData("assets/data/player.json", "player_hp")) > 0) {
         obj.put("player_hp", read.readData("assets/data/player.json", "player_hp") - 30);
      }
   }

   public void writePlayerData(String fileName) throws IOException{
      try {
         // Make sure the file gets written to the right dir.
         FileWriter file = new FileWriter(fileName);
         if(playerData.exists()) {
            file.write(obj.toJSONString());
            file.flush();
            file.close();
         }
      } catch (IOException e) {
         e.printStackTrace();
      }
   }
   
   @SuppressWarnings("unchecked")
   public void PlayerDefaultFile() throws IOException{
      if (!playerData.exists()) {

         obj.put("name", "ROJAR");
         obj.put("level", 1);
         obj.put("player_hp", 100);
         obj.put("player_mana", 100);
         obj.put("player_stamina", 100);
         obj.put("player_x", 50);
         obj.put("player_y", 50);
       
         // We can store the current items of the player in a list.
         // Use the item ID's.
         JSONArray inventory = new JSONArray();
         inventory.add("001");
         inventory.add("069");
         inventory.add("333");
       
         obj.put("items", inventory);
      } else {
         // Do nothing. Player.json already created.
      }
   }

}


Oh, and basically all readData(); does is readData(file, property); just grabs the json property I want from the file I specified.
6  Discussions / Business and Project Management Discussions / Re: Looking for people to learn and create with! on: 2013-12-19 00:17:05
I know. I don't want to work alone, but I rather not work alone and actually talk to someone about Java. I'm hoping not to make this group really huge. Like, 3 or 4 people.
7  Discussions / Business and Project Management Discussions / Re: Looking for people to learn and create with! on: 2013-12-18 21:32:59
@CTucker1327: PM me if you're still interested later on today or tomorrow. (:
8  Games Center / WIP games, tools & toy projects / Re: Non-Named Multiplayer RPG Platformer Project. on: 2013-12-18 00:04:58
Looks nice man! Just played around with it for a bit. There are things that you can need to work on, but this is getting somewhere. I like the quick progress on this.

Keep going man.
9  Games Center / WIP games, tools & toy projects / Re: Amicitia - A Tale of a Knight and his Dog. on: 2013-12-17 02:27:19
Updated the thread with a video of my enemies and stuff working.
10  Discussions / Business and Project Management Discussions / Re: Looking for people to learn and create with! on: 2013-12-16 23:35:34
Thanks Ags,

I understand. Just I get so lonely sometimes yelling at myself why my damn code wont function the way I want it too! haha.

Thanks for the insight though.
11  Discussions / Business and Project Management Discussions / Looking for people to learn and create with! on: 2013-12-15 22:13:14
Hello Everyone, Atheistzilla here,

I've been coding in Java for more than a year now and I'm looking for people who have about the same skill-set as me or better that we can get together, create games, design them or whatever! Cheesy

Currently working on my game Amicitia if you are interested in that as well; can view the progress in my profile if you'd like.

For future note, I prefer medieval styled games, zombies games, crafting games, and other hard-difficulty games. So if you're interested in something along these lines then let me know!

Trying to look for a team or people that I can converse with about creating games before I go off to college in half-a-year or so..

I'm not necessarily looking for mainly programmers; if you think you would be good at doing something else, let me know! We can probably work something out like music maker, pixel artist, etc. I'm very optimistic by the way. Just keep in mind that I am no means an expert. I know what there is to know about Java but certain Game Mechanics and concepts I still have to learn. (Hoping to learn from the team!)
12  Games Center / WIP games, tools & toy projects / Re: Amicitia - A Tale of a Knight and his Dog. on: 2013-12-13 21:07:46
Hmm... I was thinking about mechanics being the most customizable but the main goal always stays static.

I was thinking about doing something cool like, the different planes being like different styled blocks, etc. Different environments
13  Games Center / WIP games, tools & toy projects / Re: Amicitia - A Tale of a Knight and his Dog. on: 2013-12-13 20:16:19
I thought someone would say something about it. :/ I kinda dont want to kill the dog, but I wanted to try to keep an emotional bond between you and youe dog. Maybe put a scene in where you play with your dog; maybe even name him?
14  Games Center / WIP games, tools & toy projects / Re: Amicitia - A Tale of a Knight and his Dog. on: 2013-12-13 19:47:54
Thanks, man! It helps. (: Yeah, im hoping for the entire level to be flat-ish. Never thought of obstacles though. Sounds interesting!

Im planning for it to be really long with maybe some sort of boss or so entering a plane or a mini boss or many hordes. (:
15  Games Center / WIP games, tools & toy projects / Re: Amicitia - A Tale of a Knight and his Dog. on: 2013-12-13 15:18:59
Thanks man!

Yeah, something that I actually want to finish. I just think that I just have to make sure that the AI works properly, get some different monster types, finish up the HUD and UI, add some parallax, then I should be done!

Hoping to get a nice Demo up soon after I finish with the monsters and getting them and their animations working. Hopefully by the end of next week!
16  Games Center / WIP games, tools & toy projects / Amicitia - A Tale of a Knight and his Dog. on: 2013-12-13 00:10:29
Hey guys, Atheistzilla here,



New poster on this forum but have been doing Java for somewhat of a year now. I'm working on this game about a knight, who really loves his dog, and then Satan (being the douche he is) comes out of hell to kill your dog.

I know, the story sounds bland right now, but I'm slowly shaping it to what it needs to be. This is the first update of many that I will be continuing to update on this forum and wish for all the support that I can get!

Right now, all I have down is the character movement, and map movement, very simple stuff, but I'm learning as I go along.

Some things that I'm hoping to implement are these things that are kinda like biomes but they're called "Planes of Existence", and you can imagine them as biomes with different monsters, minibosses, etc.

Game will probably be 'slightly' timed and I am hoping to implement a day and night cycle and you have to kill satan before the time runs out.

So let me know what you think. Also going to be adding a youtube video for you guys to see some shotty gameplay.

<a href="http://www.youtube.com/v/tiDZxMGDtB4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/tiDZxMGDtB4?version=3&amp;hl=en_US&amp;start=</a>

I rendered the video at 720p, and I JUST uploaded it. If it remains blurry, I will rerender this.

EDIT #2 -- ADDED ENEMIES:

Hey guys, I finally got my enemies working in my game, but keep in mind that I did this really really complicated than what I think is actually needed to be done to make enemies. I explain myself though. haha. Here is the enemies video.

<a href="http://www.youtube.com/v/c-CWOdfaIx4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/c-CWOdfaIx4?version=3&amp;hl=en_US&amp;start=</a>
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (50 views)
2014-10-17 03:59:02

Norakomi (39 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (36 views)
2014-10-15 16:18:58

TehJavaDev (66 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (56 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (44 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

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

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
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!