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 ... 330
1  Game Development / Performance Tuning / Re: Check for null or check for implementation? on: 2014-09-15 08:08:25
Make OOP purists recoil in horror with the suggestion that you stick loads of methods into a base class! That's what I do.

In general I look back from the requirements ("I need to be able to this, this, and this, with the things in a list") and then work out what thing needs to be done to satisfy those requirements ("so I need to have this, this, and this declared for all potential objects in the list"). Quite often that leads to the perfectly reasonable design of having a phat base class full of abstract methods (or, more usefully, an interface).

Then I move on to more actually difficult problems Wink

Cas Smiley
2  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-13 22:16:55
Don't, it makes me cry myself to sleep every night...

Cas Smiley
3  Discussions / General Discussions / Re: great article on good coding practice on: 2014-09-13 09:16:39
Ah, you should see Chaz and Alli's scriptings in C# in our Unity game. My eyes are bleeding and my brain wants to leap out of my head and run off somewhere where it only has to think about brussels sprouts.

Cas Smiley
4  Discussions / General Discussions / Re: Bouncing a game idea around. on: 2014-09-12 19:55:33
You passed, then Wink

Cas Smiley
5  Discussions / Miscellaneous Topics / Re: How to call police/ambulance from a different country on: 2014-09-12 15:24:57
Yeah, I misunderstood. Basically... you can't do this.

Cas Smiley
6  Discussions / Miscellaneous Topics / Re: How to call police/ambulance from a different country on: 2014-09-12 12:16:09
Dial 999 here in the UK. 911 in the States (and that might work in the UK now too I think). 666 in Italy I seem to recall. I expect largely the same sort of deal everywhere... why do you ask?

Cas Smiley
7  Discussions / General Discussions / Re: Bouncing a game idea around. on: 2014-09-12 08:24:31
First test FAIL!

If you can be discouraged by forum posters then the problem is not with your GAME but your RESOLVE!

Cas Smiley
8  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 16:14:59
I expect he'll cry into his golden pillow as he spends the rest of his miserable days on his own Caribbean island drinking pina colladas about selling out...

Cas Smiley
9  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 09:51:49
I wouldn't blame him, I'd sell my own mother for $2bn. (If you knew her you'd not be surprised at that mind)

Cas Smiley
10  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 08:49:26
This has the hallmarks of a hoax or bullshit, tbh. It's a ridiculous valuation.

Cas Smiley
11  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-09 14:15:20
Contracts would most likely be far more useful to more people than the whole mess that AOP seems to be.

Still haven't quite come up with a decent use case beyond injecting logging either. Stuff like transaction handling is critical to functionality and logic and I seriously wouldn't want to leave it in the hands of a bit of code miles away which I had no idea was even executing... whereas logging isn't.

What might have been nice in Java is a way to annotated how extension points in abstract classes were meant to be used. I find myself using this pattern a lot:
1  
2  
3  
4  
public final void tick() {
   doTick();
}
protected abstract void doTick();

or this:
1  
2  
3  
4  
5  
6  
public final void tick() {
   doTick();
}
protected void doTick() {
   // By default, do nothing special
}

with the expectation that the derived class implements doTick(). However what is the rule for a further derived class? I end up with having to remember to do this:
1  
2  
3  
4  
5  
@Override
protected void doTick() {
   super.doTick(); // Don't forget to do this FIRST or everything breaks!
  // blah
}

or this:
1  
2  
3  
4  
5  
@Override
protected void doTick() {
   // blah
  super.doTick(); // Don't forget to do this LAST or everything breaks!
}

or even this:
1  
2  
3  
4  
5  
protected final void doTick() {
   // blah
  doTickMoreStuff();
}
protected abstract void doTickMoreStuff() {


... and so on. Some keywords or annotations to help enforce the accepted method of extension would solve a lot of that.

I digress. Back to work. In C#. Gah.

Cas Smiley
12  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-09 13:13:29
What AOP appears to give me is similar to what the addition of a 3rd dimension to graphics gives me: all sorts of cool possibilities, and massive headaches.

Cas Smiley
13  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL] Why should we call Display.destroy()? on: 2014-09-09 08:37:38
Well... it is actually an entirely optional call, but it has its uses. When you want your game to look like it's shut down quickly and successfully it's the first thing you want to zap. You can then get on with doing any other bits of housekeeping... in particular stuff like "logging out" or writing logs in a background thread as the app terminates.

If you aren't doing any of these things there's honestly no need to call it as it will be no more or less effective than what the OS is doing in the background when your process terminates.

Cas Smiley
14  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-09-08 11:09:48
Yeeargh no, go for 60!

Cas Smiley
15  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-08 08:38:04
Oh, absolutely. I've been peripherally involved in it trying to stay out of it. It's mostly "kids" (which is the generic term I used to describe anyone younger than me) on both sides.

Really there should be some actual criminal investigations.

Cas Smiley
16  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-07 10:46:18
I had great fun upsetting the internets the other day when I pointed out how unpleasant most gamers are. "Most" as in "most of the ones that contact us in some way". The harassment various people received is most certainly criminal in many nations. I decided the best way to deal with both bunchs of people involved was to completely ignore all of them and just get on with making games.

Worst thing that ever happened to the internet was allowing any old git to speak his mind on it. Including this post.

Cas Smiley
17  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-05 15:38:09
Regarding D, I always wondered to myself, who needs D when you can have an AOT compiler for Java?

Cas Smiley
18  Discussions / General Discussions / Re: Minecraft implementation with Java 3D API on: 2014-09-05 13:43:54
If you want to play around making a voxel engine, by all means, that's the way to go.

Cas Smiley
19  Discussions / General Discussions / Re: Minecraft implementation with Java 3D API on: 2014-09-05 13:18:15
Nope, don't touch Java3D. Too slow, too clunky, too buggy, too old, and not at all suited for Minecraft.

Cas Smiley
20  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-04 11:48:28
I'd definitely learn C++, because it's all over the place and it's good to understand it when you come across it. I personally wouldn't use it if I could at all help it.

Cas Smiley
21  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-04 09:23:47
I use a very limited selection of languages - just one of each sort really.

Java - for everyday things. Because it's quite easy, quite fast, quite simple, quite portable, quite powerful. Quiet everything. I realise "quiet" actually means something completely different in American English, so if you would, please look up the British meaning of the word Smiley

C++ - to make Java talk to other things, and for no other reason. Other people have more and better reasons to use C++, but I don't.

SQL - because that's how you use databases. This is my "functional" language choice as opposed to "imperative". If I were going to design a component based entity system, I'd start here.

I used to use all sorts of other things in years gone past - a lot of BASIC (which I still rate as being one of the best inventions ever) mostly, in all sorts of different dialects. I used to love Logo, and Forth was interesting from a scientific viewpoint. I've had the pleasure of using Prolog, POP11, Pascal, and Modula-2 too, but found no later use for them that isn't covered by Java, C++, or SQL.

What I'm hoping for in the next 20 years is something that brings together a reasonably pleasant mix of functional and imperative programming to take advantage of massively multicore systems automatically without me having to think too hard.

Cas Smiley
22  Game Development / Newbie & Debugging Questions / Re: Random JVM crash? on: 2014-09-03 21:12:59
"C:\Users\jay\Documents\workspace\LudumDare 30 - Torn Warps\desktop\hs_err_pid4512.log"

The information you seek is there.

Cas Smiley
23  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 19:16:25
What kind of effort have you done at tuning?

Tons... sat there with jvisualvm for literally days finding out what's slow and what's not etc. G1GC for some reason just does really badly. Pauselessly, though, eh? Wink

Cas Smiley
24  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 15:38:53
I had been using -Xincgc... switching to G1GC my framerates plummet from 60fps to 30fps. Awkward.

Cas Smiley
25  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 14:09:43
I get about half performance when I switch to G1. Grrr.

Cas Smiley
26  Discussions / General Discussions / Re: Bouncing a game idea around. on: 2014-09-03 08:31:04
I agree; it doesn't sound like a compelling game. Or it might have sounded compelling if I couldn't think of another 10 games that also sound like it.

Cas Smiley
27  Game Development / Newbie & Debugging Questions / Re: Noob Questions From Nickropheliac: Ive been practicing for 2 weeks and... on: 2014-09-01 11:44:45
I'm barely employable and I've been doing this sort of thing for 34 years Cheesy (Java for about 15 of those!) Trouble is the older I get the less I seem to know.

Cas Smiley
28  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-01 11:40:50
Well, it's a great idea, as a tuning option, if you identify this as an area that could do with optimisation in your application.

Cas Smiley
29  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-09-01 09:19:14
Still locked to 60 here on this laptop but suspect then that there's a driver setting.

I still also think it'd look nicer rendered at about half the resolution and then blown up to 2x without filtering Smiley That's just me though. SSAO would make it look lovely but I guess you can't easily do that with sprites.

Cas Smiley
30  Game Development / Newbie & Debugging Questions / Re: Data structures for large arrays on: 2014-08-30 22:47:41
Wait till you've actually got a problem here before you try solving it.

Cas Smiley
Pages: [1] 2 3 ... 330
 

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 (19 views)
2014-09-12 09:08:26

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

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

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

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

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

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

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

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

mitcheeb (35 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!