Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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
1  Game Development / Newbie & Debugging Questions / Re: Using ArrayList<> adding and removing objects on: 2013-10-22 21:05:40
Hm, i need re read question Wink
this help?
1  
2  
3  
4  
5  
6  
7  
8  
9  
   for(int i = 0; i < Bullets.size(); i++){
      Bullet bu = Bullets.get(i);  
      bu.blalbalball();
     
      if(bu.isDead()){
         Bullets.remove(i);
         i--;
      }
   }
2  Game Development / Networking & Multiplayer / Re: NAT traversal practical? on: 2013-10-11 20:20:56
Same interesting.
3  Game Development / Newbie & Debugging Questions / Re: How would I stop my game loop from running at thousands of FPS? on: 2013-10-04 15:57:51
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
//D.T = System.nanoTime();
   static private void Syncronize(int fps){
      long pred_Frame_Time = 1000L * 1000 * 1000 / fps;
      long next_Frame_Start_Time = pred_Frame_Time + Frame_End_Nanos_Syn;
      long curent_Time = D.T();
      long dif_Time_In_Nano = next_Frame_Start_Time - curent_Time - 100000;
     
      if(dif_Time_In_Nano > 0){
         long mily_Sleap = dif_Time_In_Nano / 1000000;
         int nano_Sleap = (int) (dif_Time_In_Nano % 1000000);
         try {
            Thread.sleep(mily_Sleap, nano_Sleap);
         } catch (InterruptedException e1){
            e1.printStackTrace();
         }
      }
      Frame_End_Nanos_Syn = D.T();
   }
4  Game Development / Newbie & Debugging Questions / Re: What is the best practice for updating a game? on: 2013-09-25 18:00:48
In any case best solution full code Jar redownload.
Resource part can be download separate or update part of it.

For PC I think better solution Separate Jar launcher that check Game and redownload it.
For Mobile its in game Web check for update on site and link to redownload game.
In any case resource must be separate from Code (exceptions resource low size =)).
5  Games Center / Cube World Projects / Re: The Architect (Voxel Engine) on: 2013-08-11 07:31:56
It will be not so simple add texture to Merged Vertex model unknown size.
Its possible but hard Wink
I think I know how, but I am not sure don’t have time to test Sad
(sorry that don’t sharing its may be stupid not working idea)

Nice project, good progress so far =)
6  Games Center / Cube World Projects / Re: The Architect (Voxel Engine) on: 2013-08-03 10:50:40
Block Picking is working

http://pastebin.java-gaming.org/ddc736e1252 for source.

If I understand you’r code(I may be wrong ^^) you have small bug
Lat say Ray go X+1 Y+0.8 : you check collision every X (x,y) (1. 0.8f), (2, 1.6f) (3, 2.4f)
But you skip Y side collision (1.25f, 1)

Also You create many useless objects that java GC then Delete

=)

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
    Vector3Int vec = new Vector3Int(MathUtils.floor(x), MathUtils.floor(y), MathUtils.floor(z));
               
               Block b = world.getTile(vec.x, vec.y, vec.z);
               if(b != null && b.solid)
               {
                  return new Face(b, vec, 0);
               }

               vec = vec.sub(new Vector3Int(1, 0, 0));
               
               b = world.getTile(vec.x, vec.y, vec.z);
               if(b != null && b.solid)
               {
                  return new Face(b, vec, 0);
               }
   


my Fix ^^
   
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
          
       int xii = MathUtils.floor(x);
       int yii = MathUtils.floor(y);
       int zii = MathUtils.floor(z);
       Block b = world.getTile(xii, yii, zii);
       if(b != null && b.solid)
       {
          return new Face(b, new Vector3Int(xii, yii, zii), 0);
       }
   
       xii -= 1;
       b = world.getTile(xii, yii, zii);
       if(b != null && b.solid)
       {
          return new Face(b, new Vector3Int(xii, yii, zii), 0);
       }
   
7  Games Center / WIP games, tools & toy projects / Re: Terrain rendering demo for Android on: 2013-06-24 17:54:49
You can find APK for download here: http://sdrv.ms/14mN4Ia
v0.30 is the latest one.
Ty

10-12 fps =)
Geo
Soar not support
prestigio pmp3270b
CPU Cortex A8
8  Games Center / WIP games, tools & toy projects / Re: Terrain rendering demo for Android on: 2013-06-24 10:23:27
Can you plz send me apk file, sorry don’t have wifi Wink
Really want see performance on my device.
9  Discussions / General Discussions / Re: System.nanoTime() versus System.currentTimeMillis() on: 2013-06-05 06:37:06
http://www.java-gaming.org/topics/java-system-system-currenttimemillis-error/29797/msg/274269/view/topicseen.html
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
            System.out.println(milli);
            int diff = (int) (nano / milli / 10000);
/*
16
15
16
0
Exception in thread "main" java.lang.ArithmeticException: / by zero
   at Main.TryItOut.main(TryItOut.java:18)
*/


same win XP Wink
10  Game Development / Performance Tuning / Re: Java System System.currentTimeMillis(); error on: 2013-06-04 23:10:15
Ty i fix for nanosec Wink
11  Game Development / Performance Tuning / Java System System.currentTimeMillis(); error on: 2013-06-04 20:42:59
Today using LWJGL(not sure maybe problem only with him)
I find error
1  
2  
3  
Thread.sleep(10); // sometimes after call sleep
System.currentTimeMillis();// milis returns same as before sleep
//Nano sec return right value


 I use this code to synchronize physics tic
1  
2  
3  
4  
      long time = System.currentTimeMillis();
      Frames_Dif_Milis = time - Frame_End_Milis;
      Frame_End_Milis = time;
      Thread.sleep(10);

But some times Frames_Dif_Milis == 0; Java 1.7
To fix error I use now nano sec difference Smiley
12  Discussions / Miscellaneous Topics / Re: if you are not a programmer, what would you be ? on: 2013-06-04 06:55:32
My dream job was always to be in Movie Special Effects. Like smoke and mirrors, and latex; no computers. Smiley Go figure.
My dream job is be Evil Genius  Roll Eyes or free scientist
Or Evil Genius Scientist XD

(Be scientist not so fun like be scientist with loyal minions Wink)
13  Discussions / Miscellaneous Topics / Re: if you are not a programmer, what would you be ? on: 2013-06-03 15:18:57
Painter or Musician (even when I programmer I want also be them =))

In real life, if I was not a programmer by money nothing was change(at all ^^),
but on the prospects I could count the promoter work as high work =)
(and like programmer I have many prospects to work. The Only problem I can’t find it XD)
14  Game Development / Newbie & Debugging Questions / Re: Smooth movement in 2d platformer on: 2013-05-25 11:25:01
IMHO
Make movement by float
With synchronize per frame

1  
2  
3  
4  
5  
float pos_X = 10;

pos_X += 4f * frame_SYN;// 60 fps base then if we have 30 frame_SYN = 0.5

Draw((int) pos_X, (int) pos_Y)


for collision system use (int)pos_X =)
15  Game Development / Newbie & Debugging Questions / Re: Multidimensional Arrays Question on: 2013-05-23 23:24:26
I think you ask this.
1  
2  
3  
get_Val(0, eImg) == eImg[0][0]
get_Val(1, eImg) == eImg[0][1]
get_Val(39, eImg) == eImg[3][9]

Ups sorry i think i finally understand what you want Wink
1  
2  
3  
   int ar[][] = new int[3][3];
     
   int ar2[] = ar[0];// ar2[1] == ar[0][1];

If I know from start you ask this, then I even not start Reply you – for so easy question XD
16  Game Development / Newbie & Debugging Questions / Re: Multidimensional Arrays Question on: 2013-05-23 21:21:04
1  
2  
3  
4  
5  
   public EncodedImage get_Val(int pos, EncodedImage ar[][]){
      int d_1 = pos / 10;
      int d_2 = pos % 10;
      return ar[d_1][d_2];
   }

=)
17  Game Development / Shared Code / Re: Snua - Create objects from XML on: 2013-05-22 06:11:20
Nice library and good idea, need find time and try Wink

P.s in source code so many cool things, and many of them even without feedback ;(
18  Games Center / Featured Games / Re: Daedalus on: 2013-05-19 23:58:32
Ty, simple looking way to do P2P on java XD
Or maybe I wrong I think 50%+ ppl have routers or firewalls and don’t know how open ports ^^
19  Games Center / Featured Games / Re: Daedalus on: 2013-05-19 20:49:56
I am interesting – you have multiplayer?
Hi works on UDP or TCP
You Create local Lan server or Internet Server,
If Internet
You use P2P or Own server bridge, or simple Own server like host?
Ty Wink
20  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-19 12:40:02
Yes, now you see that 4D is easy.
AABB do later, Have old AABB collis from World of Change project, but hi slow,
I want do new AABB ray cast collision Wink
Don’t want write crap code XD
21  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-18 12:06:37
Add new fun imgs, Roll Eyes

p.s Camera Movement in 4D really hard understand Visual , even for me who know and understand all his maths Wink
Technical its simple if vision Ray collis wall - you see wall,
you see wall - you know you can’t go there.

But its really hard predict next position where you will be,
its something like camera strafe in 3d(3 Vectors, base strafe in 3d game is 2d - you move on ZX Plane)
22  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-17 18:16:55
Quote from:  matheus23
If you wonder how to make those awesome-looking headers (the blue font), use headers:
=)
Add New 4D Img (Cube) Matrix

int[2][2][2][2] = Two matrix int[2][2][2] - All simple, Any programmer know about that =)
23  Game Development / Shared Code / Java Sector holding N-Size Tree – Quid =) on: 2013-05-17 13:46:02
Quid tree like Octree that Holds Sectors like chunks in minecraft.
Quid Grow Down, if minimum sector is 3 x 3 it can grow on 9 x 9 sector.

Main usage chunk holder =)

int size_Aray - Array Len By Axis
2 x 2 Base 2D Octree size.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
//Top Class
public class Quid_2D <E extends Quid_2D_Object>{
   private Quid_2D_Hold<E> Upper;
   
   public Quid_2D(int size_Aray){
      Upper = new Quid_2D_Hold<E>(size_Aray);
   }
   public void add_Object(Quid_2D_Object obj){
      Upper.add_Object(obj);
      Upper = Upper.get_Upper();
   }
   public E get_Object(GL_Vector_YX_int vec){
      return get_Object(vec.y, vec.x);
   }
   public E get_Object(int z, int x){
      E obj = Upper.get_Object(z, x);  
      return obj;
   }
}



1  
2  
3  
public interface Quid_2D_Object{
   public GL_Vector_YX_int get_Pos_Id();
}


1  
2  
3  
4  
   public GL_Vector_YX_int(int ypos, int xpos){
      y = ypos;
      x = xpos;
   }


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  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
public class Quid_2D_Hold <E extends Quid_2D_Object> implements Quid_2D_Object{
   int Side_Aray;
   int Size_Sector;
   
   Quid_2D_Hold<E> Up;
   GL_Vector_YX_int Quid_Pos;
   Object Quids_Grid[];
   boolean last;
   
   /**
    *  Data holding in array
    *  X X X -1 -1 -1 size 3
    *  X 0 X
    *  X X X
    *  
    *  X X X X -2 -2 -2 size 4
    *  X X X X
    *  X X 0 X
    *  X X X X
    */

   // z = y in code
   public Quid_2D_Hold(int size_Aray){
      int Dif = 0 - size_Aray / 2;//3 = 1// 4 = 2
      GL_Vector_YX_int quid_Pos = new GL_Vector_YX_int(Dif, Dif);//B
      Init(size_Aray, 1, quid_Pos);
      last = true;  
   }
   private Quid_2D_Hold(int size_Aray, int size_Sector, GL_Vector_YX_int Quid_Pos){
      Init(size_Aray, size_Sector, Quid_Pos);
   }
   private void Init(int size_Aray, int size_Sector, GL_Vector_YX_int quid_Pos){
      Size_Sector = size_Sector;
      Side_Aray = size_Aray;
      Quid_Pos = quid_Pos;
      Quids_Grid = new Object[Side_Aray * Side_Aray];//z x
   }
   public void add_Object(Quid_2D_Object obj){
      if(Check_Object_in(obj))
         add_Object_in(obj);
      else
         add_Object_Out(obj);  
   }
   public E get_Object(GL_Vector_YX_int vec){
      return get_Object(vec.y, vec.x);
   }
   public E get_Object(int z, int x){
      Quid_2D_Hold<E> quid = get_Upper();
      E obj = quid.get_Object_in(z, x);  
      return obj;
   }
   public Quid_2D_Hold<E> get_Upper(){
      Quid_2D_Hold<E> quid = this;
      while(quid.Up != null){
         quid = quid.Up;
      }
      return quid;
   }
////////////////////////////////////////////////////////////////////////
   private boolean Check_Object_in(Quid_2D_Object obj){
      GL_Vector_YX_int pos_Obj = obj.get_Pos_Id();
      return Check_Object_in(pos_Obj.y, pos_Obj.x);
   }
   private boolean Check_Object_in(int z, int x){
      int size = Side_Aray * Size_Sector;        
      int from_z = Quid_Pos.y;
      int to_z = from_z + size;      
      if(from_z <= z && z <= to_z){
         
         int from_x = Quid_Pos.x;
         int to_x = from_x + size;
         if(from_x <= x && x <= to_x){
            return true;
         }
      }
      return false;
   }
   
   private void add_Object_in(Quid_2D_Object obj){
      GL_Vector_YX_int pos_Obj = obj.get_Pos_Id();
      int z = pos_Obj.y - Quid_Pos.y;
      int x = pos_Obj.x - Quid_Pos.x;
      z /= Size_Sector;
      x /= Size_Sector;
     
      int pos_Ar = z * Side_Aray + x;
      if(last){
         if(Quids_Grid[pos_Ar] != null)
            throw new IllegalArgumentException("Quid2D Try create Double " + obj.get_Pos_Id());
         Quids_Grid[pos_Ar] = obj;
      }
      else{
         Quid_2D_Hold<E> in_Quid = (Quid_2D_Hold<E>) Quids_Grid[pos_Ar];
         if(in_Quid == null){
            in_Quid = Create_Quid_Down(z, x);
            Quids_Grid[pos_Ar] = in_Quid;
         }
         in_Quid.add_Object(obj);
      }
   }
   private void add_Object_Out(Quid_2D_Object obj){
      if(Up == null){
         Create_Quid_Up();
      }
      Up.add_Object(obj);
   }
   private Quid_2D_Hold<E> Create_Quid_Down(int z, int x){
      z = z * Size_Sector + Quid_Pos.y;
      x = x * Size_Sector + Quid_Pos.x;
      GL_Vector_YX_int quid_Pos = new GL_Vector_YX_int(z, x);
      int size_Sector = Size_Sector / Side_Aray;
      Quid_2D_Hold<E> down = new Quid_2D_Hold<E>(Side_Aray, size_Sector, quid_Pos);
      if(size_Sector == 1)
         down.last = true;
      down.Up = this;
      D.S("Create Down " + down);
      return down;
   }
   private void Create_Quid_Up(){
      int size_Sector = Size_Sector * Side_Aray;
      //Midls pos
      int Dif = 0 - Side_Aray / 2;
      Dif *= size_Sector;
      int z = Dif + Quid_Pos.y;
      int x = Dif + Quid_Pos.x;
      GL_Vector_YX_int quid_Pos = new GL_Vector_YX_int(z, x);
      Quid_2D_Hold<E> up = new Quid_2D_Hold<E>(Side_Aray, size_Sector, quid_Pos);
      up.add_Quid_in(this);
      Up = up;
      D.S("Create Up " + Up);
   }
   private void add_Quid_in(Quid_2D_Object obj){
      GL_Vector_YX_int pos_Obj = obj.get_Pos_Id();
      int z = pos_Obj.y - Quid_Pos.y;
      int x = pos_Obj.x - Quid_Pos.x;
      z /= Size_Sector;
      x /= Size_Sector;
     
      int pos_Ar = z * Side_Aray + x;
      Quids_Grid[pos_Ar] = obj;
   }

   private E get_Object_in(int oz, int ox){
      int z = oz - Quid_Pos.y;
      int x = ox - Quid_Pos.x;
      z /= Size_Sector;
      x /= Size_Sector;
     
      int pos_Ar = z * Side_Aray + x;
      if(pos_Ar < 0 || pos_Ar >= Quids_Grid.length)
         return null;//out
     
      if(last){
         E obj = (E) Quids_Grid[pos_Ar];
         return obj;
      }
      else{
         Quid_2D_Hold<E> in_Quid = (Quid_2D_Hold<E>) Quids_Grid[pos_Ar];
         if(in_Quid == null)
            return null;
         return in_Quid.get_Object_in(oz, ox);
      }
   }
   
   @Override
   public GL_Vector_YX_int get_Pos_Id(){
      return Quid_Pos;
   }
   
   @Override
   public String toString(){
      String te = " z:" + (Quid_Pos.y)  + " * " + (Quid_Pos.y + Side_Aray * Size_Sector - 1);
      te += " x:" + (Quid_Pos.x)  + " * " + (Quid_Pos.x + Side_Aray * Size_Sector - 1);
      te += " s:" + Size_Sector;
      return te;
   }
}
24  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-16 20:40:14
sorry wrong browser have double post
25  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-16 20:35:11
Quote from:  theagentd
4D? Just throw in some smell emitters and spray some water in the players' face.
I am not kickstarter I don’t ask ppl pay me or do something for me =)
I have knowledge that I tested (in my opinion on this moment I this they right)
I share them.

Take them or throw them away, In any case I accept your choice.
Cheers. XD
26  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-16 15:51:57
Quote from:  matheus23
I tried to correct your typos and grammar errors in your article
Big Ty I Try fix all Now;)

Quote from:  matheus23
Also, your strange image host seems to make a lot of money with... stuff... (click on images Wink )
Don’t make money for me at all, I take first hosting that find in Google.
If some one want I can change img hosting.
27  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-16 10:01:11
Quote from:  HeroesGraveDev
The fourth dimension is usually represented by w
No comments.

Quote from:  HeroesGraveDev
Also, this isn't a real rendering of a 4D world. It is simply a projection of 4D space into 3D space (which in turn is projected into 2D space), when actually it should be projected straight into 2D space. Of course, we can't see 4D, so it is impossible to have 'Real' 4D rendering. You can't solve that, and it's just me nit-picking, but the title is slightly incorrect. 

Okay same as you can't see 3D dimension on 2D screen its impossible XD

4D Projection with FOV
22 On D
45 On XZ
45 On Y



Quote from:  HeroesGraveDev
Thirdly, your transformation of the w*-axis is slightly incorrect. The fourth dimension should travel along the direction you look in xyz space, ie: a 4D plane is perpendicular to the ray cast from the camera. Your transformation looks a bit warped, but maybe it's just the screenshot.

Yes you right XYZ perpendicular D that’s why we use Cos angel D for XYZ and Sin angel D For D. =)
28  Game Development / Articles & tutorials / Real 4D World Rendering on: 2013-05-16 03:41:57

What is 4 Dimension and how program it =)


Let's start simple.


1st dimension:


Imagine a corridor.
It's simply a line, you can look into 2 directions: forwards or backwards.
In a program this would be a 1-dimensional array, i.e.
1  
int[x]


2nd dimension:


Imagine a corridor that has doors to rooms.
The line we had before can now have many more lines (or corridors / rooms) along the walls of the corridor.
You see can now look into 4 directions: forwards, backwards, left, right.
In a program this would be a 2-dimensional array (an array of arrays):
1  
int[x][z]


For rotating we use one defining angle and sin and cos:

  • Sin = first and second direction (forwards, backwards)
  • Cos = third and fourth direction (left, right)
   
In different angles we move into different directions:

  • angle 90°: x+
  • angle 270°: x-
  • angle 0°: z+
  • angle 180°: z-
   

3rd dimension:


Imagine a building, which has floors, which have corridors with rooms and doors to them.
You can look into 6 directions: forwards, backwards, left, right, top and down.
In a program this would be a 3-dimensional array:
1  
int[x][z][y]


For rotating we use 2 defining angles:
Sinus for up and down and
Cos for the XZ plane.

Dimension Plane



Every new dimension adds a new Plane, which has 2 sides.
We only see a particular direction, if we look into it's angle.
To show the effect, we give those directions (sides) different colors.
If you look diagonal in 3D by 2 angles, we can see 3 sides:
Green Y, Blue Z, Red X:


If we look diagonal with only 1 angle, we can only see 2 sides:
Y Angle = 0;

 
This is how it looks like, when we see 2 X sides, 1 Z side and 2 Y sides:

 
Every new dimension adds 2 planar sides on one positive dimension and on one negative dimension (+/-).
They may have any color or texture.
Every new plane after 2 planes adds a new rotation axis, which is able to render it's own 2 sides and the 2 previous planars.
In 3D the angle 0 and 180 look along the Y-axis, and 90 and 270 along the XZ plane.

4th dimension



Imagine a group of buildings.
You can look into 8 directions: forwards, backwards, left, right, top, down, D+ and D-.
We call the new dimension D.
In a program that is a 4-dimensional array:
1  
int[x][z][y][d]


So we now have 2 new planes on which we can travel or look along.
If it's possible to cast a ray in 1d, 2d and 3d, it should be able to move in 4d!
And it is!
If we have a 4x4 matrix we can easy calculate Ray position with it,
but how to render it?
Let's use raycasting.
Every pixel casts a ray, which sets the color for a pixel to the color of the obstacle it collides with.

The maths:
To cast a ray, we have to properly normalize it:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
//2D normalize
length = sqrt(x * x + y * y)
invlen = 1 / length
x *= length
y *= length

//3D
length = sqrt(x * x + y * y + z * z)
invlen = 1 / length
x *= length
y *= length
z *= length

//4D
length = sqrt(x * x + y * y + z * z + d * d)
invlen = 1 / length
x *= length
y *= length
z *= length
d *= length


Moves In 3D it looks like here we have same XZ Position but We moves Top or bottom on Y plane
And Words Changed.


4D matrix where
In one picture we don't have a floor and in the second we have it.
We now moved in the D plane, but the XYZ position is still the same.
And Words Changed.


It's even more interesting to see how the image will be if we make the D angle diagonal and see all 4 planes:

 
Purpl Side is 4D plane color
It can be explain like
Rays that colis First World Out Of Draw Range Have Black color (1 world don’t have floor)
Rays that colis second World Have Grean color(2 world  have floor)
Rays that colis Plane Side have purple color.
(purple D plane can have same Hole like Any other Plane)
I Have img this =)
Ray Progression 2D


Cube in 4D have 4 Planes every Plane with own color.

Ray Progression 4D


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
y=0, z=2, x=2, d=1
y=0, z=3, x=2, d=1
y=0, z=3, x=3, d=1
y=-1, z=3, x=3, d=1// black

y=1, z=2, x=3, d=1
y=1, z=3, x=3, d=1
y=0, z=3, x=3, d=1
y=0, z=3, x=4, d=1
y=0, z=3, x=4, d=2// Purpl

y=1, z=2, x=3, d=1
y=1, z=3, x=3, d=1
y=1, z=3, x=4, d=1
y=1, z=3, x=4, d=2
y=0, z=3, x=4, d=2// Grean


Every new plane add Sin self and Cos prev Planes
Camera ray Projection 3D
1  
2  
3  
4  
      ray.y += Dist * sin_Y;
     
      ray.x += Dist * sin_X * cos_Y;
      ray.z += -Dist * cos_X * cos_Y;


Camera ray Projection 4D
1  
2  
3  
4  
5  
      pos.d += Dist * sin_D;
      pos.y += Dist * sin_Y * cos_D;
     
      pos.x += Dist * sin_X * cos_Y * cos_D;
      pos.z += -Dist * cos_X * cos_Y * cos_D;


4D matrix Img



We have int[2][2][2][2]
So We have two 3D Matrix
4th Dimension give ability to Ray travel between this two 3D matrix =)

If we in int[X][Y][Z][0] we in first 3D matrix
If we in int[X][Y][Z][1] we in second 3D matrix
All simple )

If we have matrix array like in minecraft in 4D it will be 4D cube

Every Cube In First 3D matrix have Side To second 3D matrix,
So we have 2 * 2 * 2 = 8 sides(Tunnels) between two 3D matrix =)

Same as with 3D we can travel only on Free place block (Air)
So Even in 4D you only can move through the Air {Air == 0, Block  == 1}
[1][2][3]    D[2] = 0
[1][2][3]    D[1] = 0
[1][2][3]    D[0] = 1

We in [1][2][3]    D[1]

Ray can move to [1][2][3] D[2] ,
but can't move to [1][2][3] D[0]  we will see wall, it can be One Color Or Texture like side in Cube Wink

Try it yourself and make a raycasting renderer and add a 4th vector component to the ray.
Is the 4 the maximum number of possible dimensions?
No, it could be any number of dimensions. 5D, 6D or even 111D =)

Bin Link http://www.2shared.com/complete/oWYgVUbR/4d_z.html

More img Wink

29  Discussions / Business and Project Management Discussions / Re: The nightmare of taxes, and what can I do about it on: 2013-05-10 11:47:00
If the government takes 60% and steam 30% then we wont have anything left. It's just ridicilous don't you think? How am I supposed to eat?
10000$ - 30% steam = 7000 – 60% tax = 2800$
Government don’t care that ^^,
She have billions ppl like you 1k – or 100k ppl less - government don’t care.
And if you die – after 1-2 years or less after that, no one will even remember you
–Welcome to Real World XD

99.9999999999999999999999999999999999999999999999999999999999999999999%
Think only about self and how make as many money as they can, and do nothing rest of there life’s.

This is sense of there life’s take as many pleasure as they can and die.
30  Games Center / Showcase / Re: Polyrun Game on: 2013-04-26 16:26:21
PolyRun Android add support for different screens – zoom.
(Still may be unplayable on small screen – need redesign all UI)
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (29 views)
2014-11-22 12:13:56

xFryIx (71 views)
2014-11-13 12:34:49

digdugdiggy (50 views)
2014-11-12 21:11:50

digdugdiggy (44 views)
2014-11-12 21:10:15

digdugdiggy (38 views)
2014-11-12 21:09:33

kovacsa (62 views)
2014-11-07 19:57:14

TehJavaDev (67 views)
2014-11-03 22:04:50

BurntPizza (64 views)
2014-11-03 18:54:52

moogie (80 views)
2014-11-03 06:22:04

CopyableCougar4 (80 views)
2014-11-01 23:36:41
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

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