Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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 ... 5
1  Games Center / Showcase / Re: Dyad on: 2014-06-27 13:19:27
Just noticed by accidently clicking the wrong button and scanning the jar with my antivirus, it detects a possible trojan/exploit. No exact idea why. It seems to trigger on some sort of loading external stuff in the \com\badlogic\gdx\utils\SharedLibraryLoader.class.
While it says high danger, it seems minor to me because it did not trigger after download or during running the jar. Still who knows how other antivirus programs react. I am using AVG AntiVirus Free.
2  Games Center / Showcase / Re: Flappy Taco | My first game on: 2014-06-27 12:41:56
Nice work for a starter project. Keep it up!
3  Game Development / Game Play & Game Design / Re: 2D Shooter - top down or side on? on: 2014-06-27 12:25:51
On that screenshot and the shooter mechanics: I think it depends on the look of your enemies. In the screenshot the monsters have pretty exposed heads and limbs, you can make seperate target zones for this. If you have mostly humans, the head is less exposed though.

One thing you maybe can work with is a varying cone of fire. You know like modern games have bigger crosshairs when you move as when you dont move and the spray is greater. I have one vague game design idea in my collection of ideas what would include a dynamic crosshair or maybe a visual cone of fire, and when you would stand steady and aim the cone would shrink over time until you more or less have a line and you would make an precise shot at the aimed target, but if you move, turn, shot several bullets, everything would increase spread. One could also include ADS (aiming down sights) which usually makes aim better but movement slower. Then part of the shooting mechanics is balancing timing and evasion. Standing still and aiming to hit critical spots against running around spraying from the hip. When going with this sort of birds view, I would resolve my collisions rougly on head height level and see, if the bullet is in the head zone within the body zone for enemies where the head is on the body or inside the body collision zone. Then you need to keep the bullet flying, even if it already hit body zone, because it may hit the head or whatever else critical zone you still have, and I would keep the bullet flying until it passed some point like the middle or center of the enemy. If the critical zone is in the center, the bullet wont hit it when it did not at the nearest point to the center. If the critical zone is wherever on the outer boundaries of the enemy, I do not want one zone to be hit from the other side of the enemy, so the middle of the body is where the bullet hits when it does not hit a critical zone on the way to there. If you do not to want bullets to visually travel into the enemy before they impact the body zone, you can scan ahead in the bullets direction if it will hit a critical zone and only have it traveling on, if it will, and otherwise have it impacting on the body border. Something like that.

Good luck.
4  Games Center / Showcase / Re: Dyad on: 2014-06-27 11:45:23

Very nice thing. I played on PC. Took a minute to figure out the keys cause the help only says tilt the screen, but A and D have been my second try after the arrow keys. Its a fun little game for several runs. But I am not much of a high score chaser, so I dropped it quickly. I imagine its far easier to control on PC with keys to move and shoot than tilting and putting your finger on your phone Smiley. It is very minimalistic in a positive way. You used very few colors, shapes and whatever and made a game. Its like the rule "its perfect when you cannot remove anything else".

I like it, and when I may, I will look into the source at some point to learn something about libGDX.

The only thing it maybe lacks is the depth to be a longer lasting fun.

A few somewhat issues:
- The game over sound feels louder compared to the rest like shooting and explosions. But maybe its just because its a longer sound.
- High Score display did not do something. I got a textfile in my directory but just crap in it.
- It feels like the placement of obstacles got so random at around 800+ points, that there is not always a real winnable way. I got into some kind of dead end and that makes me feel cheated. I do not know if this is just a feeling or if your game already always checks that there really is a managable way to go on. Otherwise there should be. When someone crashes, he should always feel like he could have made it if he steered right, not because the game placed the obstacles in a way you cannot avoid them.

Good work overall!
5  Game Development / Game Play & Game Design / Re: Desert trading-based game thing on: 2014-06-24 21:58:49
Not sure if you notice the reply after that long time. Economy Sims have their fans. I am not one of them, so I cannot give good tips. I just wanted to say it sounds rather unique and if you use that right, its a good thing. There are a lot of games that are more or less like other ones. Most topics seem to be used heavily. If you spot something fresh, it may generate attention.

On victory condition, look into building and settling games like Civilization, Anno, Settlers and the like. There can be a lot. Wealth, Fame, Diplomatics, Economic dominance, gathering some amount of rare goods, reaching certain amounts of trade volume, income or stuff. It depends on your game mechanis.

You should work out a game design abstract in maybe 2 to 4 pages and present it to some people here and in other places for gamedev to get opinions, but you need to provide some more depth.

6  Game Development / Game Play & Game Design / Re: Creating a tactical team based shooter - Guns (no aim vs aim down sight) on: 2014-06-24 21:46:32
I am so used to ADS that not having it feels really retro and I actually miss it and need to readjust when playing games without it. So you will probably break with a lot of peoples first expectations. It depends on what fits your gameplay and if you could handle the extra work of including ADS. Using ADS would allow for different optics and maybe zooms which could enhance tactical options. But it may make you somewhat more of a Battlefield copy.

The other thing is if you include recoil or just add spray when people hold the trigger.

If possible, leave this open for play tests and check with players if they feel like ADS is needed. I would first leave it out, also in order to have a difference to current shooters.

7  Game Development / Game Play & Game Design / Re: Efficient game maps and Scrolling on: 2014-06-24 21:40:06
Hi there

I am amazed on the level of help you get here, although you are kind of asking for basics that are covered in several tutorials and from the first few posts on it seems obvious to me, that you need to learn that stuff or the guys here need to take your hand and walk you through every step. All this is explained in several internet tutorials. How to handle tile maps, collision, camera / screen and all that. Unfortunately I only have one link at hand:
But there is more on Gamasutra and some gamedev related websites that gather articles on game programming.

So my advice is: google for some tutorials using the words in use here, tile based maps and such. Read them, understand them, do some programming, maybe do some stuff with pen and paper. I would say we cannot give you a full lecture, but to my surprise the people here are on it. I do not want to stop anyone to walk you through it step by step, but the flow of questions will never end when you do not manage to solve stuff yourself.

The short short version is:
You use a tile based map in a 2D array (x and y coordinates). You have a player coordinate and this is sourrunded by your viewport, defining the part of the map you currently view. You calculate on screen coordinates for each tile based on the viewport position and the tile coordinates. So if your viewport begins on coordinate 10,10, you draw the tile at total coordinate 10,10 on the screen at 0,0. Give or take some, because your character and viewport moves smoothly and does not jump tile by tile but instead moves from one to the other, so you will have some pixel offset in place, when you are in between tiles. All your collisions and mobs (enemies, items, stuff) are based on the internal array and their total world coordinates. Nothing of that really moves around except your viewport / camare and the part of the world you currently see.

Hopefully you can find your way from here on and the others keep on helping. I primarily wanted to point you to the internet sources out there, there are many and good ones. Your questions are sometimes so basic, you really need to research your stuff. There cannot be someone every time to tell you how its done. Good luck.

8  Game Development / Game Play & Game Design / Re: 2D Shooter - top down or side on? on: 2014-06-24 21:23:39
The complete list of 2D options I know of would be:
- Complete Top Down
- Birds View
- Side scroller with and without depth
- Isometric

In top down you see everything exactly from the top. Then you only need one graphic for your mobs and you can rotate it. You can also have 360° degrees of freedom in aiming and or movement. Unfortunately usually does not look very nice.

Birds view is kind of like top down but you also see one side of all objects. Like the first Command & Conquer. Looks better, but you need images for all mobs in 8 direction. Its also harder to have more than 8 directions, except when you use true 3D, because you just do not want to make so many different views of your mobs.

Side scroller without depth is your usual classic jump and run. Depending on your gameplay your movement is pretty limited, usually sideways with some vertical in between like ladders, jumping and stuff. In the easy case you only need 2 views for each mob, to the left and to the right. If you want free aiming and the character to reflect that like aiming the weapon in that direction, you need more views for the aiming directions.

Side scroller with depth, like Golden Axe, adds some depth into the side scrolling where you can move more towards foreground and background. Still you usually only have a left and right view of each mob. Free aiming gets kind of complicated, because your crosshair does not reflect the depth of the scene and you cannot easily determine if the player aims high in the foreground or low in the background.

Isometric is sometimes called 2.5d I think and its the most 3D like optics you get, but also the most complex to do. You need at least 8 directions for each mob graphic and you may have multiple layers in the level, need to determine when you want to show the roof of a house and when to show the inside and lots of stuff.

As for aiming for certain parts, with perspective it gets complex because whenever you have theoretical 3D with a fixed cam and your crosshair only is a 2D coordinate on screen, you do not have a unique 3D coordinate where the crosshair points at, rather its a line through the scene. You can do things like lock the height of the aim, lock on the nearest enemy or do some kind of best guess.

On top down, you can either have a dedicated head target zone within the body target zone. That would also apply to all kinds of monsters and creatures where you maybe want different vulnerable areas. You could also make it just random luck by making 10% of body hits a critical, but well thats random.

It depends on the prespective on what you can aim at. There will always be some kind of overlapping. Top view will overlap head with body and body with legs. Side view overlaps arms with body. Isometric Is complicated.

If the aiming on zones is important for your gameplay, I would go with a clean view either side or top view. Side view gives the best exposure for head zones. Top view allows to define all sorts of critical zones on the borders of the mob target zones. Just overlap critical hit zone circles with a bigger body circle and check for a hit against the body and against critical zones, the critical zone wins. The optics may be less pleasing, but there are at least very beatiful side scrollers out there, I am not sure about top downs. This also limits your graphical work as you do not need too many perspectives of each mob.
9  Game Development / Game Mechanics / Re: Infinite level generation? on: 2014-02-12 17:41:04
Just to make this clear to anyone, the java.util.Random object has a constructer that accepts a seed and will produce the same values every time when using the same seed. It is exactly what you want and 100% reproduceable when running exactly the same procedure.

In cases where you have for some reason no reproduceable random generator, you might consider to genereate 100 or more random values and store them. Running through the same list of values over and over may be random enough for many cases and all you need to store is 100 or 200 or somewhat integers.

But generally, stick with the Random class and give it a seed.

10  Game Development / Newbie & Debugging Questions / Re: How to build Java program with many images, without java heap error ?? on: 2009-08-26 19:49:18
Well I thought about maybe loading the raw bytes of a jpeg and decode it on the fly and use only the required portion. But the idea of splitting might be even better, splitting the image into several images of a few hundred pixels wide. I'd just need to reencode unused image parts into jpeg or compressed binary data.

But actually, you are right there too, nowadays Gigabytes of Ram are typical. I should just go ahead an do something, and measure and optimize afterwards. One should not try to optimize beforehand, for you never know, if the optimization is needed at all.

11  Game Development / Networking & Multiplayer / Re: Need a way to discover if i'm behind a proxy on: 2009-08-25 21:31:15
Did you google it? Sounds like a typical problem. Maybe a HTTP response contains some info in the header from a proxy, when one is active. I cannot look for more details myself right now, I have no more time. But this is what I would try, to find out if a proxy somehow gives a sign in its HTTP response.

12  Game Development / Networking & Multiplayer / Re: Firefox and applet focus on: 2009-08-25 21:28:55
Usually the applet shoul receive focus when the user clicks on it (again). It should not force focus otherwise, the user might want to have the focus elsewhere, like in the address bar. Dont steal that.

When your applet doesnt get focus when the user clicks on it, its hard to tell with the few information given. I would at first assume, that there is something top level that is not enabled or not focusable or anything that blocks the java focus handling.

13  Games Center / WIP games, tools & toy projects / Re: Stickmen Wars on: 2009-08-25 21:21:57
Although simple, it is pretty fun for a while. With some more AI, maybe some Buildings, it can really make it into a nice game.
14  Games Center / Archived Projects / Re: Browser-Game: Helicopter-flying, voxel-based on: 2009-08-25 20:38:46
Really cool. I always wished I would understand Voxel Engines. Well I read them and I never could imagine how to create a decent framerate with tracing every pixel on screen. Its like I basically understand the math and algorithm, but it feels like far too much to be done several times a second. I considered using a Voxel Engine for a RTS. Well,actually it is probably easier to learn real 3D. But somehow 3D is not my thing.

Well steering sucks, but you probably know that. But the rest is really cool.

15  Game Development / Newbie & Debugging Questions / Re: How to build Java program with many images, without java heap error ?? on: 2009-08-25 20:27:28
I'll use this thread because I have a similar question. For example when I think about a game like worms, that allows pixel based manipulation of the level and seems to be based on an image. When creating a BufferedImage big enough to span a few screens, you quickly have a big file. For example 3000 x 2000 pixels, which is about 3 screens wide and 2 screens high, using the default 4 byte per pixel RGBA, takes 22 MB.

I am wondering, if it is possible to store images in a compressed format, like jpeg, and only decode the visible part of it, so that the in memory impact of big images is smaller like a few MB.

16  Game Development / Newbie & Debugging Questions / Re: New to Java game programming. Need help with threads? on: 2009-08-05 21:28:35
I would say you usually have one thread for each independent communication. When you have an established dialog of request and response, you only need one thread wjich will send and receive in turns. If you want to handle each direction of communication on its own, you have two threads.

17  Game Development / Newbie & Debugging Questions / Re: super newbie! on: 2009-08-05 21:24:14
I usually advise the use of books when starting with something completely new. There are enough books on Java, and there are some on Java Game Programming too. That gives you good starting point. After that, you need exercise and you will find advanced articles on the web. The most problems in game programming are not language dependent.

18  Java Game APIs & Engines / Java 2D / Re: Drawing image flipped on: 2009-08-05 21:03:18
Its okay to do so. Drawing an image with negative width or height does a mirror effect, which is not equal to a rotation.

19  Java Game APIs & Engines / Java 2D / Re: Isometric terrain with uneven tiles on: 2009-08-05 21:01:54
Well Ill use this thread anyway, because I had just the same idea, to experiment with different heights for every corner in a tile map, and I have the same problem, applying correct lighting and textures. On one hand, I would appreciate any more ideas considering the problem. On the other hand, I'd like to share my ideas so far:

My first attempt would be using a simple flat texturing, so that the texture is not perspectively morphed but just clipped to the tiles shape. And to create the look of depth just using lighting / shadows on each tile. That could be done by manipulating the image data and lighten or darken pixels row by row, or painting a fading from light white or black to transparent over the tile. Anyway, one really needs to buffer the result and do the texturing only once, everything else would be to slow.

My attempt number two would be writing my own texture routine. I have the book from David Brackeend and he describes 3d software rendering and texturing. Using some rather simple math is already enough to calculate the position of each point of a texture to a destination point on the morphed tile. For each different shape and texture, you'd need to at least one apply the texture to the tile shape by calculation each pixel value using 3d math. You probably want to buffer the resulting images, for you cannot calculate this every frame.

The problem here is not actually texturing but perspective morphing. Isometric graphics use some simple math to produce results that look like having a perspective. When you consider it the way a 3d engine does, each tile is a flat shape with some angle along the 3 axes. There is some math involved in projecting a shape in 3d into a view from a given point of view. The basic calculations for 3d transforming can probably found on the web.

20  Game Development / Networking & Multiplayer / Re: Protect Password in Applet on: 2009-08-05 20:42:36
Well I thought about some SessionID or one use only Action Token to protect against invalid calls to the scripts. This does not protect against a namipulated java program, but illegal actions should be cought when the server validates the input. But it would at least compilcate manual calls to the scripts or "just for fun" calls.

Ill think it through. Maybe ill rather do a normal offline game.

21  Game Development / Networking & Multiplayer / Re: Protect Password in Applet on: 2009-08-04 15:57:14
Thanks so far

What would be the cheapest and easiest solution using the typical webhosting offers?
So far I would try using PHP Scripts on a webhosting with a MySQL database and use
URLConnections from the applet to the server.

Doing so, I would still need some kind of security method, so that no one can
invoke the PHP Scripts with bad data.

22  Game Development / Networking & Multiplayer / Protect Password in Applet on: 2009-07-25 13:53:01

I am considering to develop a java applet browser game, which would require the use of a database. But since the applet runs on the client and needs to make a db connection, it needs the password at this point in clear text. Anyone could decompile the applet and insert a system.out.println to get the db pass and do bad things to my db.

Is there a way to make a java based browser game while protecting the system from manipulation through a hacker attack?

23  Java Game APIs & Engines / Java 2D / Re: Please...need help with 2D game in Java. on: 2008-05-09 14:05:52
- Use an offscreen buffer
- Read java painting tutorials, there are a lot
- Why do you use an BufferedImageOp? You do that on each paint, its expensive. I dont know what it does, but perhaps you only need it done once?
- You can cast Graphics to Graphics2D, which allows using AffineTransform, so you probably dont need the Op.
- Use better variable names than bi, bim, img, and so on. No one can easly read your code with such names. Additionally you seem to use x_speed and y_speed as coordinates for the drawimage, either the name of the var or its use is wrong.

With a little work, there are many examples in the web, you can solve this yourself.

24  Java Game APIs & Engines / Java 2D / Re: Java 2D performacje on fullscreen mode on: 2008-05-09 13:55:14
Its a stupid idea, but maybe getFPS is wrong Cheesy

Actually, drawing some images should defintely be faster.
25  Game Development / Artificial Intelligence / Re: (in)Finite State Machines (or: my first steps in the AI domain) on: 2008-05-09 13:51:05
I think you are on the right path. State Machines are usually programmed as graphs. Each state is a node and each change is a connection.

So you have a reference to a current state, forward all events to it, the state would go through a list of connections, see of any is set for the given event and then change the state. So its very dynamic. You need a state object with some state identification information. You need a state transition object which has a list of events. You set up states and then for each state add transitions to other states. To each transition you add a list of events / condition which will trigger this transition. So you usually dont even need to program individual state objects.

The task of the state machine itself is only to tell you its current state and to handle an event, which might possibly change its state. The real AI would use the state machine, ask for the current state, and perform respective actions.

So your basic simple monster AI has a state machine with 3 states: idle, attack and flee. It has events spot player, lose player and low health. The transitions would be spot player in idle changes state to attack, and lose player in attack changes state to idle. Low health in both states change state to flee. Probably you would want to add some event when fleeing stops and returns to idle.

You dont need individual state objects. Just give the states a name. The real actions are made up by the AI algorithm that uses the state machine, not by the states themselves.

26  Game Development / Artificial Intelligence / Re: Multiple pathfinders and memory usage on: 2008-05-09 13:40:20
There has been said a lot already, I might repeat some but I must admit I didnt read everything:

1) Finding 5 paths the same time would actually not be faster than finding 5 paths sequentially. The CPU has the same amount of work to do, plus thread scheduling. Concurrent threads would give you an advance, when you have one big and one small search, the small one would be done soon and does not have to wait for the big one.

2) Pathfinding information does NOT belong to the node. Either you keep a visited list with nodes, or you use a PathFindingNode object which keeps reference to a node. Both ways, you can use map nodes concurrently.

3) Groups of units can share a pathfinding. Either all use the same path or you move the path of each one by its distance to the starting cell of o the search. But it can happen that a moved path runs into an obstacle, so you must check and correct such paths, but its still cheaper than searching again.

27  Game Development / Artificial Intelligence / Re: RTS AI on: 2008-05-09 13:31:45
I think it is well possible and not the hardest thing to do. Sure its not easy, but its possible. The problem is knowledge. I've read 3 books about game AI and have some ideas how to do it. But you cannot just type it in a few words. So I will rather tell you, there are ways to do this, but you will have to learn a lot about game ai.

The idea is very good alredy. A stimulus, or trigger, or event, influences the soldiers. One important rule is, that the event makes it self known to all objects in the area of effect, and not that all objects query for events in their sourrounding. But I do not see player actions as a stimulus in that way. The player gives rather high level targets, like attack that enemy, move to that position. The AI must break it down into simple actions like fire a shot or move north 1 field.

Dynamic terrain and pathfinding, finding cover, acting as squad, everything is possible and has a lot of solutions.


I read the first three editions of AI Game Programming Wisdom, and they cover a lot of such stuff. But they arent exactly cheap. Quite some of the articles are also available freely in the web, but you have to find them.

If you have more specific problems or questions I can maybe give a better help.

28  Game Development / Artificial Intelligence / Re: NPC Scripting on: 2008-05-09 13:21:36
I never really did it, but I once had the same thoughts about how to control the actions of game objects like npcs or such.

I would basically add all orders into a list, and the object will do the current task until it is finished, then it removes the task and continues with the next one.

Operations on the list would be:
- Add a task to the end
- Add a task to the beginning, so that the object now does the new task first, but then continues where it was before
- Remove tasks (and add new ones)

I was plannig for a RTS and how I could handle a dozen of tanks all do something senseful. Whenever they encounter a problem, there must be a way to add a task at the beginning and resume the remaining tasks after that. I would have atomic tasks (like move north) and semantic tasks like find path to or react on enemy, which involve more AI and produce atomic tasks. React on AI would probably look for cover, which would then add find path to cover position, which would start pathfinding and add simple move orders from tile to tile. Then it would add some kind of "analyse situation", which would either continue to react on the enemy or if it is destroeyed or away would continue the old tasks.

So you dont actually need to freeze the script. You need to set the elements into a list. Each frame the NPC would perform the current task, like turning into a direction or making a move or playing an animation. If the task is done, it is removed and the next one is performed. Something like headTo(treasureChest); would add a task to turn the NPC by some degrees each frame until it has the right direction.

29  Game Development / Performance Tuning / Re: Math.random() on: 2008-05-09 13:00:23
You could look into the source code of the Math or Random class and see, what it actually does. They should be pretty fast at all. You probably have to call random a lot to see an advantage when using a lookup table.

But generally the idea is true. Games only need a really limited amount of randomness, so storing some values and using them would be enough and is really faster. Its enough to store maybe 1000 values and if you used all, begin with the first again. You wont notice it.

30  Game Development / Performance Tuning / Re: 2D Game - Problems with Images (Memory & CPU) on: 2008-05-09 12:48:26
Just something general:
Using compatible BufferedImages often can improve performance. There are createCompatibleXXX methods around somehwere in the GraphicsConfiguration or so. I dont know what type of Image you get from ImageIO.

And second, no transparency is fastest, bitmask transparency is almost as fast, but full alpha is costly. PNG supports full alpha, and maybe even without having transparent areas, they are treatet that way?

I would try to create a compatible bitmask transparency image for your sprites.

Pages: [1] 2 3 ... 5
nelsongames (15 views)
2018-04-24 18:15:36

nelsongames (12 views)
2018-04-24 18:14:32

ivj94 (587 views)
2018-03-24 14:47:39

ivj94 (49 views)
2018-03-24 14:46:31

ivj94 (392 views)
2018-03-24 14:43:53

Solater (64 views)
2018-03-17 05:04:08

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

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

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

buddyBro (93 views)
2018-02-28 16:45:17
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!