Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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 ... 10
1  Discussions / Business and Project Management Discussions / Re: Recruitment for Team Technic on: 2014-12-25 08:48:35
i wasted 6 minutes on this image, that i will never get back! + uploading,posting,and typing all off this!

2  Discussions / Miscellaneous Topics / Re: My Pixel Theme Song! on: 2014-12-25 08:21:57
yes and thanks for your great feedback!
3  Game Development / Newbie & Debugging Questions / Re: [LibGdx] Sprite rotation with mouse on: 2014-12-24 11:09:03
set this in title [Solved]
4  Discussions / Miscellaneous Topics / Re: My Pixel Theme Song! on: 2014-12-24 08:20:31
its my first one so you cant expect miracles!
5  Discussions / Miscellaneous Topics / My Pixel Theme Song! on: 2014-12-23 10:16:28
Tell me what you think =D

<a href="http://www.youtube.com/v/jVdH-Z1_wG0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/jVdH-Z1_wG0?version=3&amp;hl=en_US&amp;start=</a>

6  Java Game APIs & Engines / Java 2D / Re: Firing bullet from gun's current position to mouse x & y position on: 2014-12-23 08:34:11
this might help you this is my projectile class it works fine!

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  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
package com.zgr.Projectile;

import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.Random;
import java.util.Vector;

import com.zgr.Traps.ProjectileLauncher.ProjectileType;
import com.zgr.assets.Map;
import com.zgr.assets.Vector2F;
import com.zgr.tile.Tile;

public class Projectile extends Rectangle{

   final int width = 8;
   final int height = 8;
   
   ProjectileType type;

   float timeStep=60f/60f;
   
   float turretX=0f;
   
   float turretY=0f;
   
   float bulletSpeed;
   
   float bulletX;
   float bulletY;
   
   boolean isAlive;
   /*
    * Fix The Detection Radius For the Projectile Trap
    * Fix 2 Networking tutorials
    * Fix So Projectile Shoots the bullets past player if thay dont hit
    * Fix So Projectiles Rotate!
    */


   public Projectile(float startX, float startY, float bulletSpeed, ProjectileType type) {
      isAlive = true;
      turretX = startX;
      turretY = startY;
      bulletX=turretX;
      bulletY=turretY;
     
      Random ran = new Random();
      int random = ran.nextInt(200);
      if(random > 150){
         bulletSpeed = random;
      }
     
      dirX = (float) (Map.player.xpos + 12 + Map.xOffset - turretX);
      dirY = (float) (Map.player.ypos + Map.yOffset - turretY);
      setBounds((int) (bulletX - Map.xOffset), (int) (bulletY - Map.yOffset), width, height);
      this.bulletSpeed = bulletSpeed;
      this.type = type;
   }
   
   public void render(Graphics2D g){
      if(isAlive){
         
         switch(type){
         
            case BOX:
               g.drawRect((int) (bulletX - Map.xOffset),(int) (bulletY - Map.yOffset), width, height);
            break;
            case ROUND:
               g.drawOval((int) (bulletX - Map.xOffset),(int) (bulletY - Map.yOffset), width, height);
            break;
         }
         
      }
     
   }
   float dirX;
   float dirY;
   public void tick(double deltaTime){
      if(isAlive){
         setBounds((int) (bulletX - Map.xOffset), (int) (bulletY - Map.yOffset), width, height);
         
         float dirLength= (float) Math.sqrt(dirX*dirX + dirY*dirY);
         dirX=dirX/dirLength;
         dirY=dirY/dirLength;
         
         bulletX=bulletX+(dirX*bulletSpeed*timeStep);
         bulletY=bulletY+(dirY*bulletSpeed*timeStep);
         
      }
   }

   public void setAlive(boolean b) {
      isAlive = b;
   }
   
   public boolean isAlive() {
      return isAlive;
   }
   
}
7  Game Development / Newbie & Debugging Questions / Re: Polygon Collision Detection!!!! on: 2014-12-23 08:31:25
Ok i will!!!!





- sy xD
8  Games Center / Android Showcase / Re: [FREE GAME][2.3+] Big Tower - Retro tower defense with custom towers with story on: 2014-12-22 15:56:37
looks awesome!
9  Games Center / Featured Games / Re: Minecraft on: 2014-12-22 14:15:17
 Cranky
10  Game Development / Newbie & Debugging Questions / Re: Polygon Collision Detection!!!! on: 2014-12-22 12:42:41
and how would i rotate that then?
11  Game Development / Shared Code / Re: Found Really Good Example Off How To Create Vector2! on: 2014-12-21 20:00:20
well its really good for beginners that does not know what vector2D class is, and that dont know how to create it xD
12  Game Development / Shared Code / Found Really Good Example Off How To Create Vector2! on: 2014-12-21 19:47:59
http://noobtuts.com/java/vector2-class

here you can see some more cool stuff
http://www.mathsisfun.com/algebra/vectors.html


its a really easy tutorial =D helped me understand what a vector class is xD never used vectors
but gona try to implement shooting when rotate so i read that vectors can help alot in that =D

enjoy =D
13  Game Development / Newbie & Debugging Questions / Polygon Collision Detection!!!! on: 2014-12-21 11:43:44
ok so i create my polygon right here

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
   Polygon poly;
   public void createDetectionRadius(Graphics2D g, int xpos, int ypos, double size, int width, int height){
      poly = new Polygon();
      poly.addPoint(xpos, ypos);
      poly.addPoint(xpos-(int)size*width, ypos+50+(int)size*height);
      poly.addPoint(xpos - width*3-(int)size*(int)size + height, ypos+(int)size*height*2-(int)size*2);
      poly.addPoint(xpos, ypos+(int)size*height*2);
      poly.addPoint(xpos + width*3+(int)size*(int)size - height, ypos+(int)size*height*2-(int)size*2);
      poly.addPoint(xpos+(int)size*width, ypos+50+(int)size*height);
      g.drawPolygon(poly);
   }


here is where i do the method
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  
      if(Map.player.detectedPlayer){
         double dx = xpos - Map.player.xpos + 8 - Map.xOffset;
         double dy = ypos - Map.player.ypos - Map.yOffset;
         
         rotation = -Math.atan2(dx, dy);
         
         rotation = Math.toDegrees(rotation) + 180;
      }
     
//      g.rotate(rotation,
//            xpos - Map.xOffset + width / 2 ,
//            ypos - Map.yOffset + height / 3);

      g.rotate(Math.toRadians(rotation),
            xpos + width / 2 - Map.xOffset,
            ypos + height / 3 - Map.yOffset);
      //HERE!!!!!!!!!!!!!
      createDetectionRadius(g,
            (int) (xpos - Map.xOffset + width / 2)
            ,(int) (ypos - Map.yOffset + height - height / 3), 5, 20, 20);
                //HERE!!!!!!!!!!!!!
     
      g.drawImage(pipe, (int) (xpos - Map.xOffset),(int) (ypos - Map.yOffset), width,height,null);
     
      if(Map.player.detectedPlayer){
         g.setColor(Color.RED);
      }else{        
         g.setColor(Color.WHITE);
      }
     
      g.drawLine(
            (int) (xpos + width / 2 - Map.xOffset),
            (int) (ypos - Map.yOffset),
           
            (int) (xpos + width / 2 - Map.xOffset),
            (int) (ypos + detectionSize+width*4+20 - Map.yOffset));
     
      g.rotate(-Math.toRadians(rotation),
            xpos + width / 2 - Map.xOffset,
            ypos + height / 3 - Map.yOffset);


when the polygons are draw thay do rotate and all, its just that the collision does not work, the collision box does not rotate with the drawn polygons!!

1  
2  
3  
4  
5  
6  
7  
      if(poly != null){
         if(poly.intersects(Map.player.getBounds())){
            Map.player.isDetected(true);
         }else{
            Map.player.isDetected(false);
         }
      }


the collision does not move or rotate so it wont work

tell me if you want better explanation on what all variables are!

here are 2 images of what is happening


the red lines are where the collision is so the collision polygons are not rotating for some reason!

here is me standing the the box // thats why the colors changed!


so basically the collision works but the collision polygons wont rotate with the drawn polygons!
14  Game Development / Newbie & Debugging Questions / Re: Rotation Problem! on: 2014-12-19 13:36:23
yes =/
15  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 13:30:47
yeah but if you search for your username its "more then likely not gonna show up"
but if you search for channel url name you find it right away
16  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:26:12
you but i cant change the channel URL my channel url is InidDevo
17  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:18:01
then i need to start over i have over 80 videos there xD

                        - IndieDeveloper

hm... well that can work ^

Well now it looks silly, because it sounds more like your signing all your posts with a job title. Wink

hahahaha you made my day xD
18  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:14:55
then i need to start over i have over 80 videos there xD

                        - IndieDeveloper

hm... well that can work ^
19  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:10:44
if i did i need to...


create new posts for my 2 Games and that will be kinda spamming? wont it
and ppl will be confussed on why there is 2 ppl that has the same posts

i need to re earn my rank
i need to re earn my medals

so yeah...

but if you could transfear all data from this account over to IndieDeveloper that would be great =D
20  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:07:33
my youtube name is IndieDeveloper xD so i want it to be here to =D
21  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:04:40
i don't use both i just wanted to make sure nobody stole the name xD
22  Discussions / Miscellaneous Topics / Re: Change My JGO Name on: 2014-12-19 12:00:07
You should really PM Riven about this type of thing, not make a thread about it.

- Jev

just did


ok riven , what do i need to do to change name?, i'am an active user here on jgo am online every day and has been since i registered =p
23  Discussions / Miscellaneous Topics / Change My JGO Name on: 2014-12-19 11:56:13
i i own the account that is called "IndieDeveloper"

i would like to change my name from VirtueeL to IndieDeveloper is it possible???
24  Games Center / WIP games, tools & toy projects / Re: Horizon (2D Free roam game) WIP on: 2014-12-19 11:41:58
you might want to create some better textures for the game and make it more fitting, the grass for example i guess its wool from minecraft?

other then that its greate!
25  Game Development / Newbie & Debugging Questions / Rotation Problem! on: 2014-12-19 09:50:54
so when i do "g.rotate(0.01);" it rotates everything

tiles,text,player,backround

even if i only do it before i draw the player and after i draw the tiles,text,backround

ok here is an image!


it rotates everything

//RENDERS BACKROUND

//RENDERS TILES

//ROTATES * But Rotates All Off The Rendered Things!??
//RENDERS PLAYER
26  Discussions / Miscellaneous Topics / Re: Markus bought a new house on: 2014-12-19 09:41:00
dont ask me why, but you do it to =p

27  Game Development / Networking & Multiplayer / Re: Java Networking Tutorials Using [GNetLib] For Beginners! [part 6 / 12] on: 2014-12-19 07:37:39
i will look in to this!
28  Discussions / Miscellaneous Topics / Re: Should i learn lwjgl instead of java2D on: 2014-12-18 13:49:21
thanks!
29  Discussions / Miscellaneous Topics / Re: Should i learn lwjgl instead of java2D on: 2014-12-18 10:04:46
ik how to make games i know basic collision prevention,map loading, creating gameStates, loading spriteSheets and stuff like that!

i just want them to be smoother and implements lights and stuff like that!
30  Discussions / Miscellaneous Topics / Re: Should i learn lwjgl instead of java2D on: 2014-12-18 09:59:01
so libgdx or lwjgl =/ what one do you recommend for 2d platformers
Pages: [1] 2 3 ... 10
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (23 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (78 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (95 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (151 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!