Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Games Center / WIP games, tools & toy projects / Collectible Card Game on: 2016-12-22 04:36:06
I've been working on a collectible card game recently (think crappy Hearthstones or Spellstones).


So the obvious question is, what is SPECIAL about THIS particular collectible/trading card game?

Well I plan on making it so that players who have seen the card a lot gets an increasing probability of "discovering" that card, and adding it to his inventory. So for example, the player has seen/fought a "dragon" card around 30 times in the last ten matches. Then that player will have a sizable chance of obtaining that dragon card. Any thoughts on this mechanic??? I probably will have to mess around with the probability distribution until it seems not too easy and not too grindish.

And of course players will be able to trade cards with each other.






Picture:



Features:
  • Custom text file format for easily creating new cards with no programming required
  • Supports special abilities, such as poison, pierce, bloodthirst, etc. (full list in Github link at bottom of this post)

It uses JavaFX for graphics and slf4j for logging. Tongue

In the near future, I'm planning to implement networking. The code itself is split into a server and a client, and the server creates a new thread for each game.

Disclaimer: Right now, the server just creates a new thread for a single mock game, which also comes with a mock client, while I'm procrastinating in implementing networking. Also, I haven't got mouse events to work yet, so all actions are input in the IDE console, and the client is just visualizing all the user actions and game simulation.

I feel this short description doesn't do my project much justice, so feel free to look over the full description on the project Readme (and code!) in Github.

https://github.com/GreenLantern101/Cards.
2  Game Development / Game Mechanics / 2D shooter game weapon class structure on: 2015-12-21 02:21:37
So I'm trying to make a 2D shooter game from scratch using the best possible code architecture, and I can't decide on structure for the weapons class (and subclasses)

So I have a base Weapon class, and it has properties like damage, bullet speed, reloading time, clip size, etc.
But then the problem is how do I create weapons with tracking projectiles or shotguns or lasers (how should the inheritance structure look like?)

I guess I don't really want to have:  "boolean tracking; boolean laser; int numBulletsPerShot;" because that would be kind of clunky.
3  Game Development / Newbie & Debugging Questions / LibGDX game logic and rendering sync in loop on: 2015-12-20 22:44:18
I've just started LibGDX (read most of the wiki) and I've noticed in some examples there is a game logic update method call inside the game render loop, which effectively is the game main loop. Doesn't this mean that the logic updating will only be done at the same rate as the graphic rendering loop? So then if the logic update method takes 500ms (extreme case), then i will get max 2fps??

*I understand that there is a delta time parameter to keep the logic simulation speed independent of hardware.
4  Game Development / Game Play & Game Design / Re: Polygon spaceships art style? on: 2015-02-20 03:32:02
Actually, all I really care about is the outline, so  it's just an array of points that are connected by line segments.
5  Game Development / Game Play & Game Design / Re: Polygon spaceships art style? on: 2015-02-20 02:45:53
Elsealabs, I really do like the look of low-poly, but I edited the post(I meant for 2D top view), such as how to improve the looks of .
6  Game Development / Game Play & Game Design / Polygon spaceships art style? on: 2015-02-20 01:13:24
How should I make attractive graphics for my polygon spaceships? I'm letting the user draw their own polygons, which may be spiky, square shaped, whatever, but how should the graphics style be? I've already thought about neon vector graphics, but that's just plain boring. Any suggestions?

EDIT: I meant for mainly 2D top view...
7  Game Development / Game Mechanics / Infering angles on: 2015-02-18 21:14:39
How do I make it so that with your mouse it is possible to direct an airplane like so: Steambirds (http://www.steambirds.com/)? How do I compute and draw the black line that you make to move the airplane?
8  Games Center / WIP games, tools & toy projects / Re: Airships: Conquer the Skies on: 2015-02-08 03:49:55
That new coat of arms mechanism adds so much more freedom to strategizing and decor! Well done indeed! But quick question about the dragons: will they be neutral and in battles randomly, or are they more like bossfights?
9  Games Center / WIP games, tools & toy projects / Re: The Minecraft RPG on: 2015-02-08 03:47:05
Take inspiration for LOTR (Lord of the Rings) or from some Dungeon and Dragons style game. I think Minecraft is a little lacking in the "epic-castle" department.  Roll Eyes
10  Games Center / WIP games, tools & toy projects / Re: Horizon (Freeroam MMORPG) WIP on: 2015-02-01 02:02:39
good job so far giving regular updates
11  Games Center / WIP games, tools & toy projects / Re: Horizon (Freerome MMORPG) WIP on: 2015-01-04 04:07:56
Looks really cool with impressive tile handling capabilities. Is the github repo updated to version .19? The readme says .18???

And how do I activate multiplayer?
12  Games Center / WIP games, tools & toy projects / Re: Defiance - An open-source multiplayer 2D shooter game in Java. on: 2014-12-30 21:12:18
Are you sure? The bots inherit from player class directly, using the same vars, and same update loop, and the maxSpeed var is set once and never changed...

When you change directions, there's an extremely small lag in direction changing, and then you must accelerate back to your maxSpeed. So you'll move faster if you move in solely one direction, for example.
13  Games Center / WIP games, tools & toy projects / Re: OGServer -- A simple, easy to use, Game server framework/api. on: 2014-12-29 14:32:50
could you give some stats (num users connected, lag millisecs, type of application ran, size of packet, packet freq, etc.?)
14  Games Center / WIP games, tools & toy projects / 2D Tiling system on: 2014-12-28 23:44:57
Just a pet experiment, not yet being used for any of my games, is a 2D tiling homebrewed system I made. It is dynamically generated, with each tile being its own class, and so doesn't need to be "imported" or anything. I made it so that it can display square, hexagonal, and a more exotic equilateral triangle representation.

Features:
  • A grayscale minimap (red rectangle shows where you are)
  • Full zoom in/out support
  • Randomly generated map, but the random generator can be seeded to reproduced the same map. Random generator is based on perlin random generation
  • Only draws the tiles that the user can actually see on screen, although minimap is of all the tiles

A triangle version

The hex version ( a different map)


The map sizes right now are approximately set at 500 by 500 tiles. I can make it different sizes, but it slows down around 1000 X 1000. I'm using just Java2D. I should probably use OpenGL or some type of wrapper.
15  Games Center / WIP games, tools & toy projects / Re: Defiance - An open-source multiplayer 2D shooter game in Java. on: 2014-12-27 22:51:12
I know that name is not unique, and I just meant for it to be a temporary name for this project, which seems fitting given the nature of the fast-paced against-all-odds type gameplay.
16  Discussions / Miscellaneous Topics / Re: Should i learn lwjgl instead of java2D on: 2014-12-27 19:57:20
My two cents is to take your time and think about what you will really need, and then use whatever framework/binding/lib/whatever has what you will really work with. No need getting LibGDX if you only want to use OpenGL, for example. One thing to really keep in mind is that when you start learning the API for one tool, it may be harder to switch to another tool with a totally different API.
17  Discussions / Miscellaneous Topics / Re: Building a new PC on: 2014-12-27 19:53:53
I'm more of an HP fan than a Dell fan, but that's just me. And I go Linux Mint with Cinnamon Desktop environment, which is pure awesomeness. Runs so lightly and boots up lightning fast.
18  Discussions / Miscellaneous Topics / Re: School writing project on: 2014-12-27 19:50:45
I hate to say this, but there seems to be a couple of cliches (Tears distorting my vision, ending a chill of realization down my spine), but a very well done story nonetheless. Make a Kindle Single and get some money for that, might as well.
19  Discussions / Miscellaneous Topics / Re: Best way to learn to touch-type on: 2014-12-27 19:46:20
Way back in middle school, I remember using http://www.typingweb.com/typingtutor/, which has these random typing games that really force you to practice. Learned to touch type in like 10 days. Not kidding.
20  Discussions / Miscellaneous Topics / Re: C#, did Microsoft just want to be different? on: 2014-12-27 19:43:56
I've been using C# for three years, and I think the implicit operators are my favorite thing that Java still has to catch up on. And, that Winforms visual editor is kick butt.
21  Discussions / Miscellaneous Topics / Re: Does it look good? on: 2014-12-27 19:40:27
Try adding a little bit of parallax background instead of the sky-blue expanse. And while flat might be stylish, there's a difference between elegance and emptiness, and its up to the individual developer to find a line to draw.
22  Discussions / Miscellaneous Topics / Re: What is with version 3? on: 2014-12-27 19:34:57
Anyway, back on topic... GPL v3 is somewhat less popular than GPL v2, and even Linus Torvalds stuck with GPL v2 for Linux.
23  Game Development / Shared Code / 2D Easy to use particle engine on: 2014-12-27 18:13:01
So here are just two classes in my (super bare)particle engine. Basically to use, just make an arraylist of ParticleEmitters in the testing class, and then iterate through that for the moving and drawing methods.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Point2D;
import java.util.Random;
    public class Particle
    {
        final int lifetime = 30; Color color; double age = 0; int radius = 1;
        Random r = new Random();
        Point2D.Float  movement= new Point2D.Float(0,0);
      public Particle(Point2D.Float  loc, double angle_deg, Color color, float speed, int radius)
      {

            this.loc = loc; this.radius=radius; this.color = color;
         
            movement.x = speed * (float)Math.cos(Math.PI * angle_deg / 180);
            movement.y = speed * (float)Math.sin(Math.PI * angle_deg / 180);
      }
     
      Point2D.Float loc;

      public boolean shouldRemove = false;
     
      public void Move()
      {
            loc.x += movement.x; loc.y += movement.y;
         age ++;
         if (age >= lifetime) {
                shouldRemove = true;
         }
      }
     
     
     
      public void Draw(Graphics g)
      {
         Color col = new Color(color.getRed(), color.getGreen(), color.getBlue(),
               (int)Math.max(255 - (age / lifetime * 255), 0));
           
         g.setColor(col);        
         g.fillOval((int)(loc.x - 1), (int)(loc.y - 1),radius, radius);
      }
    }





1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Random;

public class ParticleEmitter
    {
        public ArrayList<Particle> particles = new ArrayList<Particle>();
        protected Random r= new Random();
        /// <summary>
        ///Initialize particle emitter
        /// </summary>
        public ParticleEmitter(Point2D.Float loc, Color colorA, Color colorB, int population)
        {
            if (population > 0)
            {
               //used to be min of 10
                int n = Math.max(10, (int)Math.floor(Math.sqrt(population)));
                int scatter = (int)Math.floor(Math.sqrt(population) / 4) + 5;
                for (int i = 0; i < n; i++)
                {
                    //alternate colors
                    Color c = colorA;
                    //if even
                    if (i%2 == 0) c = colorB;

                    //slightly random centering and angle and size
                    Point2D.Float pt_new=
                          new Point2D.Float(loc.x+ randInt(-scatter, scatter),
                          loc.y+ randInt(-scatter, scatter));
                    particles.add(new Particle(pt_new,
                        randInt(0, 360), c,
                        (float)Math.max(1, Math.sqrt(population) / 10) * 1f, randInt(2, 6)));


                }
            }
        }

        public ParticleEmitter() {
         // TODO Auto-generated constructor stub
      }

      /// <summary>
        ///draws all the particles from this particle emitter
        /// </summary>
        public void DrawParticles(Graphics g)
        {
           //basically, a foreach loop
            for(Particle p : particles)
            {
                p.Draw(g);
            }
               
        }
        /// <summary>
        ///steps particles one frame forward
        /// </summary>
        public void MoveParticles()
        {
           //basically, a foreach loop
           for(Particle p : particles)
            {
                p.Move();
            }
                for (int i = 0; i < particles.size(); i++)
                {
                    if (particles.get(i).shouldRemove)
                        particles.remove(i);
                }
        }
        // a helper method to generate random number in a range
        public int randInt(int min, int max)
        {
           return r.nextInt((max - min) + 1) + min;
        }
    }



It looks pretty good...


24  Discussions / General Discussions / Re: Superfetch ugh on: 2014-12-27 17:58:21
Delete your windows registry keys for good measure.
25  Game Development / Newbie & Debugging Questions / Re: Screenshot Problem [LibGDX] on: 2014-12-27 17:50:36
I have a hunch that the problem lies in the photo viewer that your are using, since the file size is not 0, so it must contain the right data. Try viewing the screenshot in another photo viewer maybe?
26  Game Development / Networking & Multiplayer / Re: Working on game concept on: 2014-12-27 17:37:59
That's a very interesting idea. Maybe have some sort of circular world where all the players start relatively near each other in the center, but they can still expand to the outer rims of the circle later on?
27  Discussions / Java Gaming Wiki / Re: How do I start Java Game Development? on: 2014-12-27 17:31:59
Isn't Swing getting replaced by JavaFX, which features a Scene Builder? Personally, I've never used JavaFX, but it looks promising for user interfaces in general, but maybe not suited for games?
28  Discussions / Miscellaneous Topics / Re: Can't get enough keyboard? on: 2014-12-27 17:25:18
That is one huge breakfast.  Grin  (Put your teeth on the home row keys...)
29  Games Center / Showcase / Re: Multiplayer top-down view shooter on: 2014-12-27 16:56:55
Really sorry for reviving this, but I have managed to extend it, featuring the familiar WASD movement system relative to the mouse, among other changes: (just the few I could think up the top of my head)


Enhanced rocket, sniping rifle (faster, larger, damage)
Flamethrower now ignite area of ground on fire for some time
Added Q/E switch weapon key support
Changed to regular up/down/left/right movement system, and bots override it themselves
public chat messages for kills and killStreak(restarts when you die) and means of death
Enhanced regular canvas graphics
Fully implemented "assists" in kills
Player names now highlighted in chat system
Enhanced healthbar
Small reformatting of Performance Options menu, including show stats option
Flamethrower napalm sticks to walls
Rockets explode into shrapnel
Powerup added: GodlyArmor, which grants invincibility for 15 seconds (can't use more than one powerup at once)
Tranquilizer stop people from firing for a short time, rebalanced Tranquilizer gun
Limits on zoom in/ zoom out
Tranquilized bots now can resume firing later
Bots are now able to use godly armor and invisibility
Bots have secondary armament (pistol), better rocket launcher AI
Bots have basic chat
SpeedShoes item added
implemented personal messages/alerts
Removed item labels, so must run into them to find out what they are!
Updated Help Menu
Networking now works on local LAN, but slight lag for all client players on laptops, but not on desktops
Update code to use Apache Mina 2.0.9 instead of 1.1.5;
Organized imports, removing unnecessary references
Added cheats
Bullet trail on pistol, machinegun, rocket
Players can slide along walls & banks of water now
Can now aim the range of flamethrower and rocket launcher based on mouse
Added homing missile gun
implemented translucent Arc heads-up-display of ammo in clip
better console output for debugging, tracing
Reorganized files
Added Nailgun


Again, I started from SydneyEngine v. 0.2 which is a great framework in its own right.


So, here's a link to the new topic I started: http://www.java-gaming.org/topics/defiance-an-open-source-multiplayer-2d-shooter-game-in-java/35220/view.html
30  Games Center / WIP games, tools & toy projects / Defiance - An open-source multiplayer 2D shooter game in Java. on: 2014-12-27 16:49:36
Defiance - An open-source multiplayer 2D shooter game in Java.

Over the past week or so, I have worked diligently modifying the Sydney Engine multiplayer shooter game, written in Java originally by Keith Woodward in 2008, using the Apache Mina networking framework (version 2.0.9). I've added a boatload of new features, and improvements, including HUDs, particles, new weapons, and greatly improved the chat system, as well as killstreaks and so forth. I'm now putting it on github, and I hope someone could look at it and find a bug in the internet system.

Version 1.0.1

Website: http://greenlantern101.github.io/Defiance/
Wiki: https://github.com/GreenLantern101/Defiance/wiki

Grab the .jar file and play now! : Defiance.jar

Screenshot




Setting Up and Playing

Dependencies: The jars are included in the SydneyDependencyJars folder. Just load the Eclipse Project, and run the GameFrame.java class.

======[ Controls ]======

  • Move with Arrow keys or W, A, S, D
  • Left mouse click: fires weapon
  • R: reloads weapon
  • Number keys (1-9) or Q/E or Mouse wheel: selects available weapons
  • `[funny key above TAB]: turn on/off player names and hit points
  • Enter or Shift & Enter: Activate chat, then and once you've typed the message, press enter again to send. If shift is down when you first press enter, the 'send to allies' option is ticked
  • Page up or down: zoom in/ out
  • Escape: displays menu.

======[ Weapons ]======

  • Pistol - Basic weapon with low damage.
  • Machine Gun - Standard rapid-firing rotating gatling.
  • Flamethrower - Close-range weapon that sprays napalm that will stick around for a while, useful for area denial. The napalm will cause damage to anyone that walks over it.
  • Shotgun - Dual-shot weapon that fires a cloud of pellets. Most effective at close ranges.
  • Sniping Rifle - Accurate for long-distance one-hit kills, but slow-firing.
  • Tranquilizer Gun - Fires in short bursts, stunning enemies and slowing them and making them unable to fire.
  • Rocket Launcher - launches rockets that have a large explosion radius. More damage is dealt to objects that are closer to the epicenter of the explosion.
  • Homing Gun - launches three alien-technology orbs that will fire like a regular bullet unless there is an enemy in front of it, in which case it will automatically follow that target. The orbs are relatively slow, but are still useful around corners and against dug-in defenders.
  • Nail Gun - An alternative to the machine gun, that spits out 3 nails at once very rapidly, but watch out for your ammo depletion, since it comes with a small clip considering its rate of fire.

Note:
 Both the Flamethrower and the Rocket Launcher are Variable-Range weapons, that is, their bullets can detonate or stick at a certain range away from the weapon by using the mouse to aim.


======[ Items ]======

  • Healthpack - Restores 33% health.
  • Godly Armor - Grants invincibility against all weapons for 15 seconds, but player can still be tranquilized
  • Speed Shoes - Significantly speeds up travel.
  • Invisibility Shroud - Enemies can't see and target you for 15 seconds.

Note:
You can only use one of either the Godly Armor or the Invisibility Shroud, but not both. But, the Speedy Shoes can be used with anything.

======[ Extra ]======

The wi-fi on laptops may cause noticeable lag over local LAN, but still very playable.

This was slightly modified from the excellent Sydney Engine v. 0.2, made by Keith Woodward, whom can find me on the forums at www.javagaming.org or contact through keithphw@hotmail.com . If you'd like to expand on this game, you can download the source code of Sydney Engine on www.javagaming.org, just search for 'SydneyEngine'.



I have a small list of todos:

Fix internet gameplay, make networking more dependable
Achievements??? - 1st kill, 3rd, 10th, 20th, 30th, 50th, 75th, 100th, 150th, 300th, 500th kills Die 1 time, Die 3 times with no kills, Get 3 healthpacks, Get 3 invisibilities, Switch weapons 20 times, used each weapon at least once, killed with each weapon at least once, assist 25 times
Make personal pop-up alerts configurable
Enhance graphics
Mech Suits support?
Destructable walls- possibly by using subtractive polygons
Map Editor/Maker!


Contacts

Feel free to clone or fork it on github and all contributions are welcome.

Are there any suggestions or comments about this? Does anyone have any suggestions for improving the vector graphics?
Pages: [1]
 
EgonOlsen (74 views)
2018-06-10 19:43:48

EgonOlsen (55 views)
2018-06-10 19:43:44

EgonOlsen (74 views)
2018-06-10 19:43:20

DesertCoockie (254 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

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

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

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

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

Solater (172 views)
2018-03-17 05:04:08
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
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!