Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (683)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (751)
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: Open-Source Terraria Clone on: 2016-07-04 15:11:13
Looks cool! Very nice of you to open-source this. How did you implement the lighting system?

When I was developing the lighting system I actually made a post asking for suggestions and I ended up modifying the algorithm that is found here. It is called a "recursive flood-fill" algorithm and it is the most efficient lighting algorithm that I could find to work with the game.

There were a few modifications that I made to it though. The algorithm worked great, but the way that it works means that it had to be called every single frame. When thinking about how to make the algorithm more efficient, I came to the conclusion that the lighting would only need to be updated when a light source is either placed or removed. So rather than calling the algorithm each frame, I called it once when either a light source is placed or removed and I save the value to a light map. The algorithm has become more complicated since then (you can check the LightUtils class), but the amount of resources that it's saved is amazing.
2  Game Development / Shared Code / Re: Open-Source Terraria Clone on: 2016-07-04 15:04:02
I'd like to add to the change of conversation and say that the project looks great and well structured.

For contribution one can of course check the "issues" page for something to fix, but I think a list of features you'd like implemented would be nice too. Maybe this is the purpose of your "Being Worked On" section (which is pretty empty)?

Yes this is something that many people have asked for already so I will be filling in that section today!
3  Game Development / Shared Code / Re: Open-Source Terraria Clone on: 2016-07-03 18:30:17
just adding a "cool!" here because I don't get the thread that is forming up there ^ Smiley

open-sourcing this work is very nice for those learning game code, well done!

I appreciate the translation to a different conversation, was waiting for that  Wink

Thank you very much, I'm hoping that it'll help those that are in game development!
4  Game Development / Shared Code / Re: Open-Source Terraria Clone on: 2016-07-03 14:41:37
to give the community and provide projects that help others learn or take part in something.
Its ok, and fine to do what you like and share it -
I just gave a little advice: how make game little more interesting to players
(not, how monetize it and make billions from it ^^ )

But don't take it personal if your project not become popular
– its not because something wrong with you’re project - its simple wrong time:
We have Unity, Unreal, game makers, rpg makers, millions others open source projects..

Yes, there are those other engines that people can drag and drop components and physically code very little. But what fun is that? Are you even learning anything reusable when using those engines? If you develop a game in Unity, in what way are you going to be able to take that knowledge and apply it in another setting? You'll be able to take your background on game design, but you won't be able to apply many of those same principles in other game development environments because what you know can only be used in Unity.

If you take the time to learn how the actual engine works, you'll be at a greater advantage than those who only know how to drag and drop components. I, personally, would respect a developer more if they understood the under-works of a game rather than someone who relied on an engine to do 75% of the work for them.

I feel that there are definitely people out there who would rather learn the background of how a game works rather than using an engine.
5  Game Development / Shared Code / Re: Open-Source Terraria Clone on: 2016-07-03 13:21:05
Small advice ^^:
Sorry but it's not go anywhere..
You need more ppl in team (or you project will take couple years to finish or you bored with him)
Its almost impossible find ppl in free project nowadays.

So the only option - is make multiplayer – with simple editor,
so players become that's people who moves your project forward.
Maybe small multiplayer surviving matches: 10 - 30 min,
minecraft (terraria) engine have big Potential for multiplayer
(and very low for single player – ppl simple bored from it)

UP
P.s Android Main platform ? - No-no-no-no - you simple don't have money for marketing
and google market (same as Apple Store) is big Trash bin
where even gold don't see sunlight (without big sign "GOLD is HERE <-")

you simple don't have money for marketing
or be rdy give 90% income to google Ads for promo ^^

Uhh... I don't think you get the point of what I'm doing here. Believe it or not, not every developer is out there to make money off their work. Some actually do like to give the community and provide projects that help others learn or take part in something.

I'm not trying to "find people" to join "a team". There is no team here that I am building, I am simply releasing the source code publicly so that those that want to use it can use it as they want. If I were trying to create a team to finish the game and make money off of it, why would I be releasing the source code? Clueless It seems like your English isn't the best which is why you may have misunderstood the idea of what I'm doing.
6  Game Development / Shared Code / Open-Source Terraria Clone on: 2016-07-03 03:20:22
Hello everyone!

I am here officially releasing the code for a Terraria clone that I have put about 60 hours of development into. You can see my progress in the thread I kept updated. The game was developed using Java and the LibGDX framework which allows it to be run on multiple platforms including Desktop, Android, and iOS. It was specifically designed for Android which means that optimization of rendering and processing is implemented everywhere it can be. The game will run at a solid 60 FPS.

Why am I releasing the code?
I started working on the game about 10 months ago. It started out as a project to develop a basic physics engine and then extended into a Terraria clone. Over the next 6 months I was developing the game, implementing the basic features of any open world game. Over the past 4 months however, I have been very busy with school, work, and other projects that have taken over my time. Because of this, rather than let the code sit around until I get the time to come back to it, I figured I'd give to the community and allow anyone to use and modify the code.

The main reason that this project is open-source is to encourage community contributions and create a game centered around the development done by those in the gaming community. Contributions are heavily welcomed and I would love to see developers being able to place their own mark on the game.

Where can I find the code?
The Github repository of course! Because I want the community to work together on this game, Github is the best place for the code to sit and allow people to work together. I would love to see the additions as development progresses.

Are you giving up on the game?
No! I am simply allowing the community to contribute and I will be developing alongside them whenever I get the time!

Current Features
World Generation: Over 1,500,000 blocks in the world.
Lighting System: Efficient with almost no boundaries when placing light sources.
World Saving: The world is split into chunks and saved to the device. It can then be loaded again.
World Destruction: Break blocks using the different tools. The action joystick will place or break blocks within a certain radius dependent on the item you have in your hand.
Item System: Pick up and use items or blocks. Blocks will be placed on the ground and items, if they're tools, will destroy the environment
Entity System: Implement custom AI and entities with the entity system that is in place.

More information on the project can be found on the Github page.

Here is a video of the game in action!
<a href="http://www.youtube.com/v/-z4o8CwJR8E?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/-z4o8CwJR8E?version=3&amp;hl=en_US&amp;start=</a>

Open-Source Release Video!
<a href="http://www.youtube.com/v/LGLSLR8y95Y?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/LGLSLR8y95Y?version=3&amp;hl=en_US&amp;start=</a>
7  Games Center / WIP games, tools & toy projects / Re: Shard Master Classic - WIP on: 2015-12-21 18:20:01
Wow. Don't you think that as time goes on and the game become larger, a need for faster graphic processing/rendering will be needed?
8  Games Center / WIP games, tools & toy projects / Re: Shard Master Classic - WIP on: 2015-12-21 03:55:50
Wow I love it! Really reminds me of Runescape! Awesome work. How long have you been working on this project and are you using an engine under your engine (like LWJGL)?

LWJGL is not an engine.

Library*, sorry.

Thank you so much! I've been working on this for maybe two months now. No I am using purely my own engine and the standard JRE, no external libraries used, which also means that this is not hardware accelerated so all the graphics are processed on the CPU haha.

Wait, so are you not using OpenGL? Shocked
9  Games Center / WIP games, tools & toy projects / Re: Shard Master Classic - WIP on: 2015-12-21 00:00:52
Wow I love it! Really reminds me of Runescape! Awesome work. How long have you been working on this project and are you using an engine under your engine (like LWJGL)?
10  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-12-20 22:23:10
Just released a video showcasing the current features in the game and what I plan on working on next!

Video Link: https://www.youtube.com/watch?v=-z4o8CwJR8EMmB9b5njVbA

Let me know what you think!
11  Discussions / Business and Project Management Discussions / Re: Looking for a team to develop games with. (1 wip game) on: 2015-12-20 22:11:50
I personally don't want to join because I am busy with other projects, but I think you should really provide more information on your game. All you said is it's "this" and "I plan on adding some more awesome features"... well what features, do you have a plan for the game laid out? Who is managing this team? If you're managing it, how do you plan on splitting up the work? Etc, etc. I typically don't join teams unless the project manager has a well designed, laid-out plan. Just some suggestions.
12  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-12-17 15:07:15
Hey everyone, it's been a long time since I last posted an update to this game and that's because college kind of took over most of my time. Now that I am on winter break, I have began continuing development of the game. Over the past 24 hours I managed to implement procedural generation of caves, ores, and trees. The cave generation values need to be played with a tad, but as of right now, it works great. You can see a picture of the updates below. Let me know what you guys think!

13  Games Center / WIP games, tools & toy projects / Re: Questica -- A procedurally generated rpg adventure! on: 2015-10-06 21:32:32
The art is fricken beautiful. Great job!
14  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-10-05 22:14:57
So I added the inventory and item system to the game! I also added drops when breaking blocks. Here is an image of what it looks like currently. The next thing to do is to add the ability to place blocks based on what is selected in the inventory. Let me know what you guys think!

15  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-30 04:22:59
So today I made some updates to the UI system and how I believe it will work. I got rid of the ugly arrow buttons that move around the player and switched them with "joysticks" where dragging the left joystick horizontally will move you left and right and dragging upwards will make the player jump. I also added a joystick to the right side that is used to break blocks and in the future, attack monsters and other actions. It works by dragging the joystick in the desired direction that you intend on breaking the block. It will also highlight the block that you are attempting to break so you know what you're aiming at. You can see it in the picture below. The arrow on the right side switches between placing torches and destroying blocks by clicking the screen. This is completely for debugging purposes and will be removed. Let me know what you guys think!

16  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 23:49:29
My recursive method was actually quite efficient like you said (it acted just like yours, spreading out from a source), but as the number of light sources grew, the amount of method calls grew a lot as well. Method calls are much slower than iterating.

Recursion is great when the language has tail-recursion optimization. However, Java does not.

Regardless of our lighting methods, both recursion and raycasting work quickly. I also mainly chose raycasting after recursion because I disliked my diamond-shaped lights that recursion had, not because recursion was slow.

Yeah I do hate the diamond shape. I may possibly look into that line algorithm later and do some benchmark tests to see what lighting method's more effective. Now that I've got the system working efficiently though I'm going to stick with it.  Smiley
17  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 23:38:11
-snip-

Haha I guess that depends on your definition of huge. My world currently has 1,620,000 tiles in it which I would personally say is pretty huge. Why would work size depend on whether to use the raycasting method or not?

I think I must've made an error. World size doesn't matter, but it's how many tiles on-screen at once that matters for updating. My raycasting technique is more-so a Bresenham line algorithm except counting down a light value for brightness. It works a lot faster (and prettier) than the recursive way because it's not constantly calling functions. My bad! Tongue

Oh okay I can understand that more, but in my recursive fill algorithm the amount of tiles on the screen doesn't matter. This leads me to believe that your algorithm, potentially, iterates through all of the tiles on the screen. I would assume that you raycast around the source of the light but I'm not familiar with the Bresenham line algorithm so I'll have to look into it.  

I also don't think that you can say that because a method is recursive, it is therefore slower than a non-recursive method. The fact that it calls a method over and over doesn't slow down the algorithm unless you're comparing it to another algorithm where there are less statements being called on. This really comes down to comparing two algorithms runtime with, say, Big O notation.

For example, say we are trying to sort an array of 1000 elements and we have the option to use the iterative bubble sort method or the recursive merge sort method. You can calculate the Big O runtime for each and see that the merge sort performs extremely faster than bubble sort. You can also do benchmark tests to get the same results. The fact that a method is recursive doesn't slow down the speed and in some cases can make an algorithm more readable.
18  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 22:40:14
Well my game http://www.java-gaming.org/topics/iconified/35090/view.html has a max map size of 68,719,476,704 X 68,719,476,704 xD total map size on disk 17GB xD

Well I can't say I have tried maxing it out so Ill do that later tonight and let you know. I'm also targeting this for mobile which is a huge difference when you compare CPU and how much memory each can handle
19  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 22:12:38
My philosophy right now is to ignore the cosmetics of the game and focus strictly on the fundamentals and background services of it. I'll worry about the cosmetics when the game is fundamentally sound.

Yup, sounds just like the opposite of how I normally do things Roll Eyes

Recursion can either be pretty efficient or not so much depending on your method of execution. If you're doing repeated method calls for recursion, it works but it's not the fastest. A faster way would be to iterate through a queue, but seeing as your game doesn't have as huge of a world as I did it's not a big deal right now.

Haha I guess that depends on your definition of huge. My world currently has 1,620,000 tiles in it which I would personally say is pretty huge. Why would work size depend on whether to use the raycasting method or not?
20  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 20:58:34
My mistake! Fixed the pictures. I am not using a raycasting algorithm, I figured a grid-based recursive fill algorithm would work efficiently (which it does). The system doesn't currently support different colored lights but it's definitely something I'd like to add in the future and something I already know how I'd do.

My philosophy right now is to ignore the cosmetics of the game and focus strictly on the fundamentals and background services of it. I'll worry about the cosmetics when the game is fundamentally sound.
21  Games Center / WIP games, tools & toy projects / Re: (Another) Terraria-Clone on: 2015-09-28 20:06:06
Just finished the algorithm that removes the lighting generated by a light source. The important thing with my lighting system is that, unlike most other light systems, my system doesn't have light sources generate a dynamic light value each frame. We can assume that light sources only change when they are modified (broken, placed, or moved) so there is no need for a light source to generate light values every frame. My system generates a dynamic light value once after the light source is placed. It removes the generated light once the light source is removed (broken). It cuts down on resource-usage and makes the game run a lot faster. It also works very well with multiple lights placed next to eachother. Here are images of the lighting system in action, starting from one light source, adding more, breaking some surround blocks, and then removing them. Let me know what you guys think!







22  Games Center / Featured Games / Re: RFLEX *Available on Steam* on: 2015-09-28 13:50:43
If you want to get more publicity make a port to Android! This would take off
23  Games Center / WIP games, tools & toy projects / (Another) Terraria-Clone on: 2015-09-25 15:48:39
Yes, here is yet another Terraria-clone (currently unnamed until I come up with a specific direction) that I am developing using LibGDX. Unlike most other clones, my main focus for the game is to optimize it as much as possible to allow it to be played smoothly on mobile (Android) devices. Because of this my sole focus is to design complex algorithms to keep the amount of resources and memory being used as low as possible. For example, the two big things that I am currently focusing on optimizing are the world management system and the lighting system. Right now I have the world management system pretty much done. I am able to have a world with 1,620,000 tiles managed efficiently and ran on an Android device at a stable 30 fps. I also developed my own physics system which efficiently handles collisions for all entities in the world. The basis of the lighting system is done but I need to work on the removal of light when it is surrounded by other lights.

Current Features
  • World Management System
  • Procedural World Generation
  • Physics System
  • Lighting System
  • Saving and Loading Worlds
  • Block Breaking System
  • Item and Inventory System
  • Crafting System

Current Focus
  • Working on the procedural generation of the world.

Stream
I live stream development of the game whenever I am working on it. You can watch my streams here. Be sure to sign up and follow me to get notified when I am streaming. I stream everyday for a few hours a day!

Video Feature Showcase - December 19th, 2015
https://www.youtube.com/watch?v=-z4o8CwJR8E

Update #3 - December 17th, 2015
I managed to implement procedural generation of caves, ores, and trees. The cave generation values need to be played with a tad, but as of right now it works great. You can see a picture of the updates below. Let me know what you guys think!



Update #2 - October 5th, 2015
So I added the inventory and item system to the game! I also added drops when breaking blocks. Here is an image of what it looks like currently. The next thing to do is to add the ability to place blocks based on what is selected in the inventory. Let me know what you guys think!




Update #1 - September 30th, 2015
Here are some images of the game. The first image is a picture of the lighting system as of a day ago. The second image is a picture of the lighting system as of two days ago.





As I further the lighting system I will be posting more pictures and videos. Let me know any suggestions and comments you have!
24  Game Development / Game Mechanics / Re: Efficient Terraria-Like 2D Lighting on: 2015-09-24 14:46:41
I'm using a two pass process, with a light-mask rendered over the whole scene in a second pass. It works fine. You can see the results over there:

http://www.java-gaming.org/topics/the-hunt-for-the-lost-rainbow-jewels/36637/msg/348681/view.html#msg348681


That looks awesome! I think the main reason I don't want to do that type of lighting though is because I want the blocks to occlude light (to diminish light when it passes them). This algorithm I modified let's me do it very efficiently, especially when a block is removed in the light and the light needs to be recalculated.

Edit: Here is a new update from the lighting I've been working on. I also added in basic walls to go behind the blocks.



I'm now working on removing lights which is being a pain with the calculations when more than one light source is next to eachother. I also have to fix the way that the sun generates light down onto the ground because my algorithm now doesn't work how it should when a block is modified.
25  Game Development / Game Mechanics / Re: Efficient Terraria-Like 2D Lighting on: 2015-09-24 12:17:41
Looks great! How did you do the lightning effect? With masking?

I actually just used basic coloring tinting! So in a way this may be see as a mask but this allowed me to create the light effect with only one draw pass and save a LOT of performance. I'm using LibGDX as the backend so, if you're familiar with it, I just set the spritebatch's color to a shade of black dependent on the amount of light coming in.
26  Games Center / WIP games, tools & toy projects / Re: TritonForge || 2D RPG Sandbox (DOWNLOAD V2 NOW-AutoUpdater!) on: 2015-09-24 05:22:57

Do you mean all at once? Like straight across the top?

Yeah how do you determine what is the top layer? Do you have a skype I could message you over? I'm making a game similar to terraria and it'd be great to ask you how you handled a few things with the lighting. I have the basis down just need to brainstorm some more ideas to questions I have

Drey.Warde is my skype, but this has a pretty simple explanation anyway. lighting doesn't go top down, it goes in all directions at once. now if in your version it goes top down nothing changes really.

each block has a variable known as "castslight".

on block property updates, the engine will see if the block is a type that should cast light (I.E Air, torch).

If the value is false, then the light tile corresponding to that block remains completely dark.

If the block does cast light however, the flood fill algorithm starts from that block, and the goes for the whole screen.

Right I understand that, that is how any light source would work. I mean on the top of the world, when the "sun shines down on the world" it lights up the ground to a certain extent. I am curious how you handle this. I currently have a system in to light individual columns of tiles in the world but the difficulty is updating the light if, for example, another tile is set above the original highest tile.
27  Games Center / WIP games, tools & toy projects / Re: TritonForge || 2D RPG Sandbox (DOWNLOAD V2 NOW-AutoUpdater!) on: 2015-09-24 01:18:19

Do you mean all at once? Like straight across the top?

Yeah how do you determine what is the top layer? Do you have a skype I could message you over? I'm making a game similar to terraria and it'd be great to ask you how you handled a few things with the lighting. I have the basis down just need to brainstorm some more ideas to questions I have
28  Games Center / WIP games, tools & toy projects / Re: TritonForge || 2D RPG Sandbox (DOWNLOAD V2 NOW-AutoUpdater!) on: 2015-09-24 00:31:47
How exactly do you handle the lighting on the tophone of your world? I am using a modification of that lighting algorithm you posted but I can't think of an efficient way to light the entire top of the world. Any tips?
29  Game Development / Game Mechanics / Re: Efficient Terraria-Like 2D Lighting on: 2015-09-23 23:56:23
Excited to say that I've implemented the basis of the lighting system! It is tile based like I said and it also "crawls" along areas when blocks aren't in their way. I used a portion of the algorithm provided here and modified it to fit my system.

Here is an image of the lighting so far:


I have to add in the handling of breaking/placing blocks and updating the light efficiently.
30  Game Development / Newbie & Debugging Questions / Re: LibGDX Saving Chunks To Files? on: 2015-09-23 22:08:07
If you want compression you could also have the save file be a zip archive and each chunk (or group of chunks) as a ZipEntry.

True. It really just depends on how expensive you want the saving method to be and then how compressed you want the data to be.
Pages: [1] 2
 
orrenravid (200 views)
2016-07-16 03:57:23

theagentd (272 views)
2016-07-11 14:28:54

Hydroque (356 views)
2016-07-06 05:56:57

Hydroque (512 views)
2016-07-03 08:52:54

GrandCastle (383 views)
2016-07-01 09:13:47

GrandCastle (376 views)
2016-07-01 09:09:45

CopyableCougar4 (430 views)
2016-06-25 16:56:52

Hydroque (408 views)
2016-06-22 02:17:53

SwampChicken (373 views)
2016-06-20 13:22:57

SwampChicken (300 views)
2016-06-20 13:22:49
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17
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!