Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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]
1  Game Development / Newbie & Debugging Questions / Re: Avoiding redundant code at all cost? on: 2012-11-18 19:13:38
I wonder if it isn't that which is slowing game developers? Or at least hobbyists.

I mean, so far, I've been struggling to make several tools, supposedly to help me building my engine, supposedly*2 to make the game easy to create in the end.
But I may admit that sometimes, you're just not motivated.
Having a tool isn't necessarily a step in the game creation, so when I'm stuck on on I just feel like I'm not progressing and start to lose interest gradually over it.

Well, since I already went over that part using Game Maker (still, making the tools was funny because it was like creating a game for a game), I know that this kind of pain is definitely worth it. But sometimes, the motivation is just not here, so you just end up browsing JGO or playing games instead of making them  Grin
2  Game Development / Newbie & Debugging Questions / Re: Avoiding redundant code at all cost? on: 2012-11-18 11:34:30
I think the only thing that is to be avoided at all cost is *gasp* that the paying user/player runs into a bug.

Anything else affecting your code should be avoided, but never at all costs. Trying to refactor an existing codebase into a better design, over and over again, is exactly the reason the developers on this forum are barely productive. We have so few finished game releases per month that it's a bit shameful. Sometimes not having a fancy IDE is what makes you productive, because you simply have to move on with what you have and you just want to get it over with. The next game will have a better design, not this one.

+1 to this. There's always a better way of doing something. It's an endless cycle. Where do you stop?


As suggested earlier I've just stop trying to make it "pro" and start to use THE, or more like, MY easy way to code things, mainly to have at least different steps working for the game. Let me tell you that it works like a charm, not really a professional code but meh, it works, and more importantly I start to have fun again while coding.

( that awkward feeling of being stuck... I almost missed the time under Game Maker at some point, things seems more "easy & fun" to code script )
3  Game Development / Newbie & Debugging Questions / Re: Avoiding redundant code at all cost? on: 2012-11-15 19:05:59
procedural programming.

Huho, I didn't think about it that way. Makes sense, I always used to code like that, maybe it's why I'm having an hard time figuring out things.

Well, It's not like I don't understand the point of having methods in a precise class (logic), but for some reason I always end up wondering : "Wait, what if I want that method to do more things? Receive more parameters? Or simply use it from another class?"
Mainly, this is why I'm using lots of "Updater" classes, since I just have to modify it and it won't have any kind of impacts on my existing classes. I'm sort of looking of a "safe" way to code, maybe. Usually I like to delegate actions to others objects, in the end I have LOTS of objects (or a big object doing all the things), it's just easier for debugging, I think...?

Funny, I did think about having a big "GameEntity" abstract class, which would be the mother class of all my others game objects, but then I realized that would be just "doing Java in Java", and thought I was just trying to reinvent some sort of wheel, which is a bad thing. Maybe I should have kept this solution.

It seems you like to scatter the class data in loads of other classes to avoid redurancy.
For small things this can be smart and stuff, but for bigger projects i would not recomment it.
I dont know how experienced you are with OO pragramming, but you should read some more about it, what you are doing looks more like C programming.

*Sigh* - Seems so, even though I actually never started a project in C or C++, that's the joke. (but with lots of language like it I admit)
4  Discussions / General Discussions / Re: You're Good? Bad? or Don't Care? on: 2012-11-15 18:09:50
Wow, that thing is depressing. I didn't know that I was THAT bad  Clueless
5  Game Development / Newbie & Debugging Questions / Avoiding redundant code at all cost? on: 2012-11-15 17:48:47
Mainly a subjective question (a bit similar to my previous thread)

Let's say that I have a 2 classes : Player and Background. (it's just an example, I don't have them that way)
Eventually, I'll have to render them on the screen so they will, at least, both have :
- int x, int y, int w, int h (position) (or a vector, doesn't matter)
- float a, float r, float g, float b (color)
- more things (...)
There are lots of way to solve this, but what would be your approach? Make an intermediate class that will hold the values? Extend it? Integrate it as a parameter in both classes? Or simply copy'n'paste all those type of variables in all classes?
Even tough it's supposed to be good practice to avoid redundant code mostly for performance and/or evolution issues, we're just talking about int & float in modern applications here so does it really matter?
Besides not using an intermediate object makes it easier to access the value from an instance: pl.getX() instead of pl.getPosition().getX() for example. Using intermediate objects for redundant values seems the good way, but somehow when you start to have lots of classes, you just end up calling an intermediate value from another intermediate object from another intermediate object again.

One other thing, are you using interfaces a lot to implement common methods? What I mean by that is, most of the time, I find it easier to just make a Factory/Builder or whatever "Checker" class with statics methods to do the job. I don't know, for some reason I just enjoy making a pattern where I have ONLY values left, and ONLY methods right, not both in the same class, but is this really a good thing?
For example, instead of implementing an interface that would make my Player class have an "update" method, I'd just create an Updater static class (which will virtually be able to manage all kind of 'updates' needed for the game) that will make different things depending on the method I'm calling and with what parameters, like for the print :
- public void update(Player player)
- public void update(Background background)
I just don't like to have that "@override" method in my Player class, I'd rather have it hold important values only.

Most of the time, I just take too damn much time thinking of things like the ones mentioned in this thread, even though I know it's a bad thing, but I can't stop  Angry
I seriously need to kill that part of my brain...
6  Game Development / Shared Code / Re: File Loader on: 2012-11-07 16:38:08
Quote from: NeverHappened
What is your primary language thread.
I'm french  Grin
7  Discussions / General Discussions / Re: Game Maker and similar tools on: 2012-11-07 16:33:04
Quote from: Anonymous
Game Maker
Well, as an old user of Game Maker, I'll say that it's not a so hard engine if you've got basic skills when it comes to programming.
I did make my previous engine on it, and with the knowledge I got from Java/C etc.. I even think that I can improve it.

But as Cero said, you'd better just use something else if you plan to make an ENGINE. I don't know about the new version of GameMaker (was using the 8.0), but here are the points which made me go straight to Java (or C++/C#, still wondering) :

1) Full version = You pay.
As 'normal' as it sounds, check 2) to understand why I didn't want to do that.

2) GM is not that 'completed'.
For example, most of the time you'll want to add a .dll file to your project (if you're making your OWN game engine, chances are you'll have to create the dll yourself), and back in the days I was pissed at the fact that I had to do some heavy scripting to have something done (the previous Array didn't have a .getSize() method, hahahahahaha... ~ahem)

3) Do you Memory management?
GM will just punish you *10 if you're doing it wrong. Besides if you have to do it that much you'd better off with C if you like that much memory headaches.

4) Script MORE please.
I did SOOOOO much scripting on it, because I was making an "ENGINE" too. Then I realize that instead of coding that much in GML I'd be better off coding in something with more possibilities.

Oh well, I'm bashing it but GM is quite ok if you want to make a game actually, but it's still a point&click engine. Yeah you can use GML but --> 4).
8  Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions. on: 2012-11-04 19:32:00
Well, it avoids adding X more lines to my reply... :/
Sorry bad habit, I have to get rid of it, somehow... (see? That's 6 more lines !)
9  Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions. on: 2012-11-04 19:29:14
( ... )
Meh, sorry typed it too fast. Actually if you want to know I have (instance of the Character class):
- character.sprite.speedX.acceleration.value
- character.sprite.speedY.velocity.timer
I've just made a middle object that contains more parameters (game engine specifics) and methods for redundant operations.

Well, just personal preference I guess. I grew used to access values like that in any of my previous programs/engines. The 'get' or 'set' before these simplistic values are just...  ,like, useless (for me). But then again, it's not like I plan to make an official API and distribute it to the world, I'm just making them to simplify my tasks.

( ... )
Wow ! Oh well, might as well talk about what I've done.

Actually, I'm currently coding my sprite editor (or more like spritesheet editor). The idea is to open any spritesheet I've made, create a set of sprites dynamically with an interface and them save the whole result in an XML file. In the end, I'll have 2 files : imagename.png & imagename.xml, which I'll be able to read for the engine. Fact is, since i'm coding a sort of fighting game, I thought of linking to a sprite all of its hitboxes (boundHitbox, damageHitbox and attackHitbox), though the word 'Sprite' may be a bad choice I admit.
So Basically I've created several GameObject, which are objects specifics to my engine. For example :

package gameengine.common;//Once done, I do not plan to change anything from this package

public GameBox{
//Lower denominator between all objects of the engine
//For example any HitBoxes from the xml file mentionned earlier are actually GameBox objects
public int x, int y, int width, int height;
//more attributes

public GameVisualBox extends GameBox implements someInterface{
//These ones can be displayed on the screen by the engine
public int h;
public float scaleX, scaleY;
public GameEntitySpeed speedX, speedY, speedH;
//GameEntitySpeed objects contain the velocity and others linked variables (such as a timer, active state etc...)
//I've done it that way to be able to automate vacuum effects that can be localized only on x, or y, or both, etc... (speedH = gravity but meh)
//This is a simplistic way, otherwise I'd have something more appropriate like vectors.

//more attributes + common automatic methods, such as refreshing/activating/desactivating speed values etc...

package gameengine.specific;//Classes might change slightly depending on the library I'll use

public GameSprite extends GameVisualBox{
//Previous classes manage ONLY primitives values in the end.
//Since the GameSprite will managed images, its attributes may changed depending on the library I'll use later (still not sure)
public BufferedImage image;//May change to Texture if I use libgdx for example
public float r, g, b, a;
//more attributes + specifics methods

And there, you have it. Since I'm the only one doing this and don't really plan to distribute something that lame, this is why I just thought of dropping the 'get/set' because it's faster for me to read something.x instead of something.getX when it comes to simplistic values only of course.
10  Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions. on: 2012-11-04 17:41:31
And you decided to post that just when I was thinking of changing my sig.  Grin
Now THAT is some sort of big coincidence.
11  Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions. on: 2012-11-04 17:30:17
Hum.. I did want to use float for everything (double might be a bit overkill for a 2D game), I guess i'll just go the "way I like" and see what happens.

For the get/set, as KittenKoder mentioned for the Color example, sometimes I just feel like they are just overkill, if not useless. Saying that I have a hard time generating them would be lying since i'm using mehclipse. Then again, I'm talking mostly about common values, like x,y coordinates etc...  I'm still using them when the attributes are not primitives mainly, but otherwise I just feel that it's useless and add unnecessary lines + text when coding.

Edit : deleted the empty quote. Sorry, bad habit from my MMORPG period.
12  Game Development / Newbie & Debugging Questions / Int & Float, Design questions. on: 2012-11-04 17:04:18
So, I've been making my own tools to help me programming my game, and strangely I've stumbled upon a LOT more (interesting) questions than I imagined, mostly about engine design if such a term exist, and good practices (and evil optimizations, which I'm definitely NOT doing).

Anyway, here's something that's been buggering me.
Most of the time, at least for a 2D game, the x,y coordinates are integers, while the velocity is a float.
After lots of reading again, I think I understand the whole choice behind it, but still, let me show you an example :

Let say that I have a character with a vx=0.6 speed :
Step 1: x = 0
Step 2: x = 0.6 -> rounded to 1
Step 3: x = 1.6 -> rounded to 2
And so on.
Basically, when we'll have 0.5 < vx <= 1.5, the character will just move 1 pixel per step.

From there, I wonder if it wouldn't be easier to just use an integer as well for the velocity? At least I'll be able to forget about good-timing cast and such.
I also did think about using float (cash) for everything, but then I heard that casts may act different on others spec? (Even though my assumptions are that it's safe for us, java user, thanks to the JVM..?)


Second question :

I've been using the "school" way of creating my classes so far, but i'm getting a bit annoyed at the overload of get()/set() methods.
To be honest, I somewhat found them boring confusing and I'd rather use public attributes for my classes (even though it's BAAAAAAD for encapsulation and people might actually really want to kill me for that).
For example, i'd rather use (already done it actually):
than :

Since "get/set are god-send!" in the left part of internet and "get/set are EVIL" in the right part, I just figured I might ask directly for opinions here.

Oh right... princec, I demand a keyboard configuration for Ultratron because I have an AZERTY one !!!  Grin [size=6pt](and I'm lazy to change the settings myself)[/size]
13  Discussions / Miscellaneous Topics / Re: Getting a job in Java dev. on: 2012-10-24 16:11:32
Thanks for the replies.
For some reason soon after I talked in here, I got 3 somewhat good replies from recruiters (which one of you did this?)

- ability to suffer
At least everyone seems to agree with this. Reminded me that lots of people actually think that Java developpers love pain.
14  Discussions / Miscellaneous Topics / Re: Getting a job in Java dev. on: 2012-10-24 05:28:16
Sounds interesting. Well I just hope I won't start with a silly toolkit for my 1st job. (.. Hope, right)
15  Discussions / Miscellaneous Topics / Re: Getting a job in Java dev. on: 2012-10-24 05:12:57
( ... )

Yes, yes, my bad.

My main purpose for being here is the Java game developpement too don't worry.  Since it's a Java oriented community I thought it would be a good idea to ask for rage tips in here, never expected that side of Java to be THAT hated though.

Let us forget about this  Grin
16  Discussions / Miscellaneous Topics / Re: Getting a job in Java dev. on: 2012-10-24 04:53:46

Haha. It made me laugh how you're talking about JSP pages.
To be honest I was wondering a lot : "Just why the hell are we doing it that way?" most of the time. We lost a good month coding in Strut1, only to be told after : "Huho, don't forget to switch to SPRING-MVC, it's actually more used", when I was already checking JQuery on internet.
Anyway, lots of industries are still working in the dino era let us say, and trust me they don't want to have anything to do with updates and stuff, as long as "the thing is just working fine". (....... ok, i'm being a bit sarcastic, but it's not that far from the truth)

Then make your own experience, like maintaining a quite big project (app/game). Then you can say "I am developer of XXX" when it's quite already popular. Not all of them require formal work experience.
I wish I could do that, but working on a "big project" would mean, since i'm working alone, lots of time. As I said, I'm already 29 and with no (programming) experience. Trust me, it's bad here (I mean, real bad). Unlike the US working on your stuff doesn't have that much value here, unless you're younger OR your project is indeed a facebook big one. (No, this time I'm not sarcastic)
17  Discussions / Miscellaneous Topics / Re: Getting a job in Java dev. on: 2012-10-24 04:37:13
( ... )

Wow, that was quite the answer sproingie (you don't like  "business app" I got that)

But more seriously, I actually know all of the above mentionned (Java + STRUTS & cie) mainly because I learned them as part of my last degree - Not really a cert but I wonder now if your "certs" work the same as ours (France), I'll have to check this. Here I went this way mainly because I wanted to do it first, and also for the "Bac+X" status, really important to get a job in France. [size=7pt]( .. and it sounded like a good idea at the time since I got the Webdesigner one too :/ )[/size]

Sure, I've been working on (hobbyist) games a lot, but it's pretty safe to assume that I won't get any job in France without the mentionned [X years of experience + under 25 year old] especially in the video game industry. In any case I just need to get experience first, though I don't really plan to stay too long in business apps minds you.

I was just surprised at all the requierements. It makes me wonder how are you supposed to get experience if no one hire you first. It's kind of funny in a sad way.

This stuff doesn't seem fun at all...... Sad
Well.. I don't dislike it, it can be fun assuming the project you're working on is too (which is not 90% of the time but meh)
18  Discussions / Miscellaneous Topics / Getting a job in Java dev. on: 2012-10-24 02:59:32
I'll post this here, since it's related to Java but not about Java games only.

So here's the thing. I've been recently labeled as a real Java developer (meh.. just got my degree, but nvm).
I've been looking at the jobs and I seriously cannot pinpoint what the recruiters are looking for, if not EVERYTHING in a single person.

Most of the time, it's :
- Need Java dev
- 1-3 years of experience
- Must know STRUTS, SPRING, JAVA (rofl), SWING, JAVAEE [+ more]
- Oh, must also know JQUERY, JQWIDGETS, SQL, APACHE.
- oh, HTML, XML and [Add more] would be convenient !

So, like, unless I actually start to learn all of them, while probably starving and then die in the process, I'm just clueless about what to "learn" to be able to at least get a beginner job? Sure, I sort of know how are working all the previous things mentionned, but I seriously doubt that "I know this", will work instead of a "I worked in this for X year". Being 29 doesn't help either.
19  Game Development / Newbie & Debugging Questions / Re: (Yet another) code design questions. on: 2012-09-16 09:32:21
Hello. I don't know what you want to achieve but your way of handling input seems to be overkill. If I were you I'll let my state/screen to handle them and let entities to poll it.

Hmm... Well I'm using the native Input methods of Slick since he's doing the job fine. But let's say that I want to have additionnal informations when checking a key, like for how much time the player has been holding it and such. So I thought about having my own InputContainer which would contain informations requiered for the game.

Since there's indeed a pool for the keys, the idea was to create an object that will manage and convert native inputs to game inputs. Usually you will have to :
1) Check if a keyboard/gamepad input is pressed or not. (no conversion, raw data)
2) Compare if the key is linked to the configuration made by the player ingame (example : the 'S' keyboard meaning the 'A' attack button)
3) Resolve the result (in the previous example, it will then set the 'A' boolean value either to true or false --> this is what I call a 'conversion' here)
4*) If the previous key is down for quite some time, a timer will keep track of that.
There, I thought about coding everything in a sort of black box, so later I'll only have to use an InputContainer object since it will manage/update everything on its own.

Even though it sounds overkill, as for now my brain doesn't seem able to think of anything much lighter without using insane amount of if/then/else blocs, and I know that repeating code is a bad programming habit. This is why I wonder if I'm just not overthinking that one too?
20  Game Development / Newbie & Debugging Questions / (Yet another) code design questions. on: 2012-09-15 16:20:11
Alright. I've been thinking way too much on this recently so my guess is that I'm doing it wrong. Allow me to explain :

For now, i've been working on some sort of "Input" package, because I wanted to have more info when retrieving a key, for example if it is pressed and for how long, and I plan to use the same logic in several games. Basically there are 4 classes :

- :::
for storing int values (I'm using slick) to allow ingame player pad/keyboard configuration functions
public class InputConfig {
///// Attributes /////
   private int keyUP;
   private int keyDOWN;// ect...
///// Getter(s) / Setter(s) /////
        // more code for that

- ::: :::
Used that way because I want to be able to retrieve more information that a true/false on a key, like the duration as I stated before.
public class InputState {
///// Attributes /////
   private InputStateHelper keyUP;
   private InputStateHelper keyDOWN;// ect...
///// Getter(s) / Setter(s) /////
   // More code...

public class InputStateHelper {
///// Attributes /////
   private int code;// Stored int in the configuration object. Want to keep the configuration external
   private boolean pressed;
   private boolean typed;
   private boolean buffered;
   private int timer;
///// Getter(s) / Setter(s) /////
   // More code...

- ::: (what will actually be used in the game logic)
Let us say that it acts as an entry point. A player, or enemy, will be assigned an InputContainer object, which contains a configuration and a state.
public class InputContainer {
///// Attributes /////
   private InputConfig bindings;
   private InputState states;

///// Methods /////
   public void update(Input input) {
      if (bindings.isActive() && !bindings.isControllerType()) {// If configuration exists and controller is active, then :
         if (bindings.getKeyUP() != 0) this.stateUpdate(states.getKeyUP(), input);
         if (bindings.getKeyDOWN() != 0) this.stateUpdate(states.getKeyDOWN(), input);
         // More code...

   public void stateUpdate(InputStateHelper currentKey, Input input) {
      // Update logic

It may sound farfetched I admit, but I made it that way because I want to be able to access the information later in my main class using something like Entity.getInput.getKeyUP.isPressed, and beside it will help me to manage combo entry (quarter circle and so on). That being said, I want to be able to create and dispose of such objects easily in my game, like a factory, AND link them to several independant objects but I have an hard time figuring how to do that.

For example, I have something like this :
public class GameElements {
///// Attributes /////
   private ArrayList<GameEntity> gameEntities;
   // More things that should be accessed in a "whole" when updating or rendering.
   // For example, for the update all I will have to do is a for each loop and something like : currentEntity.update();

   private ArrayList<InputContainer> gameInputs;
   // More "common" elements that could/should be accessed from anywhere in the game logic

I used an ArrayList but is it really a good choice? I want to be able to access "specific" InputContainer object in time, I also want to be able to add and remove them, meaning that any reference to one (like if one is actually at position [3]) HAVE to be updated whenever there's a change in the ArrayList.
I thought about using &reference like in C but I wonder if there's an equivalent in Java? As far as I saw if I continue with my current code the objects will be "copied" in the ArrayList, which is a problem for external use.

Sorry I may be a bit confusing, besides my english is not perfect...
21  Game Development / Newbie & Debugging Questions / The "Delta" variable [RELOADED] on: 2012-08-18 00:37:40

Shall we talk a bit more about that delta variable ?
I did understand the concept behind it, but there's still something I don't get.

I'm still using the < app.setTargetFrameRate(60) > easy mode, but I wish I could use the delta someday.

When you use assisted-tools/makers (Game Maker & such), you usually don't have to worry about the time because when you set the FPS to 60, you're pretty sure that a script in there will be called 60 times per second (probably less if lagging, but no more)
That bit is really important for, say, fighting games, when you want to have a character's punch last for exactly 5 frames.
Still, when I try to think on how to achieve this with the delta variable, my mind doesn't seem to be able to resolve this.  Angry

For example, lots of game use something like < posX += velocity * delta >, but I don't see how I can apply something like that for a game when I want to make absolutely sure that each "important" frames are shown.
If a ball were to bounce off a wall, with proper collision code it won't be a problem but isn't there a risk that you "won't see" the ball bouncing off the wall?
To be precise, let's say that we have something like that :

//velocity = 1, T stands here for Time, or a Tick in the game loop actually.
T1: x += velocity; //x - 2
T2: x += velocity; //x - 1
T3: x += velocity; //x reached -> bouncing -> velocity *= -1
T4: x += velocity; //x - 1 (moving away)

It may be my imagination but let say that I put some sort of a pause-shining-effect at T3, isn't there a risk that it might just be ignored since the time elapsed went straight from T2 to T4 due to the delta variable? ... I don't know, I just feel like I'm misunderstanding something about the delta variable here.

Edit : Since my english is bad, here's a little picture of what I'm trying to say :

Note that since it went straight for a position to another due to delta, I somewhat "missed" the time when i want to "pause" the game.
22  Discussions / General Discussions / Re: Installers on: 2012-08-16 07:11:32
For some reason Java WebStart has a bad rep
On a side note, I will extend this to : "Java had a bad reputation".

Now, being a Java developer and such, I know that it is just about misinformation and urban legends.
Still, the reputation is bad enough that I gave up on explaining to people that "it's 2012 and Java made progress ffs" and just decided to use the C++@Trademark&Cie when I want to have feedback on a prototype and such (funny how people are praising some "demo" in C++ but don't give a damn about a "Java full game")

I won't talk about 3D mostly because I don't know how things are going for Java but I just hope that people will eventually realize before the end of the world the end of 2012 that 2D games are perfectly acceptable.
( ... seriously, why all this global hate on Java, it makes me sad  Cry )
23  Discussions / General Discussions / Re: Developpers & Art. on: 2012-08-15 01:43:38
It made not be a place to get ALL your artwork from but is a great start for learning how to make your own.
Agreed. Actually I'm already using several websites teaching you the basis (lots of artists have "their" way to draw, which is sometimes confusing)

These are a few guidelines I set as a programmer that I would like as an artist.
Don't worry, I'm well aware of the problems.
I talked about that mostly to have feedback, but I understand how it's hard to have a dev & a graphist working on a game. For example, since i'm more into fighting games, my characters will at least need several poses (idle/crouching/attacks...), and I don't really feel like asking that, because it sounds more like asking for a "job" than anything else.
I mean, come on, it may be like 30 images for a single character, I don't think that an artist will have "fun" out of that.
The perfect scenario would be to find an artist which already have all the drawing and sucks at programming  Grin

But more seriously, whenever I think about this I don't know, it feels like asking for a "job", and I find that ironic since i'm mostly coding for "fun".
Unlike developers who "have ideas and decide to develop a game for fun and/or for a small community", I never heard of a "graphist who had several pictures and want to make a game out of it". Maybe they just aren't interested into making game at all? (Actually I just love coding for the fun of it)

Edit :
Uh oh, just to clarify i'm not really looking for an artist since I already decided to learn to draw, but I just wondered how programmers usually deals with this kind of thing.
24  Discussions / General Discussions / Developpers & Art. on: 2012-08-14 23:55:23
Hello there. (Fr, sorry in advance for my bad english)

I don't know for you, but since the dawn of time my main issue as a developper has always been graphism !
I can code. I can have a headache trying to figure out which "if" of my program is useless. I can troll Java trying to use Goto...
BUT I suck at drawing things. And it's pretty frustrating to "visualize" some ideas/backgrounds/characters only to remind yourself that you can't draw.

Recently I got sicked of ri... I mean using free ressources available on internet, but to be honest, much of them aren't actually that "free".
I don't want to make a game for commercial purposes (being the problem too, since there's no money on the line I can't really expect to find a graphist) but, sometimes you'll want to add a table with pots flowers there in the background, sometimes you may want to have some folks walking in the scene, or sometimes you'll want to have a cat with wings flying around as your final boss... *ahem*
... the fact is, each of thoses things needs you to draw at some point.

Anyway I decided to create several characters (mostly 2D) on my own since i'm coding mostly fighting and platforms games, but you really don't have any other choice but to learn how to draw from scratch (currently on the body proportions lesson, the base really), so then you understand why "Graphist" is a full-fledge job.

My question would be : Is there any software/method/community i'm unaware of which can simplify that task, or does all of you have a pocket-graphist friend who's willing to draw everything for you? (Meaning that I should find one too? Is that a gold rule for developpers? Please enlighten me.)

... sure, learning how to draw things will open new possibilities and is good for self-praising, but it's a bit sad to have to do everything when creating a game...
25  Game Development / Newbie & Debugging Questions / Re: Quick questions for mechanims & optimizations. on: 2012-06-26 06:13:38
Huh.. yeah, it was really me underestimating Slick2D after all.

Mkay, I think I'll just go with that and see how it turns out. Thanks for the answers.
26  Game Development / Newbie & Debugging Questions / Re: Quick questions for mechanims & optimizations. on: 2012-06-26 05:49:06
But since your "big game" is probably not really that big, I suspect either Slick2D or LibGDX would work fine. Try them both out and decide for yourself which is better suited to your skill/goals/needs.

Well, fact is that the game is already "finished", but on GameMaker.
I switched to Java mainly because this is what i'm currently studying and because I needed more performances. Let's just say that at some point, if you want to have Rain/Lots of Characters/AI checking paths/Battle effects/ect ect ect... well, GM is good but still have its limits.

For the SpriteSheet thing, yes maybe i'm just overthinking the thing.
The numbers of hitboxes are random (might be 1, might be 10), and I didn't want to start calling the thing using "Hitbox1, Hitbox2...".

For OpenGL, hum...
To be honest I heard about particles effects/dynamic shadow blablabla.. Though it's possible to do in Slick2D, since it is still a library for 2D game, I thought that I might as well jump to something more closer to OpenGL (like LWJGL), I'll have to learn it someday anyway...
Or maybe it's me underestimating Slick2D (bad habit I got from GM, thinking that using too much images will slowdown drastically the game)
27  Java Game APIs & Engines / Java 2D / Re: 2D rendering, but with a 3D coordinate system? on: 2012-06-26 05:24:29
I'm new, but since I have also a "Z-axis", here's my solution (maybe wrong ! so people might correct me  Grin ) :

I just intend to make a Class that'll act as some sort of a pool (storing everything that need to be drawn) and add a <Comparable> option for the Z value in it.
So in the end I'll just have to "sort" the object before drawing.

Edit :
Huho, I didn't notice you were talking about a LIST.
If that's the case I'm pretty sure that this collection is already able to sort String & Integers just fine with a build-in method, right..?
28  Game Development / Newbie & Debugging Questions / Re: Quick questions for mechanims & optimizations. on: 2012-06-26 04:05:20
EDIT (last) : I'll use HashMap ! I won't delete the post, just in case someone wants to suggest something better..

Hmm... I got new questions (I should try using the irc, but it's always empty..)

I've seen LOTS of differents Collections in Java, and frankly i'm a bit loss about which one to use..?
Well actually I can achieve my goal using differents way, but I wonder which one would be the best considering Java.
Here's the thing :

First, I intended to make a SpriteSheet Class, mainly to store severals SpriteSheet object (bound to an image file, or more).
A SpriteSheet object will have a Sprite[] collection, Sprite being an object too, which stores severals integers AND additionals HitBox[] collections (Hitbox being also an object).
Yes so basically :
[---] (Object)SpriteSheet <--- (Object)Sprite <--- (Object)HitBox.
I took this solution because, since I have my own editor, I need to have a dynamic storage for sprites & hitboxes.
But, with this configuration, I'll have to Serialize the SpriteSheet class, being at the top of everything, and so everything else inside. (If I got the serialization thing right)

From there, I just wonder if it wouldn't be better to use Tuples? (Since I don't need any particular methods in Sprite & Hitbox, only getters and setters)
Basically all my objects (SpriteSheet excluded) store single Integer OR ArrayList<Integers> only, so the *3 objects solution might be a bit overkill for such a thing..?
Or, should I stick to this Object approach because it's more Java-like?

Sorry if my questions are stupid, but I don't want to start coding with bad habits..

Edit :
OR, I said tuples, but i'm also considering the List<List<ArrayList<Integer>>> approch.
BUT, I wonder from there if it wouldn't be better to use severals HashMap, mainly for a better readability for me, as the programmer...
Darn ... :/

Edit 2 :
Nevermind, I'll use HashMap since I don't need to retrieve the elements in any particular order  Grin
29  Game Development / Newbie & Debugging Questions / Re: Quick questions for mechanims & optimizations. on: 2012-06-25 12:24:14
First, thanks for the answers.

If you haven't looked at them yet, look at LWJGL (Including the libGDX framework and Slick2D), which will help with setting things up to render quickly.

I did plan to create the game with Slick2D, but... I don't know.
Yes, it's a good library (of course !), but I feel like that it'd be better for me to learn LWJGL directly, since when having a first look at Slick I noticed that i'll definitely run into several problems (the Z-axis for example, which is important for my project... and yes, there's a tutorial about "emulating" a depth in Slick, but from there again I feel like that it'd be better to learn how to use OpenGL directly with LWJGL)
Someone told me that "reinventing the wheel is useless" (true) but I KNOW that i'll have to create, for example, my own spritesheet & sprite classes due to several reasons, and using a library without using its build-in function sounds a bit... hmm... awkward ?

Serialization is a pain if you finalize some container classes but want to also save other app state that is entangled on the broader constantly changing app classes.

I intented to use the serialization mainly for storage to be honest, which may not be the "good" way to do it in the end.
I didn't really want to use lots of XML files, or anything related to a database since it'll be more like a PC game than anything else, but maybe I should give it a try first.

Darn, I'm trying to plan everything and learn the max before starting to code, and in the end I still haven't written a single line of code in my project, how ironic  Grin
30  Game Development / Newbie & Debugging Questions / Quick questions for mechanims & optimizations. on: 2012-06-21 18:08:51
Hi there. (I apologize in advance for my bad english, i'm french)

I've recently decided to switch one of my game to Java.
Long story short, I was using GML (Game Maker Language) and.. well, let's just say that my project got too big over the last year.

First, I'm coding a 2D game (beat'em up), which is mainly based on sprites.
I've created my own engine, since I wanted to add "modern fighting-game mechanisms" into it (like parry feature/ defend/ combo cancel ect...)
The fact is, since I'll be able to have a full OOP approach with Java, I had several ideas for managing my objects, but I just wonder if they're good or bad.
Well anyway here are my questions :

1) Since i've got LOTS of sprites, I've started to create my own editor (to be able to create a sprite from a spritesheet & "attach" all the hitboxes I need). I planned to serialize a set of thoses objects (as a "Character" object) so I'll just have to load or unload them from that external file whenever I want in the game.
Though this seems a logical approach for me, is it actually a good thing to do in Java? I wonder, for example, if my serialized objects will be properly loaded when running on a different OS?

2) Using Java now, I know that I'll be able to apply colors/effects easily on my sprites (and everything else actually).
...still, I'm using lots of "photoshopped" effect (for example - alpha 25% on a sprite with a background containing a circle with a blue-orange gradiation, without covering the transparent pixels, blabla...)
... I wonder if such a thing is actually possible to do in Java itself when running? If that's the case, is it bad, or REALLY bad for the FPS? (I guess but.. it never hurt to ask)
Using additionnal images would be perfect, but I fear for the memory, since I've reached fast huge numbers with GM, even though I cropped everything to the max.

3) When it comes to sounds & musics, now we can use pretty much everything thanks to the librairies.
Still, what would be the wiser thing to do for a good overall compatibility? .wav, .ogg or .mp3?

Anyway, as you noticed I'm mainly trying to figure out what would be the best thing to do before coding, since I don't want to have to rewrite the code X times because I did not consider the best option at the time... (which happened to me a lot in GM  Grin)

Oh and last thing, but it's more an opinion thing than everything else  Roll Eyes
Lots of people STILL won't even try a game because it's written in Java (was told that much again 1 hour ago) - Is it running that bad on some OS or is it again an urban legend?
Pages: [1]
EgonOlsen (59 views)
2018-06-10 19:43:48

EgonOlsen (42 views)
2018-06-10 19:43:44

EgonOlsen (61 views)
2018-06-10 19:43:20

DesertCoockie (240 views)
2018-05-13 18:23:11

nelsongames (142 views)
2018-04-24 18:15:36

nelsongames (141 views)
2018-04-24 18:14:32

ivj94 (883 views)
2018-03-24 14:47:39

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

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

Solater (159 views)
2018-03-17 05:04:08
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!