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] 2 3 ... 16
1  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-12-06 21:40:49
1  
  //Based on a method by Zom-B

I f**** can’t believe….

How this even possible Its very weird
http://www.java-gaming.org/topics/13-8x-faster-atan2-updated/14647/view.html

because I develop same code after 5 years
(after many iterations)
 – I never see it or something similar
even
1  
2  
3  
4  
5  
6  
my
//(y < x) because == (-y > -x)
if (y < x)

Zom-B
if (x <= y) // (-x >= -y)

/////
if its was best solution why it was not included to test from start?
or maybe its fake (forum modify???) - not looks so

I even don’t know…

Or maybe its time Travelers XD
Zom-B – You cool, cheers, you’re the best =)
Maybe its even me? ^^ (if its really me - Zom-B : ha-ha I understand the humor behind it XDDDD)

p.s
its my last post
I leave this name and all previous (same as forum)
it was decision long before this accident (but this – show that I do all right)
Maybe we see again – or maybe not, who knows Wink
2  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-24 22:03:18
Functional programming really shines when iterating over collections
IMO Its illusion Sad
You can optimize
for loop
from 8 lines to 1-2
And some small 2-5 line function to 1
For everything bigger – code become hard to understand

it have some exceptions:
Hard to understand to classic programmers
Maybe future programmers that grow up on some type of function languages of future
be thinking that current languages is stupid and functional is easy to understand,
they even may understand 300-500 lines of functional code in couple second,
But for current generation – its painfully )

p.s if future generation be learning programming from 3-5 years
then in 18 years they be having like 10+ years of real programming XP
and they be ready to making incredible things,
but current generation is stupid comparing to them XD
(or they having IMBA AI that write code for he own ^^)
3  Game Development / Newbie & Debugging Questions / Re: Matching algorithm almost success on: 2017-11-21 15:31:46
Maybe this help)
some test data
1  
2  
3  
4  
5  
=1111=
11=11=
1==122
111222
1111=2

1  
2  
3  
4  
5  
=zzzz=
x1=z1=
x==z2y
xxxyyy
xxxx=y

1 x = 9
2 y = 5
1 z = 6

maybe mark visited cells to skip duplicates
horizontal and vertical match may have same cells )
1  
2  
3  
4  
5  
6  
7  
--i j
++y x

--while(j < 8)
++while(j < col)
//or
++for(int j=0;j<col;j++)
4  Discussions / General Discussions / Re: Any Tips/Advice for a Newbie trying to make something big with LibGDX? on: 2017-11-21 15:02:05
Need tips/suggestions from seasoned game designers/developers for a new who wants to make it big in LibGDX.
Make something small to END )
That means: all Graphics, Animations, GUI, Sounds, and Lvls
Let say Flappy Bird or Tetris, or Space Invaders..

Even such small games may looks like easy task
– but even they contain many small time consuming parts
(and optimistic 2-3 weeks may transforms into 3-6 months))
5  Game Development / Newbie & Debugging Questions / Re: Matching algorithm almost success on: 2017-11-20 23:23:38
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
for y 0 to end
   for x 0 to end
   if (x, y + 1) == (x, y) &&
      (x, y + 2) == (x, y)
      Match Y ([x, y], [x, y + 1], [x, y + 2])
     
   if (x + 1, y) == (x, y) &&
      (x + 2, y) == (x, y)
      Match X ([x, y], [x + 1, y], [x + 2, y])
   //don't forget to check bounds on +1 +2 )
   //   if (y >= end || x >= end) return -1

but what if you have:
1  
2  
3  
4  
#####
#####
#####
XXXX#

result will be:
1  
2  
3  
4  
#####
#####
#####
MMMX#

i think you can fix it its little more code ^^

also + one more option
1  
2  
3  
4  
#####
X####
X####
XXX##
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL 3.1.4 on: 2017-11-20 12:51:37
In case you don't see the symmetry here:
- the package for the Java classes is org/lwjgl/demo/opengl INSIDE /src
- the package for the resources is org/lwjgl/demo/opengl INSIDE /res
I don’t know this Gradle magic)
Not use it
So when I see
org/lwjgl/demo/opengl/raytracing/tutorial1/quad.vs.glsl
First place where I be looking is current
org/lwjgl/demo/opengl/raytracing/

and its
lwjgl3-demos/src/org/lwjgl/demo/opengl/raytracing/
7  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL 3.1.4 on: 2017-11-20 12:42:19
You'll find the shaders in /res.
..But, But  persecutioncomplex
its
org/lwjgl/demo/opengl
not
res/org/lwjgl/demo/opengl

The convention for Maven-style and also Gradle projects is to separate Java source files from non-Java files (resources). And it's generally a good style to do that.
OK - its new fancy technologies  Roll Eyes
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL 3.1.4 on: 2017-11-20 12:11:41
Finally, don't forget to check out the lovely path tracing tutorials created by KaiHH!
I open first tutorial
https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/raytracing/tutorial/Tutorial1.java

try look on shader but can’t find it Sad

org/lwjgl/demo/opengl/raytracing/tutorial1/quad.vs.glsl
org/lwjgl/demo/opengl/raytracing/tutorial1/quad.fs.glsl
org/lwjgl/demo/opengl/raytracing/tutorial1/raytracing.glsl

https://github.com/LWJGL/lwjgl3-demos/tree/master/src/org/lwjgl/demo/opengl/raytracing
no folder tutorial1 and no files in folder tutorial

IMO: Oh my..
Why not use Enums (but its ok for RAW example ^^)
1  
2  
3  
4  
5  
6  
eyeUniform = glGetUniformLocation(computeProgram, "eye");
ray00Uniform = glGetUniformLocation(computeProgram, "ray00");
ray10Uniform = glGetUniformLocation(computeProgram, "ray10");
ray01Uniform = glGetUniformLocation(computeProgram, "ray01");
ray11Uniform = glGetUniformLocation(computeProgram, "ray11");
int loc = glGetUniformLocation(computeProgram, "framebufferImage");

up:
Also be nice to
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
interface GLEnum{
}
class GLShaderVal{
   int gl_Pointer;
   GL_Enum name;//Or String
   /*
   int val_Cur;
   int val_Wait_Set;
   */

}
GLShaderVal param = glGetUniformLocation(computeProgram, GLEnum_X_Shader.FramebufferImage);
9  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-12 11:12:32
the user's code will fail at runtime with a cast exception...
However, the consumer/producer intention is gone now, as the user can afterwards freely add arbitrary subclass instances to list l2
I what look how you broke list l2 at runtime after its exit Fun with class cast XD
up: Nope sorry - i don't care XD

I know that generics is only compile time
– and clases don’t have any values from it
so you can’t check class in runtime with generic.class
I doubt that kotlin change this
https://stackoverflow.com/questions/34122450/how-to-get-generic-parameter-class-in-kotlin
So if its fails in java it may same fails in kotlin
You can’t count on generics - its only compile advices(same like annotations) – not 100% type save
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public static void main(String[] args){
   List<SuperClass> l2 = (List<SuperClass>) doSomething2();
   //crash it runtime here
   List<? extends SuperClass> l3 = doSomething2(); //and this
}

static class SuperClass {}
static class SubClass extends SuperClass {
public void subClassMethod() {}
}
//or after exit function
static List<? extends SuperClass> doSomething2() {
   List<SubClass> result = new ArrayList<>();
   result.add(new SubClass());
   for (SubClass current: result) {
      current.subClassMethod();
   }
   return result;
}

IMO can kotlin remove useless ":" overflow? - no? - f** it

up:
However. My only intention to post in this thread was to show people that Kotlin is at least on par with Java performance and code quality wise
I hear same story couple years ago about Groovy – and all be fine until one day when enterprise start crashing in unknown place
– after spend couple weeks they find out that code compiles wrong by parser – no code errors in src code ^^

upp:
and have a talk about language design like adults
Its ok to show features,
but not ok repeat same text over and over every day
– we need move to constructive discussion)
I like Kotlin features, but don't like syntax(text) overflow comparing with java
10  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-11 23:36:14
Yea I'm sorry, I can't give you better examples than the ones I already gave you Tongue
We everyone knows that Java have problems
like no primitive types in List and etc,
don't need create post about its every day)

take this code its compiles 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  
public static void main(String[] args){
   List<SuperClass> l = doSomething();
   List<SuperClass> l2 = (List<SuperClass>) doSomething2();
   List<SuperClass> l3 = (List<SuperClass>) doSomething3();
   List l4 = doSomething();
   print(l);
   print(l2);
   print(l3);
   print(l4);
}

static class SuperClass {}
static class SubClass extends SuperClass {
public void subClassMethod() {}
}

static List doSomething() {
   List<SubClass> result = new ArrayList<>();
   result.add(new SubClass());
   for (SubClass current: result) {
      current.subClassMethod();
   }
   return result;
}
static List<? extends SuperClass> doSomething2() {
   List<SubClass> result = new ArrayList<>();
   result.add(new SubClass());
   for (SubClass current: result) {
      current.subClassMethod();
   }
   return result;
}
static List<? super SubClass> doSomething3() {
   List<SubClass> result = new ArrayList<>();
   result.add(new SubClass());
   for (SubClass current: result) {
      current.subClassMethod();
   }
   return result;
}

static void print(List<SuperClass> l) {
   System.out.println("List:" + l);
}
11  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-10 18:56:23
I dont like in kotlin 2 dots ":" and name var before type and return of function at the end
this was keep me away from kotlin, scala, groovy and other ^^
they all have same strange pattern in syntax(like they all was parsed by Xtext Wink)

up: hm groovy don't have them)) maybe in some past i find something different to not use it - need recheck ^^
Y, now i remember) it have some compile nightmares and this one of them
http://www.gmarwaha.com/blog/2009/02/02/groovy-private-is-not-private/
(i even don't know if they fix this and other bugs ^^)
12  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-08 13:23:56
it is veeeery hard to test every possible existing case.
Yes it is)
Same as separate Code for modules – and use only interfaces from it,
Its remove direct dependence and isolate code in it.
Its hard - and the larger the project, the harder it is to test it and separate code on modules.

up:
There's a school of thought that says tests are papering over the cracks in design specification.
I'm one of those people who actually rather likes design-by-contract
I also can’t write TDD(Test-Driven Development) (write Test before code)
But I can write Raw working code
then make conceptual Tests(Test on what I want it to be, and not for “current Raw code passes”)
– and transform that code in to final code that pass all Tests
(Test also grows during code updates)
13  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-08 12:18:27
I can also discuse all that but: there is no big difference in language and code itself
if its return same result and pass all Tests on it.
if code crushes in runtime then its Test error and not code itself

up:
There is a difference between:
Test on Refactoring
and
Test on function (class, module) result and entering params)

p.s Writing “result” Test is hard
- (TD) ("4" "3" "12")("-4" "3" "-12")("4" "-3" "-12")("-4" "-3" "12")
("0" "3" "0") ("4" "0" "0")("0" "-3" "0")("-4" "0" "0")("0" "0" "0")

– because on practice you fully write again tested function(TF) that produce same result without optimizations
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
int Mul(int v1, int v2){
   if(v1 == 0 || v2 == 0){
      return 0;
   }
   int sum = 0;
   int v2_A = v2;
   if(v2 < 0) v2_A = -v2;
   for(int i = 0; i < v2_A; i++){
      sum += v1;
   }
   if(v2 < 0) sum = -sum;
   return sum;
}

-And about TIF(TE) – I not so smart to even write test data for it XD
1  
2  
3  
4  
5  
-& < v1 < &
-& < v2 < &
v1 == 0 {0}
v2 == 0 {0}
r=0 0..(A(v2))[r += A(v1)]{r.s = v1.s * v2.s}

(I can’t even call it properly ^^)

up2: OK i finally write test for TIF with explanations)
1  
2  
3  
4  
v1 == 0 r
v2 == 0 r
v2 > 0 r
v2 < 0 r

test case
1  
-+v1 -+v2


generate
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
if(v1 == 0){
   return x;
}
if(v2 == 0){
   return x;
}
if(v2 > 0){
   return x;
}
if(v2 < 0){
   return x;
}
//Eroor can't go here

filled Data
produce same result on any val enter if no extra val present that not final(const)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
if(v1 == 0){
   return 0;
}
if(v2 == 0){
   return 0;
}
if(v2 > 0){
   int sum = 0;
   for(int i = 0; i < v2; i++){
      sum += v1;
   }
   return sum;
}
if(v2 < 0){
   int v2_A = -v2;
   int sum = 0;
   for(int i = 0; i < v2_A; i++){
      sum += v1;
   }
   sum = -sum;
   return sum;
}

test data
("4" "3" "12")("-4" "3" "-12")("4" "-3" "-12")("-4" "-3" "12")
//
("5" "3" "11")
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
if(v2 > 0){
   int sum = 0;
   for(int i = 0; i < v2; i++){
      sum += v1;
   }
   if(v1 == 5){//no situation like this - because can't add "if" manually
      return 11;
   }
   return sum;
}


final const external var
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
final static int C = 1
...
if(v2 > 0){
   int sum = 0;
   for(int i = 0; i < v2; i++){
      sum += v1;
   }
   sum += C;
   return sum;
}

("4" "3" "13")
("5" "3" "16")

-One Test Data covering all situation no mater in what range params are
(except Cpu register overflow ^^)
14  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-07 18:50:26
There is a difference between writing 1 file game script 300-1000 lines of code
and maintaining project 30k-50k+ lines of code - filled by “val”
same about functional languages – fluffy for kids and nightmare for real projects

Up:
But why even bother when future for TDD
MTD -> MTF -> MTE (MTIF)
(M for Module, D for Data Res {"3" "+" "4" "7"}) XDDDDD  Roll Eyes
15  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-05 22:54:05
I'll prepare a database dump 'soon' (this week) and we'll see who is willing to make a JGO clone worthy and capable of replacing the current forum. If it's any good, I'll seriously discard SMF and roll out whatever is ready to replace it.
I have very low experience with Web framework's
But from what I know: trying direct DB Copy(dump) from one framework to another is nightmare.

Alternative solution, because its WEB – someone can write simple parser(Scrapier, scrambler) for html version of forum)
And dump all data from Front-End side ^^

+ if needed compatibility with current version – for every post, topic
can also be dumped Extra info post / topic id
gosh-it-s-quiet-in-here/38470/msg/367159/view/topicseen.html

I think it's less painful than trying integrate current DB to new framework
16  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-04 13:35:19
Java itself is a piss-poor platform for game development, you need mature engines/frameworks, and those tend to have their own communities
I don't think that libgdx or LWJGL Tutorials can attract at least minimum amount of new ppl to forum
– not today, too many alternatives

I have extra solution – make mods for popular realized games on Java (sadly we have only few)
Mods very well gathering players and developers together
(Sorry I remember only few company's (ppl): PuppyGames and OrangePixel)

Yes its hard to implement – and almost not profitable in many cases
And it must be easy to understand and to modify game(maps) for end user,
And its no so easy to implement especially for finished game without moding support

p.s I for mods, but sorry I don't have mental stability to helping with mods full day(half day) for free,
I can help advices, little code, but not every day

pp.s Forum is better then reddit for mods discussion because it's filtering kids, that too lazy to register on it Wink
17  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-03 20:22:00
Java Web is forbidden by browsers
All Kids on Unity, GameMakers and Unreal
All Pro (Indie) – in own garages aka bunkers in isolation
Clean Java Android - almost no one cares
Minecraft Hype is almost gone…
..So – I don’t see clean future for javagaming in current state (((

Solution?
Maybe make forum for gamedev – not targeted to some game engine or programming language
But, is it be better than Unity specialize forum?
In any case it receive more active users than currently have javagaming

I've already suggested in the past- Dark solution
"make Game market for indie games" one more - one less - he will find his own audience
but its dark side Wink
18  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-10-04 16:12:05
There is plenty Free Web hosting in internet – with 400gb+ or even unlim bandwidth
+there are many file hosting with wait 30 sec to download
Or you can use Google drive or similar ^^
(steam 100$ for game + free bandwidth XD)

@jonjava
IMHO: Sorry but: that racism (or similar words) to criticize someone for their site logo and life position.

Quote from: gouessej
I get away from the extralegal censorship of the asocial networks under imperalist control
Its not so simple as it looks – custom server can’t help with censorship
– it can be blocked in 1 minute by IP (or even by server internet provider)

“until you not dangerous - no one cares about you”
and even sites like “Pirate Bay” may live for years and years
– but if “they” want – they can block it in all form less then 1 day
- its very easy – simple no one care )

p.s I support “gouessej” position to be independent ^^
(until his action not harm others)
why? because hi at least trying change something in better way
Yes, trying to be independent may go wrong way and its f**k up something important XD
But we don’t know future)
(believe you or not but in couple 50-100 years people will be paying for Air)

pp.s IMHOOOOOOOO "Amazon S3" is full crap
 - never ever use it: their prices are ridiculous their stability not bigger than other big providers VPS
(same as Microsoft Clouds XD)
Its sad to see so many brainwashed people believe in fluffy Ads (with magic inside)
All you need is simple pay little more and all that magic can be yours Wink
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-18 15:19:20
You need therapy, at once!
Maybe)  
(or use Auto Formatter before post code somewhere XD)
ED:I use lower Case only for function arguments, in function variable and RAW code
1  
2  
3  
4  
5  
int W;
public Win(int w){
   W = w;
   int x = 10;
}

I don't like this type of style:
1  
2  
3  
4  
int w;
public Win(int w){
   this.w = w;
}

For static and final – I have different Font style(color) in IDE so I don’t care )

up: ps.
this preference only for my own projects
- if i write for 3rd party project I use their formatting style Wink
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-18 14:54:46
What sort of sick puppy says "static public"!?
Cas Smiley
static is more important for me then public / protected ^^
I also have
1  
2  
3  
Object ar[] 
Object ar[][]
Object[] ar[]

(when many ppl use
Object[][] ar
)
=)
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-18 11:32:06
Look what i found)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
   static public void main(String[] args){
      B b = (B) new B().Call();
      B b_E = new B().Call_E();
      C c = new C().Call_E();
     
      //Runtime Error
      //But Because its Class exception - its trigger on every call = easy to find and fix
      C c_Er = new A().Call_E();
   }
   
   static public class A{
      public A Call(){
         return this;
      }
      public <E extends A> E Call_E(){
         return (E) this;
      }
   }
   
   static public class B extends A{}  
   static public class C extends B{}
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-14 22:30:24
Ah--probably the "macro recording" feature proved too tricky to just kick out and I put it aside for that reason.
Capturing Events and reproduce them can be tricky
here some raw example
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  
long Start_Time;
Start_Recording(){
   Start_Time = cur_Time_Ms
}

ArrayList Events
java_Mouse_event(){//etc evn
   long time_Trig = cur_Time_Ms - Start_Time
   Events.add(event, time_Trig)
   
   java_Mouse_event_Proc(ev)
}

java_Mouse_event_Proc()
///
Thread_Load_Events{
   Events_Load
   int proc_List_Pos = 0;
   int size = Events_Load.size;
   while(proc_List_Pos < size){
      long cur_Time_Ms_Macro = cur_Time_Ms - Start_Time_Macro
      int i = proc_List_Pos
      for(; i < size; i++){
         if(ev.time_Trig <= cur_Time_Ms_Macro){
            java_Mouse_event_Proc(ev);
         }else{
            break; //for loop
         }
      }
      proc_List_Pos = i;
      Sleap(15)
   }
}

all be fine and smooth if application don't have Lags =)
if you have after some event let say 100ms lag
-additional event align needed - to compensate multithreading desync ^^
(or don't care if events don't need perfect time accuracy)
23  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-09-12 16:44:04
Quote
From my tests in the past, Java's Math.sqrt() is pretty damn fast these days
...
we have x86 instructional support
Yes, ok, my mistake - why i even trying...
– no one cares)
24  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-09-12 10:04:53
Let make next Contest "Fast Sqrt" Smiley
one from the Baselines https://en.wikipedia.org/wiki/Fast_inverse_square_root
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
float Q_rsqrt( float number )
{
   long i;
   float x2, y;
   const float threehalfs = 1.5F;

   x2 = number * 0.5F;
   y  = number;
   i  = * ( long * ) &y;                       // evil floating point bit level hacking
   i  = 0x5f3759df - ( i >> 1 );               // what the f**k?
   y  = * ( float * ) &i;
   y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
//   y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed

   return y;
}
25  Game Development / Shared Code / Re: Tagged Human JSON (THJSON) Parser on: 2017-09-05 10:24:48
We need even Moarrrrrr custom syntax and Languages  Roll Eyes
(it's not sarcasm, we really need them
 – but not stupid copy past or change 2-3 lines of exist like some kids do,
"you can do it Alone – it's not so hard... really not so hard")
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-02 16:24:15
Funny topic)
https://forums.tigsource.com/index.php?topic=18397.msg1351265#msg1351265
27  Game Development / Newbie & Debugging Questions / Re: Efficient Bukkit multi-plugin Mongo database design on: 2017-09-02 16:09:18
i see same question from you on stackoverflow ^^ (no answer and some kid give minus)

short - brutal trick:
- Make 1 big field like 256-512 byte and manually pack unpack different data in it:
"2 bytes kills, 1 byte Score, 2 byte Money"
per Game Data, or per player Data (MMO) - use it where you want)
Short – brutal - same DB size for different Versions of client and server (while in bounds of field limit)

p.s I may say little disappointed – we have at least 3 ppl who working with DB(experts) and make for living with it.
But they don’t care (or too Greedy to help for free XD)
Quote from: Icecore
I may say little disappointed
But I don’t XDDDD
There are so many, so I even not care…
28  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-09-01 09:28:17
It have more accuracy because use bigger array and use less memory because its 1 array – not 8 )
(1000 x 8 x 4(f) = 32kb   4000 x 4(f) = 16 kb)
More array size more accuracy ^^

also may try this - less on one OP =)
1  
2  
3  
++      private static final float Pi_H_M = -Pi_H;
--      if(y < x) return -(Pi_H + Atan2[(int) (x / y * Size_Ac)]);
++      if(y < x) return Pi_H_M - Atan2[(int) (x / y * Size_Ac)];
29  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-08-30 18:07:29
I also have this - it's more Cache friendly, but have more OPs ^^
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  
private static final float Pi = (float) Math.PI;
private static final float Pi_H = Pi / 2;
//4 x 4000 = 16 kb L1 Cache
private static final int Size_Ac = 4000;
private static final float Atan2[];

static{
   final int Size_Ar = Size_Ac + 1;
   Atan2 = new float[Size_Ar];
   for(int i = 0; i <= Size_Ac; i++){
      double d = (double) i / Size_Ac;
      double x = 1;
      double y = x * d;
      Atan2[i] = (float) Math.atan2(y, x);
   }
}

static public final float atan2_1(float y, float x){
   if(y < 0){
      if(x < 0){
         // (y < x) because == (-y > -x)
         if(y < x) return -(Pi_H + Atan2[(int) (x / y * Size_Ac)]);
         else return Atan2[(int) (y / x * Size_Ac)] - Pi;
      }
      else{
         y = -y;
         if(y > x) return Atan2[(int) (x / y * Size_Ac)] - Pi_H;
         else return -Atan2[(int) (y / x * Size_Ac)];
      }
   }
   else{
      if(x < 0){
         x = -x;
         if(y > x) return Pi_H + Atan2[(int) (x / y * Size_Ac)];
         else return Pi - Atan2[(int) (y / x * Size_Ac)];
      }
      else{
         if(y > x) return Pi_H - Atan2[(int) (x / y * Size_Ac)];
         else return Atan2[(int) (y / x * Size_Ac)];
      }
   }
}
30  Discussions / General Discussions / Re: Programmer jokes on: 2017-08-23 21:44:55
Tell me where you work because I never want to work there!! My experience of working in IT is more like how KaiHH describes it.
Happy few)
And maybe you even don’t work 10-12 hours a day + Weekends In Deadline
Dream Land ^^
p.s On every successful story- at least 1000 not so successful ^^
(Like Story about Fable Development)
Pages: [1] 2 3 ... 16
 
EgonOlsen (42 views)
2018-06-10 19:43:48

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

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

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

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

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

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

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

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

Solater (140 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!