Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (727)
Games in Android Showcase (217)
games submitted by our members
Games in WIP (796)
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 ... 309
1  Game Development / Newbie & Debugging Questions / Re: Lwjgl 3 - difficulties trying to use VBO's on: 2017-05-16 16:08:48
http://www.java-gaming.org/topics/introduction-to-vertex-arrays-and-vertex-buffer-objects-opengl/24272/msg/203739/view.html

It's showing its age somewhat, but should be enough to get you started Pointing
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-05-10 06:53:16
Not exactly today, but this past Saturday I have finally graduated from Georgia Tech with Highest Honors!!
Congrats!

You are well prepared now for the job-interviews where they ask you to reverse a float[] Pointing
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-05-05 20:39:30
1. Do you communicate all that gps, battery usage and other info using that radio signal device? If so, did you use some API that can encode binary data over such a device? I thought radio waves are analog and therefore so lossy so I'm interested in how this is done.
Every signal is analog, as the world is analog Smiley Your wifi, your TV remote, the transistors in your CPU, over time they have many values between 0 and 1. Thresholds and noise-filters make them digital, redundancy adds error detection and/or correction. A good start would be googling for the protocol of an IR TV remote. That is a seriously lossy signal, but we make it work. Bonus points if you calculate how many pulses you send to instruct the TV to 'go to channel 2'.  Pointing
4  Game Development / Newbie & Debugging Questions / Re: [Solved] Returning specific type of Object that extends Object? on: 2017-05-02 07:06:04
Ofcourse persecutioncomplex
5  Game Development / Newbie & Debugging Questions / Re: [Solved] Returning specific type of Object that extends Object? on: 2017-05-02 06:18:12
1  
2  
        if (klass.isInstance(c))
}

I'd opt for:
1  
klass.isAssignableFrom(c)
which is the conceptually equal to
c instanceof klass
.
6  Game Development / Newbie & Debugging Questions / Re: Java ScriptEngine-Like step by step execution on: 2017-04-30 19:05:37
Add ASM to the classpath.
7  Game Development / Networking & Multiplayer / Re: Best - and currently active - networking lib? on: 2017-04-30 16:06:37
Before I jumped in, I've done some research and found that the common recommended lib for that is Kryonet, which is not active for a year now, so I think I'll skip it.
If it aint broke, don't fix it. KryoNet is well tested, broadly used. Surely it's good enough.
8  Game Development / Newbie & Debugging Questions / Re: Java ScriptEngine-Like step by step execution on: 2017-04-30 15:59:41
Follow the instructions, or use my library that does the work for you.
9  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Returning specific type of Object that extends Object? on: 2017-04-29 17:07:29
This ought to work:

1  
public <T extends Component> T findComponentOfType(Class<T> componentType){
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-27 08:33:04
I'm starting to consider getting myself a second monitor. Anyone here coding with two monitors? Does it increase productivity? Smiley
I work with 3 monitors. With 2 I feel a bit restricted, with 1 I feel a tad handcuffed, with zero I feel detached from this world.
11  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-25 20:50:56
... been forced to learn rapidly and be able to teach new hires. But I feel like all of that will fall to the wayside if someone with a degree applies to the same position I did.
After 3-5 years of experience, nobody cares about your education - it only affects your salary. Usually this is 'too bad', and a life long punishment for not finishing your education, but you'll manage just fine with a few hundred / month less to spend.

I guess it doesn't help that I would really love to work a remote position, from what I can tell those are even harder to get a hold of...
Working remote is a blessing and a curse - I'd be against it, because you'll be highly productive, but due to the impared face-to-face communication you'll miss a lot of signals from 'the business' on what they want, versus the spec.
12  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 17:36:18
Ah, come on. You should be able to work your way out of ambiguous questions - just keep asking questions, that's your job - coding is a given.
13  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 12:46:26
I think the question wasn't about configuration, but about the flows:
  • repo -> test -> artifact
  • artifacts -> deployments
14  Game Development / Shared Code / Re: Simple orthographic camera controls on: 2017-04-22 16:20:41
And with 1.1 or 1.0/1.1 you easily get into inaccuracies in the zoom factors, accumulating errors (you might be zooming in/out for hours, ingame), which will ultimately cause off-by-one rendering issues where sprite-texels drift into unwanted neighbouring screen-pixels.

When the scrollwheel only controls an integer, and a float is converging to it (and actually reaching it, with a bit of nudging), it will always end up at exact zoom-levels in arbitrary orders of magnitude.
15  Game Development / Shared Code / Re: Simple orthographic camera controls on: 2017-04-22 16:16:16
It's not smooth Smiley (changing the zoom level at 60fps)
16  Game Development / Shared Code / Re: Simple orthographic camera controls on: 2017-04-22 16:10:29
When I did something similar for the SpriteEngine for Cas, the target scale was pow(constant, targetZoomLevel), the actual scale was a float which converged to targetZoomLevel over time: pow(contant, currentZoomLevel), where currentZoomLevel simply linearly approached or accelerated to targetZoomLevel. Using this approach you get smooth zooming across arbitrary orders of magnitude in linear time, similar to, say, zooming in Google Maps.
17  Game Development / Shared Code / Re: Simple orthographic camera controls on: 2017-04-20 17:48:54
Post a video of a demo Pointing
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-20 12:53:19
And never forget: things always get better, no matter what happens.
My poor brain just exploded.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-18 08:12:19
And a site thumbnail shortcut thing:

http://qs.jin.fi/?url=https://slashdot.org
Ah, the joys of proper image scaling Smiley
20  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-17 21:59:32
Porting being a no-op is, I think, an illusion. Different platforms require different gameplay and different performance trade offs. Whether or not your graphics-engine can seamlessly transition from HTML5/WebGL to multiple dedicated GPUs is a mere side note. The effort that is put into building an VK-like API on top of OpenGL is impressive, but by the time you're ready to publish your game, VK has probably gone mainstream, and WebGL would support it by then.

It all reminds me of some of the efforts Cas and I took upon us, to scale the sprite-engine from the low-budget to high-end GPUs, and seeking fast-paths through outdated drivers and/or hardware. It just got in the way of publishing the games, and that framerate bump wasn't ultimately worth it.

If this technical tinkering takes you 18 months, in that time high-end GPU performance has doubled, but more interestingly: your low-end supported hardware doubled in performance too. To make all that raw power, and super efficient API/engine worth the effort, you need a small army of artists and designers. A one or two man team most likely cannot come close to what the big (and free) engines support, so why not pick an art-style that hides the technical inefficiencies? It's hard enough to turn a tech demo into a polished, playable, purchable game. Very little of game programming is performance sensitive, so why focus all your energy on it?

My $0.02 Kiss
21  Discussions / Miscellaneous Topics / Re: Silly Programming Mistakes on: 2017-04-13 07:13:28
I've been making some silly mistakes lately.

Post your recent mistakes in this thread, and how long it took you to fix it.
I'll start:

1  
2  
hashMap.get(myString) = myObject
hashMap.get("" + myString) = null

Took me almost an hour!
That only breaks if myString is null, and putting null keys in your maps is... questionable, usually Smiley
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-31 10:31:49
Nice CRT distortion shader! Tongue
23  Game Development / Newbie & Debugging Questions / Re: LWJGL vs LIBGDX on: 2017-03-15 19:45:58
If you want help with your decision on either a wheel or a car, we'd need more information on what it's going to be used for, apart from 'travel'.
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-08 09:30:09
You could have removed the branching and the parameter Pointing
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-08 07:15:01
I had previously written a function that checked if a number was a prime, and so I just found the largest factor of 'n' checked if it was a prime [snip]
All (smallest possible) factors are prime by definition, no need to verify Smiley

Any number > 1 can be factorized into a series of primes, raised to some power.

145499 = 83^1 * 1753^1
145500 = 2^2 * 3^1 * 5^3 * 97^1
145501 = 145501^1

(2, 3, 5, 83, 97, 1753 and 145501 are primes)
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-07 23:47:39
Decided I was finally going to tackle the problems on projecteuler.net. Problem 3 was to find the largest prime factor of 600,851,475,143, managed to write a small 15 line program that does it in 9ms. Seems like it would be rather easy, but my first two ideas made the JVM run out of memory. Made me so happy to get it working so fast. Cheesy

Time to tackle all the things!

Maybe my definition of largest prime factor is wrong?
1  
2  
3  
4  
5  
6  
7  
   private static long maxPrimeFactor(long num) {
      long max = 0;
      for (long i = 2; num > 1; i++)
         if (num % i == 0)
            num /= (max = i--); // decrement i, the factor may repeat
      return max;
   }

1  
maxPrimeFactor(600851475143L) <-- returns 6857 in 65us (0.065ms)


Only when the prime-factors are really big, you have to optimize.
27  Java Game APIs & Engines / OpenGL Development / Re: OpenGL - Draw multiple objects issue on: 2017-03-05 11:45:52
When using instancing we cannot do that anymore, because we are back at model-space. So, we need a way to represent rotation. We could get away with a single rotation angle, but that would then require to evaluate sin/cos in the shader. This however would hurt performance more than storing 3 additional float values for the 2x2 matrix, in which that sin/cos calculation has already been done once on the CPU.
If you take a 16bit integer (giving you up to 0.005 degrees of accuracy), you can then lookup the sin/cos values in a uniform-buffer or (as a fallback) a texture. This reduces 128 bits (4 floats) to 16 bit, at the cost of 2 lookups on the GPU. I expect that would yield a slight performance increase. You can decide to use only 10 bits, reducing the side of the uniform-buffer. For grass even 256 distinct rotation angles (8 bit integer) would be enough.
28  Game Development / Performance Tuning / Re: Quadtree Efficiency? on: 2017-02-23 10:56:27
Developers asking these questions shouldn't be making games that require anything more than grids Pointing

It may sound patronizing, but it's true Smiley




(I'll show myself out Kiss)
29  Game Development / Performance Tuning / Re: Quadtree Efficiency? on: 2017-02-22 13:58:38
Grids are extremely fast and trivial, but you need to spend some time tweaking them when you have objects with negative positions. Since you'll typically implement them as 2D arrays, negative indices will be a problem.

You just add a value to the coords to ensure they are positive... you'll never need negative cell index logic.
30  Game Development / Newbie & Debugging Questions / Re: mt object wouldnt load image on: 2017-02-22 07:38:06
Not sure why you think you have to use "//" -- did you see "\\" and attempt to swap the slashes to make it cross-platform? Simply use "/"

That will be the first step to solve your problem. This thread will help you with the next steps:
http://www.java-gaming.org/topics/faq-cannot-find-the-resource-file/33226/view.html
Pages: [1] 2 3 ... 309
 
Archive (299 views)
2017-04-27 17:45:51

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

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

theagentd (955 views)
2017-03-24 15:32:08

Rule (955 views)
2017-03-19 12:43:22

Rule (924 views)
2017-03-19 12:42:17

Rule (925 views)
2017-03-19 12:36:21

theagentd (989 views)
2017-03-16 05:07:07

theagentd (903 views)
2017-03-15 22:37:06

theagentd (698 views)
2017-03-15 22:32:18
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!