Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 ... 92
1  Game Development / Networking & Multiplayer / Re: Check if UDP message was successfully received? on: 2014-09-16 15:03:18
Generally still too much.  It re-transmits...see above.
2  Game Development / Networking & Multiplayer / Re: Check if UDP message was successfully received? on: 2014-09-16 12:11:53
It's common to want to send unreliable packets.  By the time you get the ACK the information is already dated and you're better off sending new updated info rather than data that will be useless by the time it's received and still need to send the updated data soon.  TCP is great for sending large static data or not needing to worry about xfer (sorta) if time isn't important.
3  Game Development / Networking & Multiplayer / Re: Check if UDP message was successfully received? on: 2014-09-16 11:18:43
Sending an ack is not equal to rolling your own tcp.
4  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-16 07:21:21
And maybe it's time to review rust again: http://blog.rust-lang.org/2014/09/15/Rust-1.0.html
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-16 07:18:00
XKCD inspired me to comment some code:



(Strangely enough I'm actually working on some parsing)
6  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-15 11:08:41
Short answer.  Classes only have a single parent and interfaces are a potentially arbitrary list per class, so in general more searching is required in the interface case.
None answer??  I'm not sure where the list is relevant...
I'm referring to the code with which must execute to return true/false.
7  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-15 08:42:37
Quote
Huh? Why? IMO, using with interfaces ...

Short answer.  Classes only have a single parent and interfaces are a potentially arbitrary list per class, so in general more searching is required in the interface case.  And yes both cases include possibilities of optimization.
8  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-15 08:18:13
@cylab: Like I said...it depends what I'd do.  If partitioned into different sets then you just iterate over the set of sets that each transform needs to work with, then nothing needs to check if the transform applies to that specific instatance.

@Rayvolution: that's a statistically insignificant example...doing whatever works best for your brain is the right approach.

Quote
Then I move on to more actually difficult problems
This.
9  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-15 07:24:45
Let's ignore performance tuning.  Cylab's example is reasonable enough, although I'd think about only placing each in one list instead in both...but without further knowledge I can't really say.  But it's somewhat moot for OP's question:  "... only the player implements ..."

Generally using instanceof is an explicit type query which in general requires walking lists and requires selecting the exactly right type.  And the situation is worse if the type is an interface type.  Choose the exactly right type can be problematic if you rework the type hierarchy and all relevant instanceof checks will require change.  So instead of an explicit type query, replace it with an implicit via an instance method/variable.  Remember that this is all general speak.
10  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-14 14:02:34
instanceof has a rather large stink factor.  If you need one then you should think if there's a design flaw.  That's quite different from saying you should never use one...and if you do then jumping through hoops to avoid it probably isn't the solution.

Quote
I put a bunch of entities into an array, only the player implements this.
If the original question was important...then the answer is in that statement.

Quote
if(sprite != null) entity.draw(batch);
This is a very odd construction.  Checking if sprite is null and then not directly doing anything with sprite.  From the previous it looks like everything is burdened with 'sprite' and only the player will have non-null value.  If so then 'sprite' is useless.
11  Discussions / General Discussions / Re: great article on good coding practice on: 2014-09-13 09:11:55
The really fun thing here is very few people need to actually work at any of this...it just come natural.
12  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-12 13:08:47
WARNING: Purposefully provocative and devil's advocate mode.

Quote
In my experience in most first world countries, women in STEM career are actually sought after and not cast out.
Yeah but I didn't say that did I?  We can ignore most of non "first world" countries since on average livestock has more rights than women. 

Studies show that women are stronger in math & hard science then men at the pre-university level.  Genetic?  Probably not...it's more likely that girls are pushed to study more in early years then boys.  Coupled with the fact that girls tend to mature faster.  University admission of women into these fields is drastically lower then men.  I went to a math/science only university (the 80s) and it was approximately 4:1 ratio.  Again cultural and I'd guess that current numbers are going to be similar. You add into the mix that a fair number of marriages result from couples that meet at university or at work and on average it'll be the male that will take the lead role on job placement and the women will have to take what she can find, regardless of whom is the stronger candidate.  Not saying that's a bad call...it's on average the winning choice.  So women in math/science should be thrilled because they're not generally and effectively black-listed?  Or because the wage and promotion gaps is less than other fields?  Women aren't bombarded with various forms of sexual harassment, including the often overlooked passive kind of "puppy jumping and peeing on them"?  I think very few men understand how hellish the puppies must be.

Quote
Also your Phil Fish example shows how it can be just the same with men.
Yeah I said the real problem isn't women, they're just a single case.

Quote
Sarkeesian is not hated because she is female, She is hated because she is an extremist on the internet producing content and shouting loud about this topic.
I don't watch videos so I wouldn't know.

Quote
If she was male, it would be just the same. As apparent by Phil Fish: If you talk shit publicly, people will call you out.  If you express strong (political) opinions, loudly on the internet; even worse.
I'm of the humble opinion that "even worse" isn't a valid form of discourse.

Quote
If someone produces a lot of like right winged content, maybe well produced, articulate, gets a lot of attention, but still radical and extremist, that person would get death threats as well.

Reason is people can not believe, let alone accept that someone so hateful is getting all this attention and might poison some uneducated ignorants. And this manipulation makes them angry.
Same reasoning as before...not valid form of discourse.
13  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 19:29:26
If there's any truth to this.  Stop poison pilling yourself!  https://twitter.com/notch/status/281139739304800256
14  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-10 18:58:19
If it were just kids (or kid-like-adults) it would be one thing.  But it's not.  The more striking bits of this chain of events was hatred coming from industry insiders.  And sure it's not limited to games.  What's kinda weird is that women in all kinds of professions that require higher education to enter face this kind of thing from equal well educated males.  But of course it isn't just women either. 
15  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 10:13:14
Lucas went to Disney for ~4b.  That I can see in the long-run.  It looks like those Star Wars/Indian Jones IPs might have some legs to them.
16  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-10 07:16:12
Humm...maybe I should take the time to look at Julia more closely:  http://www.evanmiller.org/why-im-betting-on-julia.html
17  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 07:07:08
Wasn't aware of a movie.  Humm....
18  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 05:51:03
The bean-counter in my head can't come up with an equation where 2b makes sense.  There'd need to be some secret plan to make more than that back that isn't insane wishful thinking.  While it's true that some web calendar thing sold for a couple hundred mill in the 90s....but that was the 90s when everything tech was nuts.
19  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-09 14:03:12
Wel AOP in Java is normally mostly used to simulate Traits or Mixins. Maybe a reasonable usecase.
That to me?  I've mostly seen pre & post conditions (so contracts).  And I'm covering mixin's by dispatch and composition.  Trait's seems like a really painful thing to mimic with aspects...but then again it all seems kinda painful to me.
20  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-09 10:09:15
I've always thought it was a bad direction.  Rewritting rules are useful.  Contracts are useful.  The two of these give you most of aspects.  Toss in knowing how to perform various forms method dispatching and you're done.  Aspects as a debugging tool seems like shoehorning in a use-case.
21  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-08 07:50:02
Cas:  But this is about about more aggressive tactics.  Bombarding women's email and social media accounts with more than just offensive language, but stalking/rape/death threats...reports of posting children porn images, attempting to hack e-mail and bank accounts.  And anyone that speaks out against it might become a target as well.  At least one male developer is throwing in the towel:

http://www.gamespot.com/articles/phil-fish-selling-rights-to-fez-after-being-hacked/1100-6421882/
http://venturebeat.com/2014/08/22/hackers-post-fez-developer-phil-fishs-personal-information-and-take-control-of-his-studios-website/

I don't have any opinion about either Phil Fish, Anita Sarkeesian et al.  But they don't deserve to be attacked like this.
22  Game Development / Newbie & Debugging Questions / Re: [solved] Do you need all bits to represent a byte? on: 2014-09-08 07:29:47
It depends.  What do the three bits represent?  Yes that's it for unsigned.   And it's 111111012 in signed 2's complement.

Quote
word length (8 in general)
Typically a word will refer to the native bit size of a register.  But not so clear with modern 64-bit CPUs.
23  Discussions / General Discussions / Why are people jerks? on: 2014-09-07 00:06:15
A light overview:

http://www.examiner.com/article/gamergate-revealed-as-misogynist-and-racist-movement-from-4chan

the level of harassment that some folks have received is quite, well, nasty to the point of illegal.

https://twitter.com/Spacekatgal
https://twitter.com/femfreq
24  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-04 12:09:02
Lack of standardization is no big deal.  In fact many of the "lack of standards" stuff and their replacements are stuff to pretend like they don't exist.

The language itself is a pile of shit.

Sure it's a very useful language to know and sadly it's often the only pragmatic choice...but it's still sucks.
25  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-04 09:09:35
My guess is yes.  Here's another odd option: http://batsh.org/
26  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-04 05:39:40
nobody perl so far ?  Stare
Wash your mouth out with soap.

C++ is a pragmatic language.  Like perl it's a poster child of how not to design a language...if the word design is apply.  Toss shit together maybe?  Add features to fix previous broken features, repeat?

Don't bother to learn it unless you have to and then ignore almost all it.

I've never had any interest in D (author is a clever dude) or any other C++ done right language.  OOP is 50% obvious and 50% mistakes.  (who said that...Pike maybe)
27  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-03 18:00:21
Mathematica is awesome.
28  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 17:59:12
What kind of effort have you done at tuning?

Note the compiler of hotspot will be more or less the same for supported versions...just some compile time switches will differ.  Not quite true, but more or less.
29  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 14:20:27
Gosh it looks like they want to kill off a number of combos:

http://openjdk.java.net/jeps/8044022

this is a propose and not a JEP yet.
30  Discussions / General Discussions / Re: quaternion camera - almost working - rotation control glitch on: 2014-09-03 13:18:25
The issue here isn't quaternion rotations and getting information from them but using a method which is numerically unsound as the two input vectors approach opposite directions.  You have to account for that hedge case if you want that to be a legal thing to do.  Oh and you can drop a couple of computations.  Given unit vectors 'u' & 'v' and not approaching +/-Pi between them:

1  
2  
3  
4  
d     = 1.0+dot(u,v);
m     = inversesqrt(d+d);
q.xyz = m*cross(u,v);
q.w   = d*m;
Pages: [1] 2 3 ... 92
 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!