Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (594)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 7 8 [9] 10
 81 
 on: 2015-07-03 13:14:25 
Started by Therobodavo - Last post by Therobodavo
The thing that I didn't understand was... when I create my objects, it's within a level class file. That file in itself is already being rendered through the game loop. OpenGL is started up by then, it's just I'm trying to loop up a texture within the constructor of an object. I saw some people say it's what you said, but others said I'm just trying to do too much in the constructor :/. I don't know which is correct, but my only thought for this is just to put it in my draw method, and just have a counter to make sure it only runs once (setTexture).

 82 
 on: 2015-07-03 13:00:04 
Started by Therobodavo - Last post by Phased
you got to start the OpenGL first before you can declare a texture, so creating a texture can not be your first thing, you must initialize OpenGL, then create your texture.

You are also correct, you want to reuse the same texture.

 83 
 on: 2015-07-03 12:36:41 
Started by Therobodavo - Last post by Therobodavo
Ok, I guess the issue is that I can't set a texture in the constructor? Well, talking about optimizing, what's the best way to set a texture then? Before I just set it every time it would draw, but I could see how that is bad. I have a feeling there's a better way of rendering textures and using them, plus spritesheets are a whole other issue. Welp, if anyone has advice that would be great for textures/rendering.

 84 
 on: 2015-07-03 12:31:51 
Started by Ivan Vinski - Last post by Ivan Vinski
I figured out this edge sliding thing yesterday. My movement is completely the same as the one in the NES Bomberman game. I will write a short article about it in a few days. But, the code that handles it all is this:

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  
79  
80  
81  
82  
83  
   public boolean isPositionValid(float x, float y){
      try{
         Map map = getMap();
         
         for(int i = 0; i < collisionPoints.size(); i++){
            int collisionTileX = (int) ((x + collisionPoints.getX(i)) / map.getTileWidth());
            int collisionTileY = (int) ((y + collisionPoints.getY(i)) / map.getTileHeight());
            if(map.isBlocked(collisionTileX, collisionTileY)){
               int tileX = getTileX();
               int tileY = getTileY();
               
               Vector2 position = map.getPositionRelativeToTile(this);
               float edgeX = map.getTileWidth() / edgeSensitivity;
               float edgeY = map.getTileHeight() / edgeSensitivity;
               
               if(face == Map.NORTH){
                  if((position.x < edgeX) && (position.x > 1)){
                     if(canTry[Map.WEST] && !map.isBlocked(tileX, tileY - 1)){
                        moveHorizontally(-(speed * getMap().getGame().getDelta()));
                     }
                  }else if((position.x > -edgeX) && (position.x < 1)){
                     if(canTry[Map.EAST] && !map.isBlocked(tileX, tileY - 1)){
                        moveHorizontally(speed * getMap().getGame().getDelta());
                     }
                  }
               }
               
               if(face == Map.SOUTH){
                  if((position.x < edgeX) && (position.x > 1)){
                     if(canTry[Map.WEST] && !map.isBlocked(tileX, tileY + 1)){
                        moveHorizontally(-(speed * getMap().getGame().getDelta()));
                     }
                  }else if((position.x > -edgeX) && (position.x < 1)){
                     if(canTry[Map.EAST] && !map.isBlocked(tileX, tileY + 1)){
                        moveHorizontally(speed * getMap().getGame().getDelta());
                     }
                  }
               }
               
               if(face == Map.WEST){
                  if((position.y < edgeY) && (position.y > 1)){
                     if(canTry[Map.NORTH] && !map.isBlocked(tileX - 1, tileY)){
                        moveVertically(-(speed * getMap().getGame().getDelta()));
                     }
                  }else if((position.y > -edgeY) && (position.y < 1)){
                     if(canTry[Map.SOUTH] && !map.isBlocked(tileX - 1, tileY)){
                        moveVertically(speed * getMap().getGame().getDelta());
                     }
                  }
               }
               
               if(face == Map.EAST){
                  if((position.y < edgeY) && (position.y > 1)){
                     if(canTry[Map.NORTH] && !map.isBlocked(tileX + 1, tileY)){
                        moveVertically(-(speed * getMap().getGame().getDelta()));
                     }
                  }else if((position.y > -edgeY) && (position.y < 1)){
                     if(canTry[Map.SOUTH] && !map.isBlocked(tileX + 1, tileY)){
                        moveVertically(speed * getMap().getGame().getDelta());
                     }
                  }
               }
               
               return false;
            }
         }
      }catch(StackOverflowError e){
         if((face == Map.WEST) || (face == Map.EAST)){
            canTry[Map.NORTH] = false;
            canTry[Map.SOUTH] = false;
         }
         
         if((face == Map.NORTH) || (face == Map.SOUTH)){
            canTry[Map.WEST] = false;
            canTry[Map.EAST] = false;
         }
         
         return false;
      }
     
      return true;
   }
   

 85 
 on: 2015-07-03 12:21:42 
Started by Dregron - Last post by Dregron
Hi All,

I have created a game and it is currently in beta, i am looking for people with all type of android devices to try it out. The game is a Arcade/Space/Shooter, you attempt to complete the levels gain resources buy weapons and complete levels with highest rank you can get. The higher rank you get the more resources you get to but more weapons/ammo.

Simple game, but very hard to complete!

To join as a beta tester request to join community on google+ (https://plus.google.com/communities/113413062813757527870…)

I am looking for some feedback, the game is hard and that is intentional.

 86 
 on: 2015-07-03 10:11:38 
Started by bornander - Last post by ags1
Good to see you have kept the cartoony effects on death, although I would to see similar over-the-top effects for all deaths. Sometimes the sprite explodes in red, and other times there is just a quiet message saying DIED. Maybe for incinerations you could have a mushroom cloud animation?

 87 
 on: 2015-07-03 09:20:44 
Started by philfrei - Last post by MrPizzaCake
@SHC
Yeah, saw that one on FB. One of the few internet jokes I actually lol'd about.

 88 
 on: 2015-07-03 09:15:44 
Started by bornander - Last post by bornander
Feels more like a gameplay teaser than a trailer. I think it could be easily condensed to one minute, I doubt most people that browse through games on the market will watch a 2 1/2 minute video.

That's a fair point, I'll make another one where there's less pointless walking around.
I'll also do a build where the texts on the signs aren't showing up because it's just confusing in the trailer when there's not enough time to read it anyway.

Thank you for your suggestion, it's appreciated.

 89 
 on: 2015-07-03 08:50:44 
Started by Ivan Vinski - Last post by Springrbua
Just looked at the game yesterday. If i am not wrong, the game is a bit slower then then other bomberman-games and i guess, thats why the free movement works pretty good. It also has some "helping-function", so that you can easily switch direction.
It also has some tollerance, if only a small part of your body would collide with a block, it just corrects the position a bit, so that you don't collide anymore.
Also i noticed, that if you press "DOWN" and while pressing "DOWN" you alo press "RIGHT", it continues to walk down, until it is possible to walk right.

What i noticed is, that it is actually almost the same as tile-based movement, the only difference is, that you can STOP at any time. You can switch direction only on exact tiles, but you can always stop. So you might think about it like tile-based movement, which might make things easier, and make it possible to stop at any time.

 90 
 on: 2015-07-03 07:34:20 
Started by Archive - Last post by Archive
I have created a demo for you guys, it isn't much, I just wanted you guys to know what the feel of the game is like and how it works. Feedback is appreciated.

http://www.mediafire.com/download/nleul28qgrjnnnd/ShardMasterDemo.jar.zip

Pages: 1 ... 7 8 [9] 10
 
Riven (22 views)
2015-07-03 11:22:16

deepthought (46 views)
2015-06-30 15:39:44

deepthought (49 views)
2015-06-30 15:39:09

deepthought (62 views)
2015-06-30 15:36:52

Za\'Anzabar (34 views)
2015-06-29 05:44:54

TritonDreyja (45 views)
2015-06-24 17:10:40

CopyableCougar4 (44 views)
2015-06-23 00:34:45

BurntPizza (48 views)
2015-06-21 20:36:46

cookiecompiler (91 views)
2015-06-11 15:42:53

cookiecompiler (54 views)
2015-06-11 15:41:14
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14
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!