Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 10
 on: 2018-09-14 18:14:21 
Started by Mad Hatter - Last post by Mad Hatter
<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>

 on: 2018-09-14 07:15:33 
Started by TheLzyDev - Last post by CoDi^R
My aim with this project isn't so much as to push out a game as it is to learn the ins and outs of Java as well as the conventions that come along with it.

As we talk about conventions..  you should accustom yourself to properly "break;" your switch statement blocks. Many of them are not, and w/o having more insight to your code I can only assume that's a bug in most cases.

This means to:

- "break;" every case, even the last one. If you add another case, and forget to adjust the now-not-last-anymore block, you are in trouble
- if the fall-through case is intended, I prefer to leave a comment at the place to remind future-me or any other passer-by about it
- the only exception is if the block ends with a return statement -> the break only adds visible noise in this case

 on: 2018-09-14 01:26:06 
Started by TheLzyDev - Last post by TheLzyDev
Thanks for the help! I'll definitely try and implement some of the advice you gave me in my code. My aim with this project isn't so much as to push out a game as it is to learn the ins and outs of Java as well as the conventions that come along with it. Don't get me wrong though, pushing out a game is always an added bonus Wink

 on: 2018-09-13 19:32:09 
Started by mudlee - Last post by Gornova
Cmon, this code is also 10(!) years old Smiley I’m not saying that the A* implementation should be different, but I’m looking for a maintained lib, or if I have to implement it myself, I’ll use the latest code available (gdx-ai) as a resource Smiley

you should try it. Used for many projects, even with libgdx, without any problems so...

 on: 2018-09-13 15:38:57 
Started by KaiHH - Last post by KaiHH
You need that many cases. The algorithm is for clipping (not for culling).
You need to differentiate between which parts of the triangle is on which side of the plane in order to create additional triangles at the intersection points of the original triangle and the clipping plane.

 on: 2018-09-13 14:59:56 
Started by KaiHH - Last post by Archive
I haven't taken much time to understand what your code is doing exactly, but when I did polygon splitting I didn't have so many switch cases...

In fact the only switch statement I had contained 4 cases:

What algorithm are you using for yours? Is it faster?

 on: 2018-09-13 14:55:18 
Started by Sandcastlegames2 - Last post by Sandcastlegames2
I don't want to register with google. I want to register here. If it is not possible I wait until this board migrates (I heard this is the plan).
Until then I request to get this account and the original account Sandcastlegames deleted. The help says there is a function in the profile management to do this but it does not exist, so I can't do it myself.

 on: 2018-09-13 08:39:13 
Started by TheLzyDev - Last post by ral0r2
Hey and welcome! Really intresting and goob job so far!

I just took a quick look at your code and could give you some hints what i found noticeable:
This feedback is depending on a quick look, so I'm sorry already in case I misunderstood anything or did not read correctly.

1. Packages
If you take a look at
I can see that you are not using any packages to divide the classes of your game. You have all your stuff under lq. I'm not sure where you want to go with your game but I only can recommened to use some packages to divide your game into small parts. This will help you a lot to keep track of your game structure and your code when your games grows. Right now it's totally fine but keep in mind that your codebase will increase if you want to add new functionalities and your code is not structured very well it's hard to maintain. You could for instance create a package with items, actors, engine/game.
I also saw that you are using a lot of protected attributes, there is no point in using procted attributes if you have no packages. Also clean code often suggests to not use protected variables for various reasons:

2. Attribute and Class Naming
I'm assuming you are developing this game by yourself and not in a team, but naming is really important in development. When reading your code I was a bit confused by your class names for example, if you are planning to work in a team intuitive naming of everything is really important. I had to do some research what you mean by LQ, LQCLI, LQIS, LQOS, pop, etc.

3. Switches
I'm seeing that you are using a lot of switches, eventhough they might be okay sometimes I'd usually try to avoid them. Especially in the cases you are using them. Let's take this method for example:

    void addEnemy(int positx, int posity, String ene_type) throws IOException
            case "rotter":
                for(pop = 0; CUR_ENES.containsKey("rotter" + pop); ++pop);
                CUR_ENES.put("rotter" + pop, new Rotter());
                CUR_ENES.get("rotter" + pop).spawn(CUR_ENES.get(
                    "rotter" + pop).SYMBOL, positx, posity);

You did something similiar with Items for example. So each time you create a new item or enemy (same with removing) you need to adapt your switch case. This might result in a really, really long switch case depending on where you are planning to go with your game. You maybe should consider working serialisation and deserialisation, meaning you store the information for enemy and items not directly in your code but for instance in a .json or .txt file. This will help you to adapt stats, add and remove objects.

4. Readability / Logic
If we take a look at the following:

 static void outDMG(String name, String dmg_name, long dmg)
        System.out.printf("\n\u001B[1m%s\u001B[0m: used %s, "
            + "\u001B[31m%d damage dealt\u001B[0m\n\u001B[32m---", name, dmg_name, dmg);
    static void outDia(String name, String dialog)
        System.out.printf("\n\u001B[1m%s\u001B[0m: %s"
            + "\u001B[0m\n\u001B[32m---", name, dialog);

I'm assuming that you wrote these methods by hand? This is aiming at the same spot as my advice with naming, switches packages etc. Keeping your code maintainable through intuitive naming and a good structure. This code is really, really hard to read and to maintain. I'm guessing these are colours or something? Me as an outstander of your project only has a little idea what it is about but it really looks confusing.

another thing is:

class Lucas extends Movement

This is counter intuitive as well for me. I'm assuming Lucas is the protagonist of the game? But why does he if he is the hero of the game extends Movement? That would mean he is childtype of movement, not the protragonist. Maybe you should consider using an interface called Moveable or extending him from a class named MoveableGameObject or something. Again if your code bases becomes bigger such things might be confusing. Same thing for Weightend? Why does it extend Movement?

Abstraction of your classes is really important otherwise you will get lost in too many classes if you are trying to add a new feature.
Think about your game structure. What objects does my game contain? Are they really a child of some sort of other objects?
This for example would make much more sense to me:

Lucas extends Player implements Moveable extends GameObject

Ofcourse this feedback depends on where you want to go with your game. If you are planning to finish the development as soon as possible and keep it rather small that's totally fine. But if your codebase gets bigger make sure it's maintainable this will ease the development a lot.

In addition this is only my humble opinion. I'm not that experienced myself but I'm sure one of the more experienced guys here could maybe correct me or give you some better more suitable advices. Also I just took a quick look at your code. As well keep in mind that game released with bad code is still better then a game which is not released at all. Gamedev is hard and finishing and releasing a game is major undertaking. Keep it up and don't mind asking me if you have any questions Smiley

PS. I just saw you are using a .txt file to keep track on your todos, that's good! Maybe you should consider using a real tasktracker if this helps you. Something like trello.

 on: 2018-09-13 04:05:08 
Started by TheLzyDev - Last post by TheLzyDev
I'm new to this site and game development in general, but I've been working on this pet project of mine (in between highschool classes) for a few months now. I plan on it being a quirky rougelike adventure that can be played completely in any terminal. So far, this is the work I have to show for it: ( All criticism welcomed! :p )

 on: 2018-09-13 03:43:42 
Started by everythingever - Last post by Mykayla
Wow really interesting article, may later be able to share other helpful information are more interesting.
Refer:   happy wheels free to play!

Pages: 1 ... 3 4 [5] 6 7 ... 10
EgonOlsen (1303 views)
2018-06-10 19:43:48

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

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

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

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

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

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

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

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

Solater (798 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!