Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (751)
Games in Android Showcase (227)
games submitted by our members
Games in WIP (838)
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] 2
1  Game Development / Shared Code / Re: LibGDX Yarn Interactive Dialogues! on: 2018-02-12 23:35:27
Project looks great!

I have a question though. If making a RPG game with this with a lot of tree's, does the code and variable tracking become overwhelming long?  Looking forward to seeing more of it and possible a clean solution to implementing a system with a big story.

So basically right now the dialogue loads all your nodes and parses them - you then call a start("nameofnode") method and you can specify what node to start from("Start" by default). You then step through the dialogue by consuming results with the dialogue.getNext() method kind of like an iterator. These results are things like your Lines/custom commands/options(these link to other nodes which can be in the same file) ect.

I could go into more depth which i think ill save for the wiki(unless requested here) , but basically once you implement the dialogue into your game and are able to read the results - it becomes really easy and scale-able.

The Variable continuity that comes with the lib comes with built in functions so that you can serialize it into a json string: this makes it easy to save it. Also you may use the same variable continuity for different dialogues so you could make the continuity a global variable that you access from anywhere in your game that your dialogues interact with.

To clarify: all the variable continuity is( , is a <String,Value> object set(objectmap).

TLDR: Keeping track of your variables should not be an issue - i think the hardest part will be implementing it to fit your needs and then its just a matter of loading your dialogues and using the results. Saving the variables is really easy with the toJson(), and fromJson() methods; and you can use the same variable storage for multiple dialogues.

Hope that cleared some stuff up.
Feel free to ask any more questions i am happy to help Smiley
2  Game Development / Shared Code / Re: LibGDX Yarn Interactive Dialogues! on: 2018-02-11 20:57:08
Yes i am working on a game that has a narrative and i wanted to make sure i had the tools for better workflow. I could have just written everything in code but then it would become very hard to change or scale it in the future.

YarnGdx can be used for much more than dialogues though since it does provide an extensible scripting platform. You can create "Functions" in java and add them to the Dialogue library and in your scripts you can call on those functions. The possibilities are endless.

Ill be adding more documentation to the wiki as soon as i am able. Smiley
3  Game Development / Shared Code / Re: LibGDX Yarn Interactive Dialogues! on: 2018-02-11 18:29:55
I suppose I could have clicked your demo link, I feel dumb. lol

haha no man, dont feel dumb. I only added the demo link after I replied to you; to avoid further confusion Smiley
4  Game Development / Shared Code / Re: LibGDX Yarn Interactive Dialogues! on: 2018-02-10 22:36:23
I think all it would entail is switching all the libgdx classes like Array - ObjectMap ect. to Your own implementation or java's implementation like ArrayList and HashMap(althought i dont think these are as good for gamedev as the optimized libgdx versions). Ill put this in my todo list - to decouple libgdx and create my own set of similar collections classes.


This is interesting. I am currently trying to do dialogs as well, GLFW doesn't support dialogs (or any model / child windows for that matter) yet. I am not using libGDX, do you think this would be a non trivial thing to integrate directly with LWJGL?

I just re-read your post. Im afraid this is not a graphic "dialog" library but instead a library for creating interactive dialogues(the conversation type) . Sorry if there was any confusion.
5  Game Development / Shared Code / LibGDX Yarn Interactive Dialogues! on: 2018-02-09 19:29:59
Just to clarify: This is a lib for creating interactive dialogues(conversations);


Recently while working on a project I was searching for a way to create dialogues using a third party tool and then import them into my game. I came across a  really cool language/tool called Yarn. This is the same tool used for games like Night in the Woods and Knights and Bikes.

It checked out everything I was looking for, and then some:
  • Easy Syntax
  • Branching Node based Dialogue
  • Conditional Statements(e.g <<if visited() >> do this line<<else>>do this<<endif>>)
  • Variable Continuity
  • Very Extensible

I created a port of an existing Yarn library for use with libgdx projects.

Here is a link to the YarnGDX github

Here is a link to Short Demo.

Its still not perfect , but currently gets the job done. I am trying to add documentation whenever i get the change but there is basic stuff in the getting started and also a simple example Test Class.

Hope someone finds it useful Smiley
6  Games Center / WIP games, tools & toy projects / Re: Mercenary Of Destiny - 2D Java MMORPG on: 2016-05-14 22:36:13
looks good Smiley
7  Games Center / WIP games, tools & toy projects / SEGDX - space exploration game. on: 2016-01-25 20:56:51

Hello guys. I recently decided to get back into making games and this is my first game so far Smiley.

It is a space exploration game with resource management aspect such as food/fuel/currency and so on.

It was made using libgdx for the 2016 libgdxjam.

You can check out the game page on here:

currently the only goal is to explore , avoid being drafted and gain achievements.

i did plan to go deeper with it like having secret areas and more modules,ships,achievements,enemies and event types but unfortunately i ran out of time Tongue

Hope you guys like it. All feedback is appreciated Smiley
8  Discussions / General Discussions / Re: Can you just sit down and make a game? on: 2013-11-28 19:36:39
nope, cus when i do ... nothing but spaghetti code comes out. if the project is big enough i have to plan it out and then code it, then take a break, see how i can make it better, then go back and refactor most of the code hahaha   . This especially when working with new things ive never touched before.
9  Game Development / Newbie & Debugging Questions / Re: How does java use the GPU? on: 2013-11-26 21:43:29
How would I implement java2d into a buffered image renderer?

what do you mean ?
are we talking about rendering buffered images? because if so its just as simple as using a Graphics2D object to g.drawImage(yourbufferedImage,0,0,null);

but if you ofcourse are talking about the infamous pixel rendering method of getting individual pixel data and modifying it i would highly advise against it. It is really slow and you will get stuck using low resolutions.
10  Game Development / Newbie & Debugging Questions / Re: How does java use the GPU? on: 2013-11-26 18:23:05
maybe have a look at the java2d faq ,
11  Game Development / Newbie & Debugging Questions / Re: cant find fizzy on: 2013-11-26 06:41:25
Are we supposed to know what fizzy is? Tongue
Please elaborate...

sorry yes , its a jbox2d wrapper by kevin glass. all the links are on his site but they keep giving me a 404
12  Discussions / General Discussions / Re: rouge (roguelike/zorklike) on: 2013-11-26 06:04:15
just a suggestion , maybe you shouldnt name your init method Main(); instead maybe try init(); start(); or init everything in the constructor
13  Game Development / Newbie & Debugging Questions / cant find fizzy on: 2013-11-26 05:45:40
did fizzy get moved to a different place, i downloaded it like 2 years go but i no longer have the jar, when i went to download it again it gave me a 404
14  Game Development / Game Mechanics / Re: [SOLVED] Issue with smooth game loop on: 2013-11-26 03:53:41
i ran your fixed jar and it looks like you did away with the syncing all together.

this is the sync method i use and it works out really good  Smiley you can fit it into your code by simply calling sync(60); each loop cycle
   public void sync(int sync) {
         if (sync!=-1) {
            long diff = 1000000000L / sync + lastFrame;
            long now = System.nanoTime();
            try {
               while (diff > now) {
                  Thread.sleep((diff-now) / 2000000L);
                  now = System.nanoTime();
            } catch (Exception e) {}

            lastFrame = now;

edit: also lastFrame is a long outside of the method initialized when you start your loop as lastFrame = System.nanoTime();
15  Java Game APIs & Engines / Java 2D / Re: Resource Loader / Loading Screen on: 2013-11-24 04:18:23
Better yet, you could use a hashmap, they're quite handy for resource loading and retrieval!

yeah this^^

i actually do this to index all my resources in a hash map but i have a different class apart from the resource loader to do that for simplicity hehe
16  Java Game APIs & Engines / Java 2D / Re: Resource Loader / Loading Screen on: 2013-11-23 23:47:52
since i abstract all my game resources such as images and sound files i made a GameResource interface that has a load(); method and a isLoaded();

then loading resources is as easy as calling load(); and in the load method just load the resource the way you normally would and then set loaded to true;

you can just as easily make an arraylist of <GameResource> and add all your resources , then amount_loaded/total_resources(make percentage) and use that to display your loading bar.
17  Game Development / Game Mechanics / Re: Best rendering method using pure java? on: 2013-11-19 01:32:49
i would suggest to just use the draw calls given by java. i too recently asked the same question and came to figure out that pixel manipulation of an image is much slower than just drawing said image. and you dont get all the built in controls (e.g transforms) . Also you cant have good resolutions with per pixel rendering since the better the res the slower it will run.

So like suggested before g.drawImage seems to do the trick quite nicely.
18  Game Development / Networking & Multiplayer / Re: Server game loop and syncronization questions on: 2013-11-18 08:00:43
Lol you should make it so that they are shooting something more appropriate ..... like unfertilized eggs and instead of having them blow up they turn into a fetus and fly away lol
19  Game Development / Newbie & Debugging Questions / Re: Problems loading TileMap into JFrame on: 2013-11-17 21:09:55
ummm... i might be looking at this wrong but you seem to be loading your map onto jlables which have nothing to do with your bufferstrategy's graphics. also you are drawing a rectangle the size of the game in front of your image.

[Edit:] further inspection of your code revealed that you are going all wrong about double buffering and active rendering. If it is your goal to make a game, i would suggest that you do not render your maps on to Jlabels and render them with your bufferstrategy's graphics object using the g.drawImage(); method(create an art gallery so you dont load all your images over and over each render).
Also like i pointed out before you are clearing your screen with
g.setColor(new Color(72, 152, 72));;
      g.fillRect(0, 0, getWidth(), getHeight())

so anything that was rendered before that is not shown.
20  Games Center / WIP games, tools & toy projects / Re: Explosions [v0.8.2] on: 2013-11-17 19:56:13
yeah those settings sound good Smiley
and neat i didnt even check my high score hehe.

finally got the konami code to work . i wasnt pressing enter lol pretty neat little surprise
21  Game Development / Networking & Multiplayer / Re: Best practices for a multiplayer top-down shooter? on: 2013-11-17 19:48:31
20 times is too fast in my opinion, I would send packets ever .3 seconds. There's no need to clog up the pipeline with information you can just interpolate client side!

i am aslo working on a similar project. ive read mixed things... such as you must send UDP updates as fast as possible, only when required blah blah the list goes on.
but how does one interpolate data client side to prevent the same client from cheating?
22  Games Center / WIP games, tools & toy projects / Re: Explosions [v0.8.2] on: 2013-11-17 09:34:09
really nice Smiley played through the whole thing. so here is the criticism

1)it got less challenging as it progressed and more balls were added since there was so many that the chain would spread so fast and far that i would win the level missing only two balls.
2)it got really repetitive , maybe add more variety in gameplay. like maybe make the color shading mean something(slow or fast expanding) or add more variables that affect the way the chains are formed.
3) konami code didnt do anything :/

but all in all it is a really nice looking  and addicting game.
23  Games Center / WIP games, tools & toy projects / Re: Renoria - Java MMORPG on: 2013-11-15 09:22:51
I think the art looks great. its not hard to tell that this game is inspired by maple story. Although i would change some of the more obvious ones like the identical green blobs just to avoid copyright issues.
24  Game Development / Newbie & Debugging Questions / Re: Best way to render with java2D on: 2013-11-14 19:58:22
Easy hack for doing fullscreen and controlling resolutions. Render everything to a Volatile image at the internal resolution you want. (small drop in performance) then render the VA to the jframe/canvas at the right aspect ratio of the internal resolution and scale based on how large the jframe/canvas is. For full screen, set the frame to undecorated and its size to the size of the native resolution.

internal is 800x600 let the jframe/canvas be native resolution and just scale the internal VA as much as you can and still have it fit inside the jframe/canvas. Make sure to center it and you my have to take mouse inputs and convert them into the internal resolution but that is trivial.

Look at my Retro project to see what I mean.

Here are the 2 files that control much of the core rendering other then g.drawImage stuff

oh thats a nifty little way of doing it. im actually using the graphics device getfullscreenwindow method to invoke a true fullscreen , for the java2d version of the game anyway
25  Game Development / Newbie & Debugging Questions / Re: Best way to render with java2D on: 2013-11-14 06:08:26
What kind of a game are you trying to run?

Java can also improve its speed by making the canvas/frame where you are drawing a fixed size. If you can get away making your game on an 800x600 surface, then you can pull even more speed out of it.

The other way to get a good amount of speed is to control the amount of draw calls to the system. (This way, you don't have to clear the background buffer every frame, but only when an image changes). This increases the speed of Java2D a lot depending on the nature of the game.

Of course, it just depends on the game you are trying to make. The above methods work wonders, but if you really need some more speed, then you'll have to logically pull it out.

the game will be rendered in different resolutions with the possibility of full screen mode Other than that the screen will not be resizeable. Can you elaborate on how to control the amount of draw calls? and what this "nature" would consist of
26  Games Center / WIP games, tools & toy projects / Re: Level Editor Tool for 2D games on: 2013-11-13 23:32:54
As far as the GUI goes, I designed all of the components in Photoshop and I use the 'paintComponents()' method built into awt.* as a way to draw the buttons to the screen. I tried using the GUI's built into swing for the prototype version of this app, but I got overwhelmed with the nasty complications embedded with that library haha!

You can see how I did it by looking at the EditorGUI class code I wrote:

Feel free to download all the source code for this project from that link, maybe it can be of use Cheesy

ok man cool , hehe . again great work on the look and feel . it really does look professional .

Maybe change the cursor when the user is using a certain tool . like you do when they use the drag tool but for everything else too Smiley
27  Games Center / WIP games, tools & toy projects / Re: Level Editor Tool for 2D games on: 2013-11-13 23:17:11
wow man it is really neat. could use a bit more functionality but the interface is very slick and polished.

maybe add a select tool.

also would like to know how you got everything looking so nice ? Cheesy is it a custom ui ? gridbag?
is there a tut you can point me to? hehe i currently also made a map editor for a game i am working on but it is very ugly in respects to the iu and component placement
28  Games Center / WIP games, tools & toy projects / Re: Text Editor! on: 2013-11-13 07:12:57
cool , is this only for learning purposes? or do you plan to go somewhere with it? also i think that your problem with it not showing content at the start without being resized first can be solved if you make a call to MainFrame.revalidate(); after your init code is done.
29  Game Development / Newbie & Debugging Questions / Re: Best way to render with java2D on: 2013-11-13 03:10:50
Well, why stress it then? Your engine seems more than fine! If you have more than 1000 images visible on the screen at one time, you're doing something very wrong anyway. I would say just go with it, don't worry too much about the performance seeing as its only ever going to be used by one person!

yeah i understand , my goal was just to make my software run well on all devices (even if for some reason they cannot get lwjgl to work) with as little graphical discrepancies as possible hehe . Thanks for all the great responses everyone Smiley
30  Game Development / Networking & Multiplayer / Re: Server game loop and syncronization questions on: 2013-11-13 03:02:09
<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>

Success! Now I can proceed to implement a framework XD.

lol looks like your multiple cock textures need some good ol alpha blending
Pages: [1] 2
Solater (19 views)
2018-03-17 05:04:08

nelsongames (40 views)
2018-03-05 17:56:34

Gornova (44 views)
2018-03-02 22:15:33

buddyBro (175 views)
2018-02-28 16:59:18

buddyBro (64 views)
2018-02-28 16:45:17

xxMrPHDxx (469 views)
2017-12-31 17:17:51

xxMrPHDxx (142 views)
2017-12-31 17:15:51

xxMrPHDxx (223 views)
2017-12-28 18:11:33

Ecumene (498 views)
2017-09-30 02:57:34

theagentd (626 views)
2017-09-26 18:23:31
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

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