Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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 ... 7
1  Discussions / General Discussions / Re: Booooks? on: 2010-07-19 10:08:40
Growing Object-Oriented Software, Guided by Tests
- Good compliment to Clean Code. It focuses on advanced TDD techniques and OO design.

Working Effectively with Legacy Code
- If/when you need to work on legacy code (i.e. code without tests), this is The Book.

I've also put up a list of useful links for developers:
2  Game Development / Newbie & Debugging Questions / Re: In an absolute coding slump! on: 2010-04-05 11:07:34
Get it working, then refactor the code until it is extremely clean and nice, as much so as possible.

Here are some exercises for practicing writing clean code:

Object Calisthenics - write 1000 lines of code following these rules. That will teach you something on object orientation. Of course in real life one would not use this extreme rules, but I'm guessing that compared to the code that most people write, good OO code is closer to Object Calisthenics than whatever most people are writing today.

Programming Without Ifs - that will teach you to write polymorphic OO code. Again, when you press yourself to the extreme (by not using any ifs), then after that you will better be able to decide that when to use or not use an if. Many times the code can be simplified considerably by avoiding ifs.

In addition to those code quality practices, I recommend learning the TDD programming technique. Here is a tutorial which I have written to help getting started with TDD. The tutorial has been tested by 40+ people on a university course and it appeared to work quite well. If you find something to improve, for example if it's not clear that what should be done at some point, please leave me a message.

And some good books to read:
Clean Code: A Handbook of Agile Software Craftsmanship
Growing Object-Oriented Software, Guided by Tests
3  Discussions / General Discussions / Re: IntelliJ on: 2009-10-17 16:49:05
The big advantages of IntelliJ over the other IDEs are: its editor, navigation, refactorings, code inspections. Take time to learn the most common hotkeys, and explore its features, to be able to take full advantage of what it has to offer.
4  Discussions / General Discussions / Re: Java 7 - somebody using it ? on: 2009-10-08 21:45:24
Would somebody know, whether escape analysis handles autoboxing nowadays better? In some very early benchmarks it was noticed that because autoboxing uses Integer.valueOf(int), which uses a cache of small integer values, the escape analysis was not able to optimize those allocations away (i.e. code that used new Integer() ran faster than the autoboxing version).
5  Discussions / Miscellaneous Topics / Re: Stack Overflow on: 2009-10-02 22:03:35

I just noticed this. How appropriate!  Cheesy
6  Discussions / Miscellaneous Topics / Re: Tetris AI challange on: 2009-09-07 10:19:44
Yesterday I thought about making an AI for multiplayer Bomberman...  Roll Eyes
7  Discussions / Miscellaneous Topics / Re: Stack Overflow on: 2009-08-31 10:09:33
Why would he need to ask about Java if he already knows it well?  Wink
8  Discussions / Miscellaneous Topics / Re: Stack Overflow on: 2009-08-28 18:57:15
Reminds me about - Vote for 1024!
9  Game Development / Shared Code / Re: how many lines? on: 2009-08-15 16:06:50
My current project is an application server for online games. It's still at pre-alpha stage. When I calculated its size a couple of months ago (excluding comments and empty lines), it had 4400 SLOC production code and 7300 SLOC test code (90-95% line coverage). I'm changing its architecture to handle concurrency better (message-passing instead of shared mutable state), which means rewriting maybe one fourth or third of it before it will again begin to grow in size (I just deleted its garbage collector and next I will replace major parts of its task scheduler and database).

Lines of code is good for measuring how big an application is. It's bad for measuring how good the code is or how productive a programmer is, not to even mention how useful the application is to its users. Good code is usually much shorter than bad code. Two projects may be of equal size in lines of code, but one of them might be much easier to extend because its code is factored much better. Two projects may have as much test code and equal code coverage, but one of them might be easier to maintain because its tests are better decoupled from the implementation details, document better why some code was written, run faster, are more reproducible etc.
10  Games Center / Featured Games / Re: Minecraft on: 2009-06-12 13:52:54
Two days ago on "The Giant Pyramid" server it happened, that the whole level (!) got flooded with lava. Apparently one of the hills contained lava and it spread from there to cover the entire map with lava, maybe 20 blocks deep. After some hours of struggling, the level was restarted.

The way that water and lava spead right now, is rather unrealistic. If there is one block of water/lava, it will multiply unlimitedly in volume until everything has been covered up to that high. It would be more realistic if the water/lava volume would stay constant. If there is one block of water and next to it is one empty block where the water could flow, the water will be divided between the two blocks so that both of them will be covered by half a block of water (if it spreads over a very large area, it would disappear). If the empty block is at a lower level, all of the water would move there. The only place where new water would come unlimitedly, is from the sea outside the map. Perhaps new lava could come similarly from a lava pit at the bottom of the map.

This would mean that water/lava is more fluid than blocky, so I understand that it would be harder to implement than the current block system. Do you think that fluids would fit the game style, where everything else is blocky?

I have one idea how draining water could work so, that it would fit into the game world. You could build trees that will drain water. You need to build a line of tree trunks that will on one end touch the water, and on the other end there would need to be leaves under the sun. The thicker the trunk and the more leaves are in the sun, the faster it would drain the water.
11  Games Center / Featured Games / Re: Minecraft on: 2009-06-11 22:34:22
The multiplayer mode is great!

A map and visible coordinates would make it easier to operate in multiplayer mode. For example you could say that you are at coordinates X,Y,Z and you will build a tunnel to X',Y',Z'. Then other players could begin building the tunnel from a different point and meet up at X',Y',Z'. Now it's hard to find where others players are building, when you see only them chatting, but you have no idea that where are the places that they talk about.

Map/coordinates would also help in getting less disoriented in single-player mode.

It would be nice to have some way to pump water and lava away after an accidental flood. For example you could build a water pipe and a pump that would slowly pump the water to somewhere else. Or do you think that it would make the game too easy and less exciting?
12  Games Center / Featured Games / Re: Minecraft on: 2009-06-10 09:24:29
I was playing in a public server and then I loaded one of my own maps. The chat messages continued to show up, even though I was on a different map than the others. Is this by design or a bug?
13  Java Game APIs & Engines / JavaFX / Re: JavaFX 1.2 is out on: 2009-06-03 16:49:41
But Its quite funny of the current Java versions. What will people call it when it gets to 2.0 heh...

Scala?  Roll Eyes
14  Games Center / Featured Games / Re: Minecraft on: 2009-05-28 09:05:58
Nice, new blocks. What is the official interpretation that what the different blocks represent (1-9 and those that you can not build), or should we use our imagination? In some of the rocks I see something that resembles gold, copper and iron - a new game mode in plans?

Bug: When you return to game from the game menu by clicking "Back to game", the click registers also in the game as one dig/build.
15  Games Center / Featured Games / Re: Minecraft on: 2009-05-27 09:45:13
'click & hold' for tunnelling - clicking finger goes numb when digging long tunnels!

I'll second that! A third button would be better than "click & hold", because then there would not be the short delay between clicking and digging faster.

Just imagine how many clicks I needed to dig this cave. Grin Thankfully I found a program called AutoClick that gave me a hotkey for faster digging (10 clicks per second).

It would also be useful to be able to dig an area of 2x2 or more blocks at a time. That would help much in digging large caves.
16  Discussions / General Discussions / Re: When coding in Java, it is damned nice to (fill in the blank) on: 2009-05-26 12:41:31
A generalization of "seeing something on the screen" is getting feedback of what you have done. The sooner you get feedback, the better. The best method that I know for getting feedback of code, is writing tests using TDD. When you write new test code and production code in cycles of less than one minute, and running all the tests takes a couple of seconds, you get immediate feedback of whether your code works or not, which in turn makes programming more fun.

TDD also gives feedback of how well the code is organized and abstracted. With TDD you are changing the code all the time, and if changing the code or writing tests for some behaviour is hard, the design has a problem and needs to be improved. It helps in writing the "simplest thing that could possibly work" - just enough abstractions to keep the code flexible, but not too much to make it overly complex. Because TDD forces the code to be testable/decoupled, you end up doing more object-oriented design, which is also fun.

And because TDD gives you a regression test suite (TDD is a design technique, but regression tests are a nice side benefit), you can change the code without fear of breaking something. You can improve the design step by step, so if the architecture is not good, you can fearlessly make it better without breaking things - refactor and rewrite some parts until you have a better architecture. When the code is well decoupled, you don't need to rewrite everything, even when doing big architectural changes.

I use UML very rarely. In the beginning of my programming career it was useful in putting my thoughts together, but nowadays I don't need it for designing. I might use it for communicating my ideas to others. I can easily keep the design in my head and I know that the simple things will be solved on-the-fly when driving the design with TDD. For complex things, such as message passing in a distributed environment, I may draw some diagrams on paper. The design that I do without writing code (mostly in my head, sometimes on paper) is at the level of subcomponents (each maybe 1-20 classes in size). For class and method level design I don't use any diagrams - those parts I can design better when writing tests and when refactoring.

One thing that I always design on paper, is user interface design - finding out what are the users' goals, defining the functional requirements of the system and testing that the users can reach their goals with the system effectively. For a medium-sized project, that will take one or two weeks, as a result of which we have specified and tested, using a paper prototype, that what is the problem that needs to be solved, what kind of system will solve the problem and how exactly the system should work.
17  Games Center / Featured Games / Re: Minecraft on: 2009-05-24 00:52:06
Very fun, even though there are no goals. You have just wasted two nights of my time. Grin

Here is my first construction, a gate and a boat:

The gate appears to be as high as possible, because the game did not allow me to put any more blocks on top of it. I made the boat by first filling it to drive the water out, and then etching the inside.

Cooperative multiplayer mode would be nice. Maybe so that first in a map editor somebody creates a plan that what to build, and then everybody will see in-game the blueprints (as a wire-frame model) of what they are expected to build.

In a competitive multiplayer mode, it might make sense to restrict the use of some materials. For example, rocks you would need to first collect from a mine, before you could place rocks somewhere else. Wood you could use unlimitedly, but the enemy could burn it easily, so for any strong buildings you would need rocks.
18  Discussions / General Discussions / Re: Should I quit programming? on: 2009-04-29 00:18:41
"A lot of time" in any trade, art, or skill tends to mean at least 10 years


It will take at least 5 years to be any good. It will take at least 10 years to be skilled. It will take a lifetime to be a master.

I can't do complicated things at all.

Think of them as challenges and opportunities to improve yourself. Always try to do something that is more complicated and harder than what you have done ever before. Set the next goal always a little higher than your current level, so that it's possible to reach it with much effort, but not so high that it would demotivate you. And even if you fail, you will have learned something and will do better next time.

For example, I have now been programming for about 9 years. The first 2 years I was just putting some code together without really understanding programming. At that point, the most complicated thing I did was a console Java application which logged into Planetarion, parsed a web page from there showing the status of my planet, and logged into another web site and sent an SMS message through it if my planet had incoming enemies. But when I wanted to write a v2.0 of that with more features, I did not have the skills to design programs larger than a thousand lines of code. I learned those skills only after entering university.

I had my first commercial project on my second year at university, after having programmed some 4 years, and thinking back then, it was pure luck that the project succeeded. I had no requirements gathering, user interface design and project management skills, and the code was so messy that I rewrote 80% of it some six months later (and now, 5 years later, I'm once again redesigning and rewriting it all).

After some 5 years of programming, including a couple of medium sized projects (over 10k LOC), I really started to have a feel of being good at programming and knowing what I was doing. Then I got some regular part-time job of writing Java EE applications. I hadn't developed any Java EE applications when I entered, so it took a couple of weeks to learn the basics. After having worked there 1½ years and getting lots of programming practice, I could feel my skills reaching a new level (then I had been programming for about 7 years).

Now that I've been programming for 9 years, I try to get even bigger challenges, which would help me to rise to a new level. My current hobby project is an application server/distributed database, which is without doubt the most complicated thing I've done this far. I don't know the details of how it will turn out to be - thinking about complicated issues such as high availability, scalability, failover and recovery - but I'm quite confident that I'll manage to solve the issues somehow step by step (given enough time, motivation and not too many other distractions). No pain, no gain.
19  Game Development / Newbie & Debugging Questions / Re: Switching to a real IDE (NetBeans) help me =) on: 2009-04-14 17:08:36
Zip the .class files (so that the "com" directory is in the root) and rename the .zip into .jar. That's how libraries are usually used. (Maybe NetBeans supports also unpacked libraries, at least IDEA does, but if it doesn't seem to work, don't waste too much time in getting it to work.)
20  Discussions / Community & Volunteer Projects / Re: Community Project Mark 562 on: 2009-04-12 21:43:53
What now? The bigger game won't just build itself and it's not just about having better graphics.

After that it's like managing any other software project where the team is distributed, which makes communication much harder than if they would meet every day. Maybe or some other place has ideas on how to make that happen.
21  Discussions / Community & Volunteer Projects / Re: Community Project Mark 562 on: 2009-04-10 10:00:46
How do you make the transition between the prototype and the mass production phase?

You let others play your prototype, and if they find it fun, they may be willing to join the project. The code from the prototype is not necessarily reused, probably there will be a clean start (unless it's more like a maintainable tracer bullet than a throwaway prototype). The project will have the prototype's core concept as their focus in gameplay.
22  Game Development / Networking & Multiplayer / Re: Project Darkstar? on: 2009-04-09 12:32:46
Darkstar is much more than a networking API. It is an application server which takes care of many issues related to concurrency, so that you can write the server code as if it was single-threaded, but the server will execute it using multiple threads and servers.
23  Discussions / Community & Volunteer Projects / Re: Community Project Mark 562 on: 2009-04-09 12:29:50
We could do so, that everybody will work on their own little game prototype at their own pace, and then if one of them produces something fun and the community agrees that it is fun, then a community project will be started.
24  Discussions / Community & Volunteer Projects / Re: Community Project Mark 562 on: 2009-04-08 22:31:47
When I was at the last GDC, there were some good points in Satoru Iwata's keynote about how they develop game ideas at Nintendo:

1. First Miyamoto gets an idea for a game by observing things that people find fun, and analyzes them to find out what is fun about them. Quite many of his ideas come from his hobbies (gardening produced Pikmin, getting a pet produced Nintendogs and even Wii Fit came from his hobbies), so Iwata said that he has made Miyamoto sign an NDA for not talking about his hobbies outside work Grin.

2. Then when there is an idea, a small team of maybe just one developer will work for months or years on building a prototype game which concentrates on what makes the game fun. At the same time, multiple prototypes are in development on their own pace (Iwata will never ask how a prototype is progressing, for fear of giving pressure to finish it more quickly). Only after the prototype is fun, the production of a publishable game begins together with a big development team. Then they know that the core concept has been proved to be fun, so they always have something to which to return if the actual game is not anymore fun.

3. During development, hallway usability testing is used much. Miyamoto kidnaps a random Nintendo employee (non-developer) and forces him to play one of the games, while Miyamoto silently sits by and watches what the player does - what is fun and what is frustrating.

I think that by following these ideas, especially the point about first creating a fun prototype, would help a community project like this to succeed.
25  Game Development / Shared Code / Re: Open Source Shmup: Blue Fiend on: 2009-04-05 17:07:09
With some fine tuning that might be quite good. Smiley Now the game gets too hectic quite quickly, so that it's hard to say what is happening. Maybe try slowing down the game and increasing the number of enemies more slowly. This game definitely needs some sounds. Use less motion blur with discretion. Maybe motion blur could be relative to how much damage your ship has, together with warning sounds and other effects when the ship is at its limits. How would collision detection be, so that you can't move through enemies or other obstacles? When the gameplay is better, add more levels, maybe also make it side-scrolling with some environment and waves of enemies.
26  Games Center / Showcase / Re: ApoBot and ApoPolarium on: 2009-03-31 19:47:17
I liked the ApoBot. I played through the medium and hard levels. As hexatronic said, double clicking would be useful, for example so that by double clicking a command it would add it to the previously selected function.
27  Discussions / Miscellaneous Topics / Re: IBM to buy Sun for $7 Billion? on: 2009-03-18 11:26:21
Sun, whose name stands for Stanford University Network
I had never known that!
28  Discussions / General Discussions / Re: How do you make coding easier to yourself? on: 2009-03-13 16:50:56
And that video reminded me of this video

And that reminded me of this video

...and also of the pain of seeing that movie.
Click to Play
The 1973 version was indefinitely better.
29  Discussions / Miscellaneous Topics / Re: Personal Message Inbox full after 1 message on: 2009-03-12 00:22:54
PM could not be sent to 'JoglHurt' as their inbox is full!

A short while ago I sent JoglHurt a message and it was ok, but now my second message to him failed with the above error message. Since he JoglHurt has been here only a couple of weeks (with 5 posts), I doubt anyone else has sent him messages, so I suppose that his inbox has exactly one message - and it is full!

Could we get this problem solved?

P.S. JoglHurt, you can see my email address at so we can continue our discussion.
30  Discussions / General Discussions / Re: How do you make coding easier to yourself? on: 2009-03-10 23:33:37
Advanced IDEs make writing, navigating and refactoring code much faster than using a simple text editor (not necessarily easier - the hard thing about programming is not writing the code, but knowing what code to write). It would be unprofessional to not use the best tools available (I use IntelliJ IDEA). You also need to know how things work in the grass-root-level, so that you can work things when they fail, but under normal circumstances you don't want to waste your time doing repetitive things that can be automated.

The thing that has had the most impact on my coding is TDD - it turned upside down the way I approach writing code. For me, it has made programming more fun, because it gives a quick sense of accomplishment and progress when you see new tests pass, and it lets me do more OO design and use more design patterns, because writing testable code requires decoupling the code elements. Also I spend less time debugging the code and searching for nasty bugs, because I have a good test suite which finds 99% of them, and it allows me to refactor the code without fear of breaking something.
Pages: [1] 2 3 ... 7
ivj94 (579 views)
2018-03-24 14:47:39

ivj94 (43 views)
2018-03-24 14:46:31

ivj94 (362 views)
2018-03-24 14:43:53

Solater (59 views)
2018-03-17 05:04:08

nelsongames (104 views)
2018-03-05 17:56:34

Gornova (138 views)
2018-03-02 22:15:33

buddyBro (681 views)
2018-02-28 16:59:18

buddyBro (89 views)
2018-02-28 16:45:17

xxMrPHDxx (491 views)
2017-12-31 17:17:51

xxMrPHDxx (727 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

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 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‑
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!