Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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 ... 54
1  Game Development / Game Mechanics / Re: Making GUIs on: 2015-02-27 11:35:49
I can't really see anything good about the EDT. I don't see why painting, logic and event processing should be restricted to the same thread. It seems like it wasn't thought out very well by the Sun swing engineers. I remember when Java 1.4 was being released and the 'do everything on the EDT' rule was being promoted by Sun engineers, which was presented as a new best practice despite the fact that Swing had been around for years before and even the sun java tutorials at the time were calling Swing object code on non-EDT threads.

I persevered and used Swing in my own game loop thread anyway. But to my horror, some swing components trigger events in their own code which are processed on the EDT and then painting and logic threading problems arise between my game loop thread and the EDT.
2  Game Development / Game Mechanics / Re: Making GUIs on: 2015-02-27 09:49:04
Making GUI components is incredibly hard. Next time I do a project with a GUI I'll try to use someone else's code and save time.

I haven't used libgdx's scene2d.ui (https://github.com/libgdx/libgdx/wiki/Scene2d.ui) or TWL (http://twl.l33tlabs.org/) but I've heard they're both very good.

Another which was good but has since been abandoned is pulpcore (https://code.google.com/p/pulpcore/).
It's no longer maintained but has some good GUI component code that you could pilfer.

All of these projects are generously licensed as either apache 2 (libgdx) or BSD (TWL and pulpcore).

Last time I made a semi-complex GUI rendered in java2D I had to use Swing. But swing and javafx force you to use their own threading model. Everything must be done on the event dispatch thread rather than your game loop thread, which is quite irritating.
3  Java Game APIs & Engines / Java 2D / Re: VSync on: 2015-02-18 15:44:23
In java2d it isn't.

In openGL (LWJGL and JOGL) you can set vsync on and off using their API's.
4  Discussions / General Discussions / Re: What's your day job? on: 2015-02-18 15:39:10
...some teachers are only there to squeeze coauthored papers out of students...

Yes that's a particularly rotten thing that goes on. Typically the poor students that these researchers prey on are the international students from impoverished countries who are extraordinarily smart and hard working but would never complain lest it jeopardise their chances of obtaining or keeping their visa and job.

I've been teaching English in Seoul, Korea in a variety of forms for 21 years (which I suppose makes me incompetent at English). These days I run my own hot dog shop in central Seoul, teach a handful of one-on-one private English lessons at a nice hourly rate, and divide the rest of my time between hacking away on throw-away games & web apps and watching VOD movies with my wife.

Sounds like a pleasant life! I've heard that the highest paid teachers in the world are from South Korea, and that like most Asian countries, teachers are held in high regard like doctors and lawyers. The Chinese even have 'teachers' day' (https://en.wikipedia.org/wiki/Teachers%27_Day)
5  Discussions / General Discussions / Re: What's your day job? on: 2015-02-18 13:54:26
Interesting to hear everyone's stories and impressive careers.

I'm studying finance and economics, trying to find out why house prices are so high for my thesis. I also do teaching and I'm sure that some of my students think I'm incompetent, but hopefully they're a minority.

it does come at a slight cost and that is incompetent teachers.
Beats Texas. We have teachers that are incompetent AND psycho.

All teachers are incompetent Smiley
"Those can can, do. Those who can't, teach." - old proverb

I agree that many university teachers appear incompetent. But I'd like to share why. Teachers are not compensated based on their teaching, they are promoted according to their research output, and fired if they don't perform: publish or perish.

The root of the problem is that students choose universities based on the institutions' notoriety and ranking, which is based on their research output, which leads to hiring good researchers who typically find their teaching responsibilities a chore.
For example, the newest or worst-performing researchers are often tasked with running the large first year 101 courses. This is not because they're inspirational and well-prepared, it's punishment for being at the bottom of the pecking order. The best researchers with the most cachet have their choice of classes which is almost always the small, easy to organise subjects that take the shortest time to mark. The very best researchers usually buy out their teaching time using research grant money, so you will never even meet them as a student.

The teachers are not idiots, they're rationally responding to the incentive system they operate in which puts no value on teaching.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-07 16:31:39
It's funny that the graph doesn't include Android which is the most recognised brand and has the biggest install-base.
Perhaps Android is not included because it doesn't use GNU's GPL'ed software. Though it is based on the linux kernel.
7  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-05 12:52:10
I've never used unit-testing before, but it sounds useful for those reasons jmguillemette mentioned.
Most of the bugs that I make for myself are due to threading, and apparently unit testing threading problems is very difficult:
http://stackoverflow.com/questions/12159/how-should-i-unit-test-threaded-code
8  Discussions / Miscellaneous Topics / Re: Java Certificates on: 2015-02-01 08:19:44
I did the java certification exam (twice!) just because i had no formal qualification and wanted to show on my resume that i was a serious programmer.
Unfortunately i failed the first time because it was harder than i thought!

I agree that if your name is on a big project then it's not necessary.
9  Discussions / General Discussions / Open source licensing of creative works on: 2015-01-31 07:30:07
When choosing an open-source license, I'm inclined to use the GPL 'copyleft' share-alike style license since it's the most restrictive, and gives me the option of putting a less restrictive license in the future if I want. Whereas if I release my work with a more permissive license such as BSD or the unlicense, then I will never be able to make it more restrictive if I want. I've lost the option.

What are your thoughts on this issue?

The reason why I ask is that I maintain a website for my students to answer questions relevant to the subjects that I teach:
http://www.fightfinance.com
Recently a new teacher took over one of my subjects. I'd like to let her continue using the tutorial questions and answers that I made.
It would be nice to see my work continue to be used after I lose interest in it.
However it would be upsetting if a textbook publisher poached all of my work and wrote a textbook based on the questions and charged students to buy it.
For this reason I'm inclined to use a creative commons attribution share-alike license, which is similar to GPL:
https://creativecommons.org/licenses/by-sa/4.0/

Some background for those who are not familiar with the broad families of licenses:
  • Unlicense/creative commons (CC) zero/public domain style licenses. Bitcoin uses the unlicense.
  • Apache/BSD/MIT/CC attribution style licenses. BSD unix obviously uses the BSD license.
  • Copyleft GPL/CC share-alike, and then copyright. Linux, GNU, Webkit browser (Chrome and Safari), Wikipedia, and Oracle Java (with class path exception) use the GPL license.

Here's some data on the prevalence of each license:
https://www.blackducksoftware.com/resources/data/top-20-open-source-licenses
http://blogs.the451group.com/opensource/files/gplusage.png

Altruistic programmers and authors choose the most permissive licenses which are the public domain or attribution BSD-style license.

Most open source projects use GPL which forces any improvements to the code base to be shared. Businesses dislike contributing to projects with this license since it nullifies any competitive advantage from their investment because they have to share their improvements with potential competitors.

For software that I want to make money from, of course I maintain copyright.
But so far I've made no money from any software! So I always end up open-sourcing my work after I realise that I won't be able to sell it because there are a million free and better alternatives or because I lose interest and then I slap a BSD style license on it.

Jimmy Wales founded Wikipedia, arguable the greatest open-source resource, and has now moved on from there to make private wiki sites for games and other things that he can make money from. That's quite an interesting switch.
http://en.wikipedia.org/wiki/Wikia
10  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-29 15:03:40
I personally had the impression for a long time that programming was this thing that only math geniuses could do. This wasn't aided at all by the fact that, in high school, while there was a computer programming class, being in the most advanced math track was seemingly a prerequisite for taking part.
That's funny, I often thought that math geniuses were disadvantaged when doing programming since equality in maths and assignment in programming use the same = symbol but are quite different ideas, consider 'y = y+2', which makes no sense in maths but is perfectly acceptable in programming.

...Fewer than one in thirty people will ever have any use for it, if that. Probably a lot less...
If you consider MS Excel to be programming, which it basically is, then more people than you think know how to program.
For example, most people working in the finance and insurance services industry would know how to do a VLOOKUP in MS Excel and that industry employs 1 in 25 workers in Australia:
http://www.abs.gov.au/ausstats/abs@.nsf/Lookup/by%20Subject/1301.0~2012~Main%20Features~Employment%20in%20Australian%20Industry~241
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-23 18:08:02
I made something similar for polygons (regions) rather than points which was just a simple 2D array of tiles. Would be interesting to see your algorithm working with overlapping regions too.
What do you plan to use your algorithm for?

Sounds like the good ol' Bin.
R-trees can be used for arbitrary shapes as well, both storage and queries, the two types of queries most suited to them is intersection/containment (given shape S, what objects in the tree intersect it?) and k-nearest neighbors.
http://en.wikipedia.org/wiki/R-tree

I'm entering a contest which requires fast spatial queries; I deemed R-trees the way to go.
Now to port it to C...  persecutioncomplex

Interesting topic. Thanks for the link to the bin, yes I made a crude version of a bin. It surprises me to see how far academics have studied geometric algorithms like this.
I notice on the wiki page that bins have similar characteristics to hashmaps. This must be an advantage of the bin over the tree since it makes queries O(1), assuming no collisions.
Trees on the other hand cannot go straight to the correct leaf, they have to climb through the branches from the trunk which is O(log(n)).
But the disadvantage of the bin is that data is often clustered and with each bin being the same size there will be some full bins and lots of empty bins wasting memory.
Is this a correct assessment?
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-21 12:43:47
Been prototyping an R-tree implementation using fancy Sort-Tile-Recursive bulk loading, as detailed here.

Generated from random points, notice the nice, clustered, non-overlapping (leaves) packing:
...
Probably one of my favorite data structures.
Nice job. Looks great.
I found that caching objects in local groups can speed up 2D pathfinding and even rendering significantly. I made something similar for polygons (regions) rather than points which was just a simple 2D array of tiles. Would be interesting to see your algorithm working with overlapping regions too.
What do you plan to use your algorithm for?
13  Discussions / General Discussions / Re: Client/Server Library Discussion on: 2015-01-08 14:24:38
I used MINA and it works well but just figuring out how to send a byte array was very painful.

I haven't used Kryonet but peoples' feedback in the forum is very positive and fellow JGO'er Nate is the developer and he's very astute.

A similarly good API that you might consider is that made by Riven, https://code.google.com/p/pyronet/ which is very fast and low-level.

Some discussion of the API's and the origin of pyronet and kryonet can be found here:
http://www.java-gaming.org/topics/pyronet-lowlevel-nio-wrapper/20647/view.html

Cheers,
Keith
14  Discussions / General Discussions / Re: 2015 Game Development Goals on: 2015-01-01 09:34:53
I recently discovered that this will require me to learn C which I'm quite excited and scared about.

You don't necessary have to know C/C++ to learn OpenGL, though some guides may require you to understand the basic syntax.
- Jev

I've read that openCL computation kernels are programmed in C99. From wikipedia: http://en.wikipedia.org/wiki/OpenCL#OpenCL_C_language
Quote
The programming language used to write computation kernels is called OpenCL C and is based on C99

As are openGL shaders. From wikipedia: http://en.wikipedia.org/wiki/OpenGL_Shading_Language
Quote
OpenGL Shading Language (abbreviated: GLSL or GLslang), is a high-level shading language based on the syntax of the C programming language.

Cheers,
Keith
15  Discussions / General Discussions / Re: 2015 Game Development Goals on: 2015-01-01 05:23:51
Over 2014 I was happy to learn novice-level html, javascript, SQL, linux and tomcat java enterprise edition and java server pages. Game-wise I made little progress but that's fine, I think these broad web development related skills will come in handy for games eventually. 

For 2015 I plan to learn about openCL and openGL. I recently discovered that this will require me to learn C which I'm quite excited and scared about.

It's nice to see so many new folk at JGO, and the older people still contributing interesting insights. Happy new year everyone  Smiley
16  Games Center / WIP games, tools & toy projects / Re: Defiance - An open-source multiplayer 2D shooter game in Java. on: 2014-12-31 01:40:42
Perhaps it's because one of the bots picked up speed shoes?!

GreenLantern made lots of awesome improvements to the game play. My favourites are the tranquiliser gun, rocket launcher, grenades and the trash-talking bots.

17  Games Center / Contests / Re: TAFSJ - The Actually Finish Something Jam on: 2014-12-23 11:23:39
Here is progress for today(warning: 21.9mb gif; click here for still image):
To be continued next week!

Great soft shadows, nice work!
18  Discussions / Miscellaneous Topics / Re: Markus bought a new house on: 2014-12-20 03:18:44
I couldn't live happily in a house like that - too much excess!

Me too! But does it say in the video that he'll live in it rather than rent?
He has to invest his money in something. Buying a big house isn't a bad investment, especially if he rents it out. It's better than blowing cash on a fancy car that just loses money.
The US real estate market hasn't fully recovered from it's big slump in the financial crisis, especially in LA, so I think he's made a good investment:
https://research.stlouisfed.org/fred2/series/LXXRSA


Some religions say that righteous people should donate 10% of their salary to charity (and Christians say that you should save another 10% for hard times in the future).
I'm sure Markus has given some money to charity, and probably gets hassled to every day, but he has no obligation.
19  Discussions / Miscellaneous Topics / Re: Markus bought a new house on: 2014-12-19 11:41:12
Incredible house. Markus is a hero.
It does look like a suitable place for minecraft HQ with the blocky architecture and flat lines everywhere  Cheesy
I still hope that one day I'll make it big like him.

As an aside, I wonder if he bought the house to live in or as an investment that he'll rent?
I'm doing research on house prices for my phd thesis. Average gross rental yields in Australia are 3.8%, which means that his $70m house should cost $2.66m per year to rent. However most high-end property rents for much less.
This indicates that buyers of high-end property place a premium on ownership and the benefits of not having a landlord. They also hope for high capital gains to make up for low rental yields.
20  Discussions / General Discussions / Re: Educational Game Ideas (for comp) on: 2014-12-19 11:22:17
Your chemistry idea is awesome, sounds like crafting which is all the rage.
21  Games Center / Contests / Re: End of 4K. Thanks all! on: 2014-11-30 03:01:40
I'm wondering what the greener pastures are? HTML5/WebGL/javascript as SimonH suggests?

I'm also moving my interests to other pastures.

Would it be heresy to suggest an HTML5 contest instead? I love java dearly but we have to be pragmatic.

Despite never participating i also thought it was a fantastic contest and enjoyed playing the games and seeing the horror and genius of the code.
22  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-19 03:36:25
Hi, Fantastic new release. Thanks for all of Spasi's and the LWJGL team's hard work.
The new window system is great.

By the way I was trying Riven's excellent tutorial on drawing geometry here (http://www.java-gaming.org/index.php?topic=24272.0) and it all works in LWJGL 3.0 without a hitch except for one line:

1  
ByteBuffer dataBuffer = GL11.glMapBufferARB(GL_ARRAY_BUFFER_ARB, ARBBufferObject.GL_WRITE_ONLY_ARB, (9 + 9) << 2, null);


Which just required ARBBufferObject.GL_WRITE_ONLY_ARB to be replaced with ARBVertexBufferObject.GL_WRITE_ONLY_ARB .

Cheers,
Keith
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Announce Pure Java HIDAPI on: 2014-10-21 15:04:37
I thought I read here a few hours ago that the api was not pure java but actually used JNA. Is that the case? Seems strange if those posts were deleted? Or am I going mad?  Huh
24  Discussions / General Discussions / Re: Website Content Management on: 2014-09-22 12:18:45
Or any of numerous other options, just don't roll your own!  Grin

What major features do you consider make it worthwhile to choose wordpress or drupal over a roll-your-own solution?

I find wordpress and php harder to learn than servlets and jquery so I opted for a self-rolled solution. However I have a problem that there's precious few open source java forum software projects on offer. The best I could find was jforum2 (https://code.google.com/p/jforum2/).

Cheers
25  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-17 00:59:52
He already "left" Java two years ago. He's been working on things with Unity and Dart/WebGL in the meantime.

This is one of the main reasons why MineCraft was so successful: because java applets let players try out the free version in the beginning.
Now that applets are dead, moving to javascript/webGL seems like a good idea. But I don't think webGL support is universal yet and there are still many browser bugs.
Congrats to Notch, he's an inspiration to us all. I don't think he sold out, he stuck it to the man by charging $2.5b!
26  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - live visual / coding env - request for testing / comment on: 2014-09-02 02:08:42
Also I tried downloading the example zip file (examples 120620.zip) but couldn't figure out how to load it.

After unzipping externally it should recognise all the subfolders (01 Hello World, etc.) as projects which can be opened.  Huh  Also, in case you got this far, remember to restart the hub (red circular arrow) between trying to run each example.

The project zip / unzip menu items are from the underlying platform, and may be more trouble than they're worth at the moment.  I'll do some testing with them prior to the next release, and if they're not proving that useful will hide them.

Thanks for your input, Neil
Aha! cool, yep the examples work now that I open them as projects. The video input and blob examples were cool, they grabbed the video from my laptop camera just fine. How did you do that? What java lib can get access to the video camera so easily?
Thanks for letting me know about RSyntaxPane, it looks much better than JSyntaxPane  Cool
I couldn't figure out how to edit the code in the 'live coding project', there wasn't any button next to the properties of the code element.
The GLSL example just showed a blank window, but I couldn't turn on the openGL pipeline since only the 'Software Renderer' was available in Tools/Options/Video.
New Custom and Smoky 3D were good. Would be nice to see a demo with an animation of flashing lights or something which is sync'ed with the bass of a song.
Cheers,
Keith
27  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - live visual / coding env - request for testing / comment on: 2014-09-01 14:01:58
I downloaded the latest test build and it worked well.
Would be good if it came pre-loaded with a cool demo project that would play some music and make a video with GLSL just to show off the features.
Impressive for how you were able to borrow some code from netbeans. Was it difficult to integrate? I've also experimented with the swing code editor JSyntaxPane but found it to be unreliable and always wanted to know how hard it would be to borrow the editor from netbeans or eclipse.
Cheers,
Keith

PS: The older version 131206 didn't work when I started it. Just an opening splash screen and then it died, with the process disappearing on the task manager. Windows 7, intel i7.
Also I tried downloading the example zip file (examples 120620.zip) but couldn't figure out how to load it. When I did import project from zip, it popped an error dialog saying "entry anImageFileName already exists. Replace, change....". Then it failed to add the project. Unzipping it manually and trying to load as a project didn't work either since it wouldn't let me select the unzipped examples folder or any sub folder.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-03 11:01:30
Looking suave! Is that the waltz?
Congratulations
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-18 14:32:03
I came across the bug by accident and it took hours to figure out what was wrong.
I just googled it and apparently it's known: https://www.google.com.au/?#q=excel+order+of+operations+bug
It was funny reading the links and seeing smarter guys than us on engineering forums argue about order of operations too.

Microsoft must have made a conscious decision to keep that bug forever to preserve backwards compatibility. So funny. Many bank models and other important things are done using excel, I wonder how often that error pops up and invalidates their equations?
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-18 11:20:28
I just tested it on wolfram alpha and it says its -4:
http://m.wolframalpha.com/input/?i=-2%5E2&x=0&y=0
Pages: [1] 2 3 ... 54
 
BurntPizza (20 views)
2015-02-27 06:09:35

BurntPizza (17 views)
2015-02-27 05:56:17

Riven (9 views)
2015-02-27 02:34:15

Riven (16 views)
2015-02-27 01:47:26

Riven (16 views)
2015-02-27 01:46:04

BurntPizza (11 views)
2015-02-27 00:52:04

BurntPizza (14 views)
2015-02-27 00:50:29

Riven (33 views)
2015-02-26 23:38:45

Riven (10 views)
2015-02-26 23:37:24

BurntPizza (27 views)
2015-02-26 21:13:04
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27
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!