Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (731)
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 ... 9
1  Java Game APIs & Engines / OpenGL Development / Re: Mutithreaded LWJGL - Works... Sometimes on: 2016-05-01 11:19:35
I was primarily using the Countdown latch to wait for the threads to finish closing before closing the main one, but it seems like the executor service does this for me...

If the main thread deals with the window/input events what will happen if I add a glfw key callback to the child threads? Will they still be called back, or do I have to track which window is focused myself?

I recommend you look at the GLFW documentation. For each function, it gives you all the relevant info you need on thread safety. For example, from the docs for glfwCreateWindow:
This function may not be called from a callback.
Thread Safety
This function may only be called from the main thread.
2  Discussions / Miscellaneous Topics / Re: The "impressiveness" of games on: 2016-04-12 14:47:56
There's always a core audience that prioritize fun, for some definition of "fun", over eye candy. The penultimate example is perhaps the loyal Dwarf Fortress player base. Players are so passionate about that game they donate money. If game making is what you're after, make the games you want to play and then do what you can to connect with like-minded players. They're out there if you can find them (and you follow through with the implementation).

There's only so much time in a day, so many days in a year, and so many years in a life. Decide what it is you want to pursue and put your energy into it. Otherwise you're just treading water and wasting time.
3  Game Development / Newbie & Debugging Questions / Re: 24bit vs 32bit ColorModel performance on: 2016-03-09 06:37:26
I've read around and people say that 32 bit is faster because the processors are able to handle 32 bit numbers faster than 24 bit ones,

That's a bit of a misleading way to look at it, though. It's not 24-bit vs 32-bit *numbers* you should be thinking about, but data types. And unless there is some darkened corner of Java I'm oblivious to, there's no 24-bit data types to worry about. If the color values weren't stored in 32-bit integers, then they'd have to be separated into 3 8-bit values or 1 16-bit and 1 8-bit (which would just be weird). A 24-bit RGB in a 32-bit data type (int) is just an RGBA value whos alpha component is ignored.

The argument holds true to some extent for lesser bit depths, though. A 16-bit color value would be more efficiently manipulated in the native word size (32-bit or 64-bit) than as a short.

and also I read that not using the 8 bits at the end of the 24 bits (because modern registers are 32 bit) is a waste of memory.

Which in practice is really no concern. It's not like you have much of a choice for 24-bit color values, though. Either you use a tightly-packed array of bytes where each byte represents one component of an RGB triplet, or you use an array of ints where each int represents a full 24-bit color value with 8-bits unused. There are performance vs. memory implications for both approaches, but I don't see that either would be statistically relevant in any but the most extreme circumstances (such as a heavily resource constrained system -- in which case, what the hell are you running a JVM for in the first place?). If I were implementing a graphics package myself, I'd would certainly use int to represent 24-bit color values unless I knew the more common use case would be in implementing individual color components rather than full color values.
4  Game Development / Game Mechanics / Re: Updated translate? (Extended Convo) on: 2015-07-17 02:49:08
You really need to get a grasp on the fundamentals of what is going on when you call glLoadIdentity and glTranslatef. Here's a link that might help get you there:

Google "OpenGL modelview matrix" for more stuff. Understanding how this works is rather important in putting your own renderer together.
5  Discussions / General Discussions / Re: English proof-reading service? on: 2015-07-07 01:36:36
I've been teaching English in Korea for years and do proof-reading on the side. Doctoral dissertations, business papers, medical journal articles... a wide range of stuff. If you're interested, PM me with some info on what it is you need reviewed (word count, particularly) so I can get an idea of how long it would take me to do it. If it's relatively short, I'd be happy to do it for free, but anything that's going to take a chunk of time I'll have to charge you for. I have very little free time these days. I charge reasonable rates though (which is why my students and their friends prefer to pay me to review their stuff rather than a professional service).
6  Discussions / General Discussions / Re: Contacted by a publisher to be a technical reviewer on: 2015-05-12 06:41:32
KevinWorkman seems to have misunderstood what a technical reviewer is Smiley

Several years ago I coauthored "Learn to Tango with D" for APress and am currently working on a D book for PACKT. A few points from my experience.

* The primary role of a technical reviewer is to look over the preliminary draft of each chapter and comment on any coding errors, erroneous descriptions, or any other mistakes related to the technology being covered. They're also free to make suggestions on how to improve the text.

* The author may make recommendations for technical reviewers. I gave PACKT a short list of six guys I know from the D community who are highly knowledgeable in different areas. I don't know how many people they contacted, but currently I have four technical reviewers, all of them from my shortlist. These guys are professionals who know their stuff.

* AFAIK, it's typical for the publisher to offer books and discounts on purchases of their books. It's not just PACKT -- APress did the same. It may be possible to negotiate a cash payment, but don't hold your breath.

* In working as a technical reviewer, you are then on the publisher's contact list. That could lead to further, potentially paying, offers in the future. I've read on blogs how some tech book authors got book offers after having worked as a TR.
7  Discussions / General Discussions / Re: What's your day job? on: 2015-02-18 14:08:14
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.
8  Game Development / Game Play & Game Design / Re: How to be a more creative writer? on: 2015-02-09 14:35:29
The only way to become a better writer is to write, write, write. Write short stories. Participate in NaNoWriMo. Learn about the different approaches used to craft a story, such as the Hero's Journey (aka the Monomyth). I mention that one specifically because I think it's a great method to use for crafting a story for an RPG.

Ultimately, you have to expend effort to improve at something, no matter what it is. We work our way through Pong and Asteroids clones and text-based adventures and voxel engines to reach the Holy Grail, the games we really want to make, because we can't make the games we really want to make until we know everything we need to know to make them. Writing is the same, whether your goal is to write a novel or the story for a deep RPG. Until you've got the experience under your belt to craft that story without making novice mistakes, you aren't going to achieve your Holy Grail.

Toward the end of killing two birds with one stone, I would advise the following approach. Put your big text-based RPG on the back burner for a bit. Instead, do a little bit of research about how to write short stories, then write two or three. Keep them small and simple. Pick the one you like best and adapt it to a text-based game. Then do it again. And again. Write two or three stories on each iteration -- never just one. Assuming you keep the scope of both the stories and the games small enough, then by the end of the year you'll have several stories and a handful of complete text games under your belt. Then you'll be better equipped for a bigger one.
9  Game Development / Newbie & Debugging Questions / Re: Using enum, how does this work? on: 2015-01-03 03:48:48
Um, I think I might have been misunderstood.
I mean something like
/** Types of foobangs. */
public enum FB_TYPE {
 /** special type for all types combined */

This is the code that has me confused. So, that ALL works for all the three previous or what? Does FB_TYPE.ALL == FB_TYPE.GREEN result in a true or a false?

It looks like you're thinking of bitflags, but have it all garbled up.

In C, it's a common idiom to use the bitwise OR operator to munge several enum values together, then test them with the bitwise AND. You can then declare a single enum value that ORs everything together for you. Like this:

enum MyFlags {
    NONE = 0,
    GREEN = 0x01,
    WRINKLED = 0x02,
    SWEET = 0x04,
    ANOTHER = 0x08,

A comparison with ALL will only return true if it is actually compared with ALL. You can't get true from ALL == GREEN, for example. To test, you have to use AND: if( val & GREEN ) == GREEN)...

AFAIK, the way to do this in Java is either to give your enum a constructor that takes an int parameter (since the values can't be sequential - you have to use sequential powers-of-two) or to use an EnumSet. But I don't know of any magic wildcard enum trick.
10  Discussions / Miscellaneous Topics / Re: How alive is the forum? on: 2014-12-29 10:09:46
I love the activity level here. I've been dropping by nearly every day for years. Clicking 'Show unread posts since last visit' typically shows me nearly two, sometimes three, full pages of post. It's easy to scan through and look for anything interesting without wondering if I'm missing anything. And the folks 'round here are friendly.
11  Game Development / Newbie & Debugging Questions / Re: LWJGL3 no GLFW package? on: 2014-12-06 09:05:30
Is there any way to have multiple windows in multiple threads?

Yes. The restriction on keeping event handling in the main thread comes from GLFW (if you haven't already, it's a good idea to familiarize yourself with the GLFW reference documentation). Some functions may only be called from the main thread and some may not be called from callbacks. That does not preclude using multiple windows in multiple threads. A rendering context can be made current on any thread, regardless of where the window was created. Once you're familiar with what can and can't be called from where, it's fairly easy to set something up.

I didn't write this and haven't tested it myself, but this is an example of using multiple windows in multiple threads with GLFW in C. From there, it's not hard to work out how to push events onto per-thread cues to handle as you see fit. GLFW also has an API for querying the device state per window (glfwGetKey, glfwGetMouseButton, etc). I haven't looked closely enough at LWJGL3 yet to know if they expose that or not, but if they do those functions appear to be callable from threads other than main.
12  Discussions / Miscellaneous Topics / Re: Rad Tools / Molly Rocket's Casey Muratori does game programming stunt in C on: 2014-11-17 11:48:19
/r/programming is also a good place. Usually, links I see people post here and other forums show up there first.
13  Discussions / Miscellaneous Topics / Re: The C family, should I dig deeper? on: 2014-11-14 05:26:48
Yes, learn C! I've been using it for years and despite my attraction to other languages like Java and D, I still whip up projects in C now and again to keep sharp. I've never really been able to get into C++, no matter how often I try -- I find myself dropping back to C every time.

Aside from learning what it's like a bit closer to the metal, it will also teach you to be more context-aware when you write your code. You don't have safety nets like bounds checks and GC and RAII and all these other nice memory-safety features of modern languages. You'll learn to be careful after you get tired of tracking down segfaults and access violations. However, it is *extremely* easy to write broken code in C that will never be caught during development, but will explode in the wild when someone discovers a security hole in your app. Because of that, you can only pick up so much learning how to program defensively in a passive way -- you have to actively focus on it to really be safe.

For example, you have to really remember to validate input parameters, do your own bounds checking (usually in asserts), make sure you don't allocate memory without also adding a statement in the appropriate place to free it, and so on. One small oversight and BOOM! Even after nearly two decades of C and despite all of the defensive measures I've adopted over the years, I still catch myself with a hard to find bug because I overlooked an off-by-1 error or some such and wound up stomping memory somewhere.

C can be tedious, unsafe, and often less productive than many other languages, but I will always love it.
14  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2014-11-07 12:53:40
Personally if it was me I would be doing something like release, update patch.

Indev v9.2.11 etc.

That's fine when your target audience is primarily other developers, but for the general public something without so many dots is much much more comprehensible.
15  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2014-10-10 07:54:59
Congratulations! I rarely throw money at games on Kickstarter or vote on Greenlight, but you've got a fantastic thing going here and I had to do both. I've seen a number of projects take root in several development communities over the years, but I can't recall ever being as eager to see one succeed as I am about this one. It's been a lot of fun watching your progress. Keep up the good work Smiley
16  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-06 02:44:59
Regarding D, I always wondered to myself, who needs D when you can have an AOT compiler for Java?

For me, D fits in a space nicely snuggled between C++ and Java and resolves several of my gripes about both languages (and, of course, introduces a completely new set of gripes). It also has a few niceties that the other two don't which add up to be a very big deal. I'm not going evangelize it or anything, here, but I'll say that I personally feel more comfortable and have more fun programming in D than any language I've ever used.

That said, anyone deeply entrenched in Java or C++ who doesn't have the same issues I had with either language likely won't find it interesting. There are enough similarities that it's incredibly tempting to try to program like you do in the language you're most familiar with, but when you try to do so it's different enough to make the experience frustrating for anyone unwilling to adapt. Most D users I've spoken to will tell you that once you get over that hump it's a great deal of fun.
17  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-05 15:29:42
These days most anything new I start is in D. For the past 10 years, I've been maintaining some bindings that are useful for game development (the current incarnation is DerelictOrg). I used to code heavily in both C and Java (and got paid for it for a while), but these days I only do little one-off projects with them now and again just so I don't go stale. I still enjoy them, but my involvement in the D community rather focuses my attention that way (I've been a regular lurker here for ages upon ages, though). I'm itching to do something with libgdx if I can ever make time for it.

I've used a very small handful of other languages now and again for more than just toying around, but have no time for them anymore. That said, I'm very interested in Dart and have been steadily ramping up my knowledge of its ins and outs. I have an idea for a project I'd like to do with it, but, again, time is the ever-present monkey on my back. Someone seems to keep shorting me, in ever greater increments, on my daily 24-hour allotment with each passing year.
18  Discussions / Miscellaneous Topics / Re: So many indie games in development, how many really are completed? on: 2014-09-02 08:30:55
As I see it, there's a fine line between "indie developer" and "not-quite-yet indie developer" (or, perhaps more accurately, "hobbyists who want to sell a game"). The former group includes individuals and teams who have actually released a game. If you just focus on them,  I suspect the numbers will look different.
19  Game Development / Newbie & Debugging Questions / Re: creating grid based ascii graphics for a rogue like on: 2014-05-29 13:23:34
There's also AsciiPanel. It's not a full-featured as something like libtcod, but has that old time terminal feel.
20  Discussions / Miscellaneous Topics / Re: Getting back in touch with reality on: 2014-05-28 10:41:38
A few years back, after I realized how much weight I had gained and how unhealthy my lifestyle was, I decided to never again put myself in the position where I *need* a break. Instead, when I'm not at work I stay active by walking where I need to go as often as I can (easy to do when you live in a metropolis like Seoul), exercise (ride my bike, go hiking, hit the gym), meet friends, run errands, make time for chilling with my wife, and fit my programming time into what's left. Not only am I in much better shape, but I feel more productive when I'm on the keyboard. As it turns out, once I made the changes and adapted to my new lifestyle, I actually have more time for coding than I expected to.
21  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 00:30:56
When loading resources (via getResource/getResourceAsStream), the resource is loaded via the ClassLoader. For the default implementation, this means the files need to be on the classpath. Whether you are running from within the IDE or from without is irrelevant -- the classpath is all that matters. Here are two things to keep in mind for this to work both inside and outside of Eclipse.

1)  Inside Eclipse, your project's 'bin' subdirectory is already on the classpath, so that's where you want your resources. An easy way to do this is to create the resource folder as a package inside Eclipse (via "New Package"). Then you can import your images into the package.

2) Outside Eclipse, make sure the jar containing your resources is in the same place as the jars containing your classes (if they aren't all in the same jar).

Given the folder (package) 'res' and the file 'res/foo.png', then getResourceAsStream("res/foo.png") should work in both cases.
22  Discussions / General Discussions / Re: Size of games written in Java. on: 2014-05-07 12:55:28
You can write games bigger than Baldur's Gate and Diablo. Write a sandbox RPG like the Elder Scrolls games, if you want. Java isn't going to prevent you from doing any of that as long as you can bring your skill set up to the challenge.
23  Discussions / General Discussions / Re: Size of games written in Java. on: 2014-05-07 12:06:10
To get right to the point,
I want to know if it's possible to write complete full-sized rpgs like Baldur's Gate and Diablo/Diablo 2 with Java.


On an unrelated note, the forum is telling me that 90% of my post consists of quotes, so I either have to remove quotes (which is rather silly in this case, since I only have one -- the question I'm answering) or write something interesting before the post will be accepted. Since my answer really needs no more information other than a simple "yes", I'm putting filler here so that the post will be accepted. I really don't understand this. Never seen such a thing on any forum in all my years of trawling the net.
24  Game Development / Newbie & Debugging Questions / Re: [IP Addresses] What IP do I use for a server? on: 2014-04-30 06:04:20
Any cheap VPS. A few bucks a year will do.

I can say many, many good things about Linode. The best being that every so often they upgrade your plan -- one or more of more bandwidth, more memory, more disk -- without increasing the price. Recently, they upgraded memory, bandwidth and converted the hard drives to SSD in a smooth and painless process. The support is top-notch also. Digital Ocean seems to be their biggest competitor right now (after Slicehost got gobbled up by Rackspace, they are no longer in the same league). They have cheaper plans and I haven't heard much bad about them, but Linode just rocks. I couldn't imagine going anywhere else for a VPS.
25  Discussions / General Discussions / Re: is finished on: 2014-04-28 05:03:00
Anyone that's been around here for awhile should know I'm a "patterns concerned harmful" kinda guy.  Why on earth do pattern-heads have to take existing techniques (usually reducing them down to a special case) and tag the word pattern at the end without bring anything new to the table?  Why I ask?

He actually talked about that in the introduction. IIRC, the GoF talked about it as well. Patterns are intended to establish a common vocabulary for people to discuss software architecture. Instead of giving a long winded description of how someone might implement something, you can just advise them to "use a flyweight implementation." I makes it much easier to hash out ideas, describe projects you've worked on, and so on. In practice, many have come to view them as cookie-cutter recipes, but that was never the intent at all.
26  Game Development / Newbie & Debugging Questions / Re: Sprite Based 3D in Java? on: 2014-03-24 09:18:12
This technique is called raycasting. Hit Google up for raycasting tutorials and you can find a lot of stuff out there. Plus, it you can find it (out of print for a while now), the book "Gardens of Imagination" by Christopher Lampton is a really good treatment of the topic. He shows a few different approaches to it.

IMO, raycasting can be a fun and interesting thing to learn, but I wouldn't spend too much time on it. Even if you're looking to make a game with that sort of retro feel to it, it's probably better to use a simple shader-based renderer with cubed geometry for the world and billboard sprites for the entities. With a little bit of matrix manipulation and the right texture filtering, you can probably get nice looking view that brings the old games to mind but looks much better than an actual raycast engine.
27  Discussions / General Discussions / Re: Family problems because of programming? on: 2014-03-10 08:23:37
I first took an interest in programming in the early 80s, when I was 9 or 10 years old. At the time, my parents didn't think I could be serious about it (I wanted to program games, of course) so couldn't really justify the expense of a new computer. We weren't very well off at all and computers were a significant expense back then. So I had no support whatsoever. I had a few opportunities now and again to bang out some very short Basic programs (at Sears or Radio Shack, or my uncle's house), but never any chance to do anything beyond that. It took a while, but that eventually killed my interest and I moved on to other things. I didn't get my first computer until I was almost 29. That rekindled the flame and I jumped into Java 1.1 right away.

I say this because I wish I only had the problem that my father thought it wasn't a manly thing to do! With computers and access to information as ubiquitous as they are these days, more young people in the industrialized world have amazing opportunities to learn things that were well beyond reach for a majority of kids in my generation. There are still a lot of place in the world where they don't, but that is shrinking every year. Whatever your father thinks of programming, at least he isn't trying to prevent you from doing it.

That said, I did have issues with my wife for a while. When we first got married, it took quite a bit of time and effort to find a balance between my programming pursuits, work and family life. Somewhere along the way, things worked out and it stopped being a major issue, but there can still be times when I'm sitting in front of the screen at 1 am and torn between getting to the root of some bug and going to bed. So I don't think conflict between programming and family ever really goes away completely -- it just changes form. As a hobby, it's really, really time consuming and demands a great deal of focus and attention, so there's always bound to be conflict of some sort.
28  Discussions / Miscellaneous Topics / Re: C++ standard library is really lacking - good or bad? on: 2014-02-27 15:27:11
For pure learning experience there's nothing really to be gained by learning C++ if you know java...they're pretty much the same.  If that's the case you should choose a language that'll teaching something new about programming.

I disagree. I think differently and design differently in both languages. Certain common C++ idioms are just not applicable in Java (and the other way, too). I think understanding both languages in enough detail to clearly appreciate the differences between them is a valuable undertaking.
29  Discussions / Miscellaneous Topics / Re: C++ standard library is really lacking - good or bad? on: 2014-02-27 04:31:12
Here are some ideas on string trimming in C++.

There's also the C++, Rust & Go rival, the D language ->
Like Dart, it also implements classes & GC very Java like!   Grin  

I've been involved with and using D in one form or another for 10 years, almost exclusively for the past couple. It's usually my first choice for any new code I write. It's hard for me to even touch C++ anymore, though I still have a soft spot for Java (I have a Java project I'm working on sporadically that I hope to finish eventually).
30  Discussions / Miscellaneous Topics / Re: Optimal size of a blog post? on: 2014-02-04 11:08:19
I'd say it depends on A) target audience and B) what you want to say and C) why you want to say it. If you can say everything you want in a way that is engaging and informative for your target audience and manage to achieve your goal in C, then you've found the optimal length.
Pages: [1] 2 3 ... 9
Mac70 (32 views)
2016-05-24 21:16:33

theagentd (41 views)
2016-05-14 18:38:35

theagentd (73 views)
2016-05-10 22:37:41

theagentd (79 views)
2016-05-10 22:33:46

IanParcs (110 views)
2016-04-18 14:18:53

KaiHH (102 views)
2016-04-18 08:35:41

KaiHH (129 views)
2016-04-15 12:43:58

theagentd (133 views)
2016-04-14 02:16:17

theagentd (157 views)
2016-04-14 02:15:43

IanParcs (251 views)
2016-04-12 03:51:16
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50 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!