Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 10
 11 
 on: 2017-12-15 21:11:03 
Started by buddyBro - Last post by Jono
@Jono is very knowledgeable on this topic, he's actually taught A* and other algorithms in class. He provided some good tips for me here:
http://www.java-gaming.org/topics/a-pathfinding-through-2d-polygons/19539/msg/156371/view.html#msg156371
And I'm still lurking here! Not a lot to add though as this all looks pretty slick to me.

I've implemented a similar style of map pathing between entrance/exit nodes of map areas taken from a fixed set (this would be analogous to having a fixed set of room layouts in these maps). The areas had additional static obstacles inside them and I pregenerated flow fields towards each exit for every room. The flow fields might work around movement problems with non-rectangular rooms too I suppose.

 12 
 on: 2017-12-15 18:12:40 
Started by buddyBro - Last post by buddyBro
Got a simple lighting demo up and running, now need to integrate with the main java app.

Click to Play


Click to Play

 13 
 on: 2017-12-15 09:42:31 
Started by Apo - Last post by Apo
Day 15: Square

Today it is easy. You have to visit all blue tiles one time.

Solve 25 levels to get the hint of the day.

Controls
Move with the cursor keys


 14 
 on: 2017-12-15 05:55:55 
Started by HarryS - Last post by bmanmcfly
My process:

- don't stress yourself, play a lot, don't read, play!
- write down your ideas, just 2 row, write down 50 ideas
- pick 5 of them, build a mindmap with all details you are able to do, research competitors and so on
- pick 2 ideas, build a little demo, let others play it, get feedback
- pick best one and build it

Find your unique way!  Do you like platformer like super mario bros? Why? How to change some little elements and be unique ? Ideas are cheap, execution matters. Do you want to build a new chess? do it! Change some rules, check if could be fun

In my experience is more important to try it, do it, and find your unique way. Don't copy or search of other's ideas, find your ideas, something that you care, because develop a game is hard! Cheesy

my 2 cents


Not that I've ever actually finished anything notable, more generally is just taking things one day at a time.  Right now is getting the turn system for a simple tactics / dungeon crawler... it's all just cco material, not what I would sell, but want to know how to make the something bigger.

There's too much garbage on the app store that annoys me and it motivates me to keep trying.. Anyway.

Do a little bit each day, force it for an hour and sooner or later you'll look at it and be like "I did that.".. same thing if you want to get bulky whatever... just start and eventually you'll see some physical return on investment.

Never forget the 90-10 rule... you get 90% done in 10% time and you get the last 10percent in 90% time.  Also, whatever is worth while is never easy.

One more thing I could add would be to just make what you find fun and take it from there?

Good luck.

 15 
 on: 2017-12-15 03:41:03 
Started by HarryS - Last post by corey6
Nice suggestion Gornova. People are such strange creatures, full of hope but easily distracted...

 16 
 on: 2017-12-14 23:33:36 
Started by BurntPizza - Last post by FabulousFellini
Did some more work on my game.
<a href="http://www.youtube.com/v/oxdzuHwnB9s?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/oxdzuHwnB9s?version=3&amp;hl=en_US&amp;start=</a>

Lookin good man!

 17 
 on: 2017-12-14 22:59:34 
Started by BurntPizza - Last post by kingroka123
Did some more work on my game.
<a href="http://www.youtube.com/v/oxdzuHwnB9s?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/oxdzuHwnB9s?version=3&amp;hl=en_US&amp;start=</a>

 18 
 on: 2017-12-14 22:29:04 
Started by buddyBro - Last post by buddyBro
Here's the fix I promised for the getting stuck on corners. The issue was just too large of an epsilon (I was using 1) when trying to determine when to turn the corner. So basically, when the character reached within 1 unit of the node, it would move on to the next corner, but that was way too large, I'm using 0.1 now.

Click to Play


@theagentd, yes non-vertical/horizontal walls in a grid-system would produce a lot of nodes with this algorithm. I wonder if we added the notion of major and minor nodes, where a nodes, where major are the one's diagonal from walls, and minor nodes are the one's both diagonal and adjacent from walls; then for pathfinding we use only major nodes for pathfinding, unless we get stuck. I think this might work, since an optimal path would not be dipping into the cracks of the diagonal walls.

@CommanderKeith, that is very helpful, my next steps are to add a lightning system. Such as the characters can only see the parts they have line of sight for; the human can only see x units with light turned off, and y units with light turned on; the monster can see in dark just fine; but if the human turns on light, then the monster may see the light cast by the human. I'll definitely take a look at those posts to see what kind of optimizations I can do for this lighting system.

 19 
 on: 2017-12-14 21:59:21 
Started by bornander - Last post by bornander
To implement one-way platforms (that is a platform the player can jump up through, but will not fall down through) I hook into the Box2D contact listener.
My game entities can be either Contactable or Collidable, they're both sort of similar but have slightly different capabilities:
  • Contactable
    The entities are notified when a contact occurs, at which point they're given the other object and their Fixture that was involved in the contact.
  • Collidable
    The entities are notified when a collision occurs and can tell Box2D to cancel the collision before any collision response have been applied.
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  
      world.setContactListener(new ContactListener() {
         @Override
         public void preSolve(Contact contact, Manifold oldManifold) {
            Fixture fixtureA = contact.getFixtureA();
            Fixture fixtureB = contact.getFixtureB();
           
            Object userObjectA = fixtureA.getUserData();
            Object userObjectB = fixtureB.getUserData();
           
            boolean disableContact = false;
            if (userObjectA instanceof Collidable)
               disableContact |= ((Collidable)userObjectA).collides(userObjectB);

            if (userObjectB instanceof Collidable)
               disableContact |= ((Collidable)userObjectB).collides(userObjectA);
           
            contact.setEnabled(contact.isEnabled() && !disableContact);
         }
         
         @Override
         public void postSolve(Contact contact, ContactImpulse impulse) {
            contact.setEnabled(true);
         }
         
         @Override
         public void endContact(Contact contact) {
         }
         
         @Override
         public void beginContact(Contact contact) {
            Fixture fixtureA = contact.getFixtureA();
            Fixture fixtureB = contact.getFixtureB();
            Object userObjectA = fixtureA.getUserData();
            Object userObjectB = fixtureB.getUserData();
           
            if (userObjectA instanceof Contactable)
               ((Contactable)userObjectA).handleContact(fixtureA, userObjectB);

            if (userObjectB instanceof Contactable)
               ((Contactable)userObjectB).handleContact(fixtureB, userObjectA);        
         }
      });


Using these interfaces the Player entity can check when the collision occurs if it is with a part of the terrain that has been marked as one-way, and if it is, cancel it.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
         if (terrain.isOneWay()) {
            if (isFallThroughOneWayPlatformsEnabled())
               return true;
           
            if (isMovingUp())
               return true;
            else {
               float py = body.getPosition().y;
               float ty = terrain.getVerticalPosition();
               boolean playerCenterIsBelowTerrain = py < ty;
               
               if (playerCenterIsBelowTerrain)
                  return true;
               else {
                  boolean playerCenterIsMostlyAboveTerrain = py - ty < Player.bodyRadius * 0.975f;
                  if (playerCenterIsMostlyAboveTerrain)
                     return true;
               }
            }
         }


It requires a bit of logic to determine if the Player is sufficiently above the platform (in my case 2.5% of the size radius of the player)  to enable it, also to allow the player to drop down through a platform on command.

I thought it would be tricky to-get one-way platforms to work but it turned out to be a lot easier than dealing with other edge-cases of the implementation.

 20 
 on: 2017-12-14 21:07:42 
Started by Apo - Last post by Apo
Day 14: Wrapping Paper

Move and fold paper strips by dragging them with the mouse.
Use them to join dots placed on the screen.

Solve 15 levels to get the hint of the day.


Pages: 1 [2] 3 4 ... 10
 
Ecumene (150 views)
2017-09-30 02:57:34

theagentd (225 views)
2017-09-26 18:23:31

cybrmynd (302 views)
2017-08-02 12:28:51

cybrmynd (290 views)
2017-08-02 12:19:43

cybrmynd (298 views)
2017-08-02 12:18:09

Sralse (291 views)
2017-07-25 17:13:48

Archive (979 views)
2017-04-27 17:45:51

buddyBro (1103 views)
2017-04-05 03:38:00

CopyableCougar4 (1680 views)
2017-03-24 15:39:42

theagentd (1430 views)
2017-03-24 15:32: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!