Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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 3 ... 12
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-30 06:41:26
I re-created an old lighting engine of mine, this time optimizing the recursion with a stack. It was so much faster that I accidentally had it running every frame without any noticeable performance decline. Of course, the real (human) performance decline was when I originally used a queue and wondered why there were so many objects waiting...

2  Game Development / Performance Tuning / Re: API design: assigning additional values to objects on: 2016-04-25 04:09:24
HashMaps actually usually have a complexity time of O(1) (absolute worst case scenario where all the hashcodes are the same is O(n)), so they shouldn't be that slow. Just because you benchmarked it at a percentage of CPU time doesn't mean it actually took a long time - the tick itself could've been really fast.

Try using the Maps again, and benchmark it with time, not CPU percentage. It should be negligible/really really small.

But for your actual question: do you really need to go full-on overboard just to store some more data in an object? You can simply make an object such as ImageWithId and store the Image and texture ID. Don't overcomplicate it.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-24 00:55:01
Working on a little game with some world generation, decided to visualize it as it's processing. The process shown in the video is running around 340x slower than it normally processes at so more than 5 frames of processing is shown.

gifv here

The generator basically has steps and each step can write to a frame buffer. The first two steps don't because it's biome selection and rough heightmap generation (that's the light lines in the black/white heightmap step).
4  Game Development / Newbie & Debugging Questions / Re: Brain not working - enemy jump on collision on: 2016-04-20 14:45:35
If your enemies are moving in the direction they want to go, then all you need to do is make them jump on a left/right collision. Because they're still moving, they should jump over the obstacle.
5  Game Development / Newbie & Debugging Questions / Re: Adding multi-player on: 2016-04-16 01:38:08
Based on the state of your game, I'd say it's extremely similar to ProjectMP (you can see the Github repo here) which is a fully multiplayer terraria-clone prototype.

Let me just say this: networking is a pain, and constituted a massive chunk of my time. Probably out of the six months I spent developing ProjectMP, only around a month's worth was dedicated to the game itself, the rest was all networking. I don't really want to scare you away from multiplayer as the feeling you get when you accomplishment is like no other, but it is an extremely big undertaking and will be somewhat difficult to implement along a pre-existing game. My advice is to make your current game really great and fun in singleplayer, then work your way into making a multiplayer version. I learned the hard way that the fun-factor is so much more important than multiplayer.

But if you really, really want to undertake this, I have a bit of advice:

Singleplayer is just a local version of multiplayer. Everything you do must be multiplayer compatible, and thus it will be singleplayer compatible. You will need to handle packets (KryoNet is excellent as the others have said and will serialize packets for you) such as world data (blocks), entity data (creation and deletion of entities), entity move data (where an entity has moved to), and interpolate your positions locally so you don't get jitter between packets. If you've ever tried modding Minecraft you'll see how the packet hierarchy goes.

Again, multiplayer in a sandbox game is hard. I did it for the challenge and not the fun. If you have lots of free time and want to work with debugging network-related things - go for it. Otherwise, having a solid fun singleplayer game is better than a "meh" multiplayer game, in my eyes.
6  Game Development / Newbie & Debugging Questions / Re: [LibGdx] Animation not working on: 2016-04-12 04:09:16
Saying "it doesn't work" and then putting your code here doesn't help us figure out your problem. What exactly doesn't work? What error is it throwing?

It would also help to put your code in [ code][ /code] tags for readability.

I think with how TextureAtlas work is that images with a number appended to them (or underscore number) will be grouped under the original name and have a special index. Maybe try putting that number as the second parameter instead.
for (int i = 0; i < 10; i++) {
+   walkTextureRegion = atlas.findRegion("", i);

whoops formatting got messed up
7  Discussions / Miscellaneous Topics / Re: The "impressiveness" of games on: 2016-04-12 01:58:37
Thanks for your responses. I'm currently deciding if I should re-do Project MP but in singleplayer so I can add features much more easily and have more of a game, compared to doing something more advanced like multiplayer. I'm probably going to go with the former because what really matters to me is if I have fun making the project, and not poking away at it to make the networking work. Pointing
8  Discussions / Miscellaneous Topics / The "impressiveness" of games on: 2016-04-11 22:48:28
Here at JGO, we love every project we see: be it small and baby steps, or something large and advanced. Personally for me, I started working on the biggest project I'd ever undertaken which was ProjectMP - a fully multiplayer terraria-like clone. The challenge there for me was to make it completely multiplayer compatible. It lasted around six months but was fully multiplayer from the start. The only downside was that the game itself was something most of us could make in a much shorter time than I did: it really only had world generation, movement, and mining. It was more of a labour of love for me, but I felt that I couldn't present it because it was so bare and lacking for the amount of time I worked on it. Adding any real features involved once again fiddling with networking which was a long process.

On the other hand, I could make what I wanted that project to be, but entirely singleplayer. Sure, it's now all cool and stuff... "but where's the multiplayer"?

This is what I feel is the difference between "technically impressive" and "fun". ProjectMP is my biggest achievement, but I feel that no one would really see it because of how similar and plain it looks. On the flip side, anyone can do a Terraria-clone with enough time, but that's because singleplayer doesn't pose much of a challenge to me.

I don't really know where I was going with this, but I often have to decide "do I want to make a lacking, technically challenging game" or "a flashy but not technically impressive game". What do you think?
9  Games Center / WIP games, tools & toy projects / Re: RhythmGame on: 2016-04-11 15:08:54
v0.2.5-alpha has major bugfixes but no new levels (that's what I get for scrapping every other idea). I'm also starting another side project so some time will be devoted to that instead of this one.

* No new level yet unfortunately, but is in the works after Game Show got scrapped
* New font
  * 100% less serifs
* Added perfects
  * Complete a level on Excellent and have the opportunity to try to perfect the entire level
  * You can keep trying as much as you want without penalties
  * Mostly for the self-accomplishment of doing so
* Added robot demo mode
  * The game will play the level for you and your score won't be saved until you restart
* Fixed practice music (Cannery) being ever so slightly off beat
  * Tiny intro of the song was making the beats off by some thousand samples so now it starts earlier to compensate
* Level select screen shows coming soon in place of new if the next level is not implemented yet
* Mountain Maneuver's steam pipe glows based on if you aced/failed the input
* The Cannery and Mountain Maneuver's textures have been packed
  * All future games will be packed but the original singular textures will remain in the folders
* Added steam particle effects to Cannery
* Added delay with text so you can't spam Z/N to skip it all
* Fixed bug where you could press X/M to skip scoring
* UI inputs are now triggered on release

Some feedback would be nice, but I know the levels are lacking quantitatively.
10  Game Development / Newbie & Debugging Questions / Re: (LibGdx) Screen or states? on: 2016-04-11 03:07:42
In the libgdx context, screen and state are the same thing. You have multiple screens (that you manage yourself in whatever way you want) and you just call setScreen on your Game.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-10 03:40:44
Tried updating my libgdx projects to lwjgl3, found out they hid all my fun hacky methods such as overriding how runnables are executed to alter music pitch so I reverted.

I didn't need multi-window support thaaaat badly... Although stock music pitch support would be excellent.
12  Discussions / Miscellaneous Topics / Re: lambdas rant on: 2016-04-09 22:40:12
... but I hate introducing an identifier (idlvl) in my code without declaring its type.

listWithContinuation(result2, prices, marketLines, marketMore,
    (String idlvl) -> idlvl + " " + numbers.get(idlvl) + " for " + prices.get(idlvl) + "© each");

All done. Tongue

I don't personally use lambdas (definitely agree with your anonymous class readability) but I can see how they would be useful for functional interfaces, since you already only have the one method.

It goes against my grain as a programmer, but if I don't get the hang of them will I still be able to hang out with the cool kids?

I'll always think you're a cool kid. Grin
13  Game Development / Game Mechanics / Re: Limiting camera rotation? on: 2016-04-09 20:09:33
Your range is 280-360, and then 0-80, which is an actual range of 0-160. You should be clamping your value from 0-160 first, then offsetting it by 280 (addition). Like you said, your library will use % 360 on the actual value to keep it in check, so even if you end up with 440 (which is 160 + 280), it'll be clamped back to 80.

public void clampXRotation(float minimum, float maximum) {

   if (minimum > maximum) {
      float actualRange = (360 - minimum) + maximum;

      // move rotation to the actual range
      rotx += (360 - minimum);
      rotx %= 360;

      // now clamp between the actual range that has proper min/max values
      clampXRotation(0, actualRange);
      // move back to the old range with a larger minimum value
      rotx += minimum;
      rotx %= 360;
   } else {
      if (rotx < minimum) rotx = minimum;
      if (rotx > maximum) rotx = maximum;

14  Game Development / Networking & Multiplayer / Re: Kryonet: Can I trust the client? (Beginner question) on: 2016-04-03 15:59:21
While this is an important topic for many games, do you currently have a game that enough people will play that hacking becomes an issue? I would leave any anti-cheat checks for now, and deal with it when the time comes. Out of the solutions you have for how to resolve an invalid packet, you could either kick the player or ignore the message. Don't do any fancy stuff, keep it simple.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-03 06:04:54
Took J0's advice for having multiple buttons so you are might be getting a game show with cats.


cats won't be this horrendous in the final version
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-01 05:14:28
Scrapped the third level for my little rhythm game again because I felt that copying another game (Rhythm Heaven in particular, even though it's my main inspiration) doesn't really seem right.

Still deciding if a slightly faster tempo or learning how to use X instead of Z for a key is suitable for the third level... What do you think?
17  Games Center / WIP games, tools & toy projects / Re: SterriaLand on: 2016-04-01 01:57:44
I'm going to have to agree with Cero with this one. You're expecting £30,000 in a month for a game that doesn't have much to offer. Yes, the dynamic fluids and lighting is pretty cool, but unfortunately those features are what's "expected" from a game nowadays. It's about if you can get a creative, original idea out that you really think deserves funding. This looks more like an experimental game at first glance, and the front page video doesn't sell anything to potential buyers.

Work on it some more. Copying other games is fine if you're learning, but when it comes to potential buyers of your product, standing out is more important.
18  Game Development / Newbie & Debugging Questions / Re: Moving bad guys on: 2016-03-30 02:45:11
Not sure what Terraria uses, but looks simple.  Slimes move left/right then jump when near player - guess in the jump method need to check if collided with a block
else they would be jumping through them!  Zombies seems to fall down holes after you - maybe this is A*?

Why would you do any collision checking in your jump method? All your collision should be handled in one place like an update method for each entity.

If I remember correctly, slimes jump in that game regardless of any walls or ceilings (their AI is "dumb") and I think zombies do use A* to try to find you. You would definitely need to put a cap on how far it can pathfind though because it can't possibly search the entire map quick enough. Usually you can try pathfinding to the player and if it fails to find a path it would just attempt to go to the player's X coordinate and jump constantly if it's too low. You'll also have to have your A* pathfinding to handle gravity (jump when at a wall, so to speak).
19  Game Development / Newbie & Debugging Questions / Re: Chunks and Cross-chunk Tile Transitions on: 2016-03-28 17:25:01
I think the trick with chunks is that they're only there for optimizations. A setBlock and getBlock method would benefit as all you have to do is call those functions and it should do the chunk figuring out in the methods, rather than you having to do the division and remainder stuff scattered in your code.

When I was developing a game like this, chunks were only for sending multiplayer data. The whole world acted like a big array of blocks but I just had getters and setters to retrieve it at their actual positions and not in-chunk positions, if that makes any sense.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-25 00:22:23
You know how people say how you tend to get good at the game you're developing? I had a massive issue with that and timing where all the timings were actually really difficult for my friends who had tried the game really started to have trouble because of how my thresholds were created by beat and not by seconds. It's not too noticeable for stuff like the Cannery where the beat is measured by the can width as a visual guide, but the level afterwards had tempo changes which immediately caused the actual second-timing threshold to drop massively. Now the threshold is fairly large (100 ms for on time, 200 ms for just barely) and maintains that regardless of tempo change.
21  Java Game APIs & Engines / Java Sound & OpenAL / Re: LibGDX audio not loud enough on: 2016-03-24 03:20:45
Libgdx has pan support and that's about it. If you use the AL backends you can make it 3D sound.

There isn't exactly a master volume setting as it just uses the gain function in AL to change the volume. Gain in OpenAL is a value between 0 and 1, (which is relative to the constant AL_MAX_GAIN which is normally 1 if I recall).

If you'd actually want to amplify sounds, you'd have to get the PCB data of the sound, actually edit it yourself, and play it back again using AudioDevice.
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-23 22:05:40
Hey J0, loving the game so far! The art style is wonderful and you need to keep it that way! It took a little bit of time to figure out what to do, I realized it was a tower defense and by the time I started placing things a wave started. A tutorial obviously would be extremely beneficial but would take a lot of time. I like the fact that your towers also can produce resources that you can sell to generate some more money.

Tiny tidbits of things I noticed:
Damage animation would be helpful (even just a red overlay would work) as the health bars don't appear until you mouse over it and I have no idea if the enemies are being hurt or not.
Logs from the woodcutters seem to stay forever and keep the enemies there until a tower is in range to kill it. Maybe the logs should despawn after a while?

All in all, it's a really good demo and I'm excited for versions to come Pointing
23  Game Development / Newbie & Debugging Questions / Re: Array Of Sub-Classes on: 2016-03-23 17:38:57
In my little Terraria-like game ProjectMP items and blocks are stored in the singleton class but entities (due to being totally separate objects for each one) must be instantiated via reflection. All the entity types are stored in an EntityRegistry which is just a singleton for the string ID and entity class. Enums don't work in my case simply because it has to be modular, and I should be able to instantiate any type of entity I need to without having to refer to an enum (modding and the like as well).
24  Game Development / Newbie & Debugging Questions / Re: Array Of Sub-Classes on: 2016-03-22 04:43:56
You could instantiate all your items, keep it in a singleton class, and just reuse the same objects over and over again. This way you don't have to instantiate more and more (reflection is slower than normal new Object()ing) item objects. The same can be applied to tiles, if they exist in your game.

This post is a really good example of how Blocks would be used over and over again.
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-22 04:18:24
While looking for songs for the next level I ended up finding an extremely good one... that was for the sequel of the cannery level.

It's fast paced and fun and definitely challenging, which is what I want the sequel levels to be about.
<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-21 04:45:29
Bored at night so I made a 5 second remix level that consists of 4 inputs to Waterloo for no reason.

<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>
27  Games Center / WIP games, tools & toy projects / Re: RhythmGame on: 2016-03-20 22:02:02
v0.2.3-alpha adds Mountain Maneuver which has very little to do with maneuvering but loads to do with mountains!

* Added new level
  * Mountain Maneuver
    * "Everyone loves the scenic view as you come 'round the mountain! Although, it seems like we're going in a circle..."
    * Blow your horn after the signal(s)
    * If you toot off time, it counts as a penalty (first game to do so)
* Added restart level instantly option (R) from pause menu
* Added skip title card option (backspace)
* Fixed up save files and how they save score.
* Added save file upgrading system behind-the-scenes. Upgrades save files from older versions when loaded.
  * You will have to do the first level again and pass it to unlock the next level.
* High score is displayed on level select screen (will be 0 for older saves)

v0.2.4-alpha adds some bugfixes (relating to main menu accessibility).

Github release page
28  Game Development / Game Play & Game Design / Re: Moving platforms as tiles or objects? on: 2016-03-20 03:32:34
I would suggest making moving platforms entities like your enemies and player because eventually you'll have to handle enemy collision. Yes, you can check for an entity in your path with your tile collision. If you have a large number of entities in a large area, try using a quadtree to sort out entities that definitely aren't in your path.
29  Game Development / Newbie & Debugging Questions / Re: Merging a texture on top of another on: 2016-03-18 23:50:36
Just render the torch after you render the tile.

For animations, you would typically have a set of frames on a single texture and you'd just loop through the textures as time passes. If you're talking about how the torch should emit smoke or something, that's better suited for particles.
30  Java Game APIs & Engines / Java Sound & OpenAL / Re: LibGDX audio not loud enough on: 2016-03-18 21:33:08
If this is such a problem, use an audio editor like Audacity to amplify all the music and sound effects so your game sounds reasonable. It's better for a game to be louder than quieter because you can turn it down but not up.
Pages: [1] 2 3 ... 12
IanParcs (36 views)
2016-04-18 14:18:53

KaiHH (36 views)
2016-04-18 08:35:41

KaiHH (67 views)
2016-04-15 12:43:58

theagentd (67 views)
2016-04-14 02:16:17

theagentd (74 views)
2016-04-14 02:15:43

IanParcs (67 views)
2016-04-12 03:51:16

IanParcs (37 views)
2016-04-12 03:50:03

IanParcs (33 views)
2016-04-12 03:49:54

IanParcs (30 views)
2016-04-12 03:49:52

IanParcs (39 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 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!