Show Posts
|
|
Pages: [1] 2 3 ... 51
|
|
1
|
Discussions / Miscellaneous Topics / Re: Obsoscating classes
|
on: 2013-06-15 15:03:23
|
True, though it depends on the game (eg, 4k games). An obfuscater can rip out all the stuff you don't use, which might be a decent chunk if only using small portions of relatively large libraries. FWIW, Spine is ~43k LOC on it's own, not including dependencies. The JAR including that and all the dependencies (libgdx, LWJGL) is 2.2MB, without natives. Kind of scary how much effort goes into something so small.  Unobfuscated it's 3.9MB, so a 44% reduction. The JGLFW version of Spine is < 1.5MB obfuscated, which goes to show LWJGL could be a bit smaller.
|
|
|
|
|
2
|
Discussions / Miscellaneous Topics / Re: Obsoscating classes
|
on: 2013-06-14 22:50:38
|
|
It can make a big difference trying to decompile code obfuscated vs unobfuscated. It is still possible, just harder. It also makes the JARs smaller. There is nothing wrong with obfuscation.
|
|
|
|
|
5
|
Game Development / Game Play & Game Design / Re: Balancing Weapons
|
on: 2013-06-12 05:47:33
|
Do some best guesses to get it somewhat close to how you want, then use a binary search to adjust anything you don't feel works well. Eg, if a gun feels too weak, don't mess around adding 10%, 15%, etc to it's power, just double it until it is too powerful, then weaken it by half the amount you last increased it, etc. This gives you a wider range of testing and you converge on a good value much more quickly than constantly fiddling with the numbers. 
|
|
|
|
|
6
|
Game Development / Performance Tuning / Re: Are Sin/Cos lookup tables still relevant today with regards to performance?
|
on: 2013-06-12 05:39:34
|
That's actually a nice feature, but only really useful for the atan2-LUT. Every single game will need fast sin/cos, so I don't really see the point in lazy loading the sin-LUT.
I tend to use the LUT in games and libgdx itself, but other libgdx contributors don't. In fact they seem to actively change libgdx to not use the LUT. Eg, scene2d no longer uses it. I haven't investigated their reasoning, but I assume they don't feel it is accurate enough. Maybe when compounded?
|
|
|
|
|
10
|
Game Development / Newbie & Debugging Questions / Re: Repeating Background (libgdx)
|
on: 2013-06-11 20:33:58
|
|
You need to give SpriteBatch UVs using: draw(Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2) The UVs are from 0 to 1, where 0 is the top (v) / left (u) and 1 is the bottom (v) / right (u). You can use values outside this range and it will repeat. Eg, use 0,0,2,1 and it will repeat twice horizontally and once vertically.
You can also use a TextureRegion to specify the UVs. Also see the TextureRegion scroll method.
|
|
|
|
|
13
|
Java Game APIs & Engines / Tools Discussion / Re: Spine: 2D skeletal animation
|
on: 2013-06-09 21:59:02
|
Cool!  You can also attach an image in Spine that you avoid drawing at runtime. You can then get the vertices of this image at runtime. Note it can be a quadrilateral (rhomboid), so you can use polygon intersection testing. This is better than just a bounding box, as it will move, rotate, and scale with the bone it is attached to. This is essentially what the bounding box feature will do.
|
|
|
|
|
29
|
Game Development / Performance Tuning / Re: Anyone else here get a major kick out of refactoring and optimizing regularly?
|
on: 2013-05-20 11:52:52
|
|
Refactoring is an important part of being a developer. I'd even say if you aren't good at it or you don't like it that you are limiting yourself. I write code relatively loosely so I don't waste time perfecting code that might not be used. As I progress I go back and improve the code I'll actually be using. A developer that skips this step generates relatively low quality code. You need to hold the entire part of the code you are working with in your head and thoroughly understand it, have a plan for rewriting or restructuring it, and then implement that plan.
Refactoring is generally to improve the design of your code. It is easier to see what is needed so everything fits together nicely after you have something working, and you can still do so with an eye toward the future of the program. Optimization is different. First, it shouldn't be done at all unless there is a problem. That is a hard and fast rule. It is hard to follow, but it exists to keep you from wasting your time and making your code unreadable. Second, see the first.
@heisenbergman, yes.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|