Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (701)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (774)
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  Game Development / Newbie & Debugging Questions / Re: Issue With Collision Detection on: 2016-11-09 19:59:14
You clear the objects array after retrieving two objects (why?). Now objects.size() returns 0 and your for loops terminate.

edit: retrieving isn't the right word, get(i) just returns the object at index i without removing it from the array.
2  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-22 06:59:19
right, sorry. there ya go

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
22
Game version : 0.7

SYSTEM INFO
---Running on a: Windows 10, amd64 Platform.
---jre: 1.8.0_111
---Processors avalible: 4
---Reserved memory: 1900Mb
---Directory : C:\Users\Flo\Desktop\syx\res\
---Input Arguments :
---JRE Input Arguments :

Starting the Launcher....

Firing up an engine, v: 0.8

DISPLAY
---supported resolutions: 640x480, 640x480, 640x480, 640x480, 640x480, 720x480, 720x480, 720x480, 720x480, 720x480, 800x480, 800x480, 800x480, 800x480, 720x576, 720x576, 720x576, 720x576, 720x576, 800x600, 800x600, 800x600, 800x600, 1024x600, 1024x600, 1024x600, 1024x768, 1024x768, 1024x768, 1280x720, 1280x720, 1280x720, 1280x768, 1152x864, 1152x864, 1360x768, 1366x768, 1440x900, 1280x1024, 1280x1024, 1600x900, 1400x1050, 1680x1050, 1920x1080, 1920x1080, 1920x1080,
---current resolution: 960x480, RfrsRate: 75
---LWJGL: 3.0.0 build 90
---GLFW: 3.2.0 Win32 WGL EGL VisualC DLL
---23 supported video modes

OPEN_GL
---FB stencil Bits: 8
---FB depth Bits: 0
---FB Red Bits: 0
---FB Green Bits: 0
---FB Blue Bits: 0
---FB Alpha Bits: 0
---Version: 3.3.14008 Core Profile/Debug Context 21.19.137.1
---SL Version: 4.50
---glRenderer: ATI Technologies Inc., Radeon (TM) RX 480 Graphics

Core was sucessfully disposed
3  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-22 04:56:07
1  
2  
3  
4  
5  
6  
7  
java.lang.RuntimeException: GLerr: invalid enum
   at snake2d.GlHelper.checkErrors(GlHelper.java:60)
   at snake2d.GlHelper.<init>(GlHelper.java:44)
   at snake2d.GraphicContext.<init>(GraphicContext.java:179)
   at snake2d.CORE.create(CORE.java:51)
   at launcher.Launcher.start(Launcher.java:28)
   at main.Syx07.main(Syx07.java:31)
4  Game Development / Newbie & Debugging Questions / Re: Slick2D Top Down Control on: 2016-10-19 20:19:15
Glad I could help!
5  Game Development / Newbie & Debugging Questions / Re: Slick2D Top Down Control on: 2016-10-19 20:02:47
Okay friend, I got angry and used a list. But I think this is a pretty smart solution now. I just store they keys in the order they were pressed and always look at the last one. Again I can't test this, but I'll be damned if it doesn't work.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
 boolean wKeyWasPressed, sKeyWasPressed, aKeyWasPressed, dKeyWasPressed = false;
    ArrayList<String> keyOrderList = new ArrayList<String>();

    private void determineKeyOrder() {
        if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_W ) && wKeyWasPressed) {
            wKeyWasPressed = false;
            keyList.remove("W");
        }
        if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_S ) && sKeyWasPressed) {
            sKeyWasPressed = false;
            keyList.remove("S");
        }
        if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_A ) && aKeyWasPressed) {
            aKeyWasPressed = false;
            keyList.remove("A");
        }
        if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_D ) && dKeyWasPressed) {
            dKeyWasPressed = false;
            keyList.remove("D");
        }

        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_W ) && !wKeyWasPressed) {
            wKeyWasPressed = true;
            keyList.add("W");
        }
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_S ) && !sKeyWasPressed) {
            sKeyWasPressed = true;
            keyList.add("S");
        }
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_A ) && !aKeyWasPressed) {
            aKeyWasPressed = true;
            keyList.add("A");
        }
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_D ) && !dKeyWasPressed) {
            dKeyWasPressed = true;
            keyList.add("D");
        }
    }

    public void useControlls(){
        if (!(CoreGameState.inputHandler.isKeyDown(Input.KEY_W)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_D)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_A)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_S))){
            pc.moving = false;
        }

        determineKeyOrder();
        String lastKey = keyOrderList.get(keyOrderList.size() - 1);

        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_W) && lastKey.equals("W")) {
            pc.pDirection = PlayerDirections.North;
            if(!pc.checkCollisionNorth()){
                pc.y -= pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }
        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_S) && lastKey.equals("S")) {
            pc.pDirection = PlayerDirections.South;
            if(!pc.checkCollisionSouth()){
                pc.y += pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_A) && lastKey.equals("A")) {
            pc.pDirection = PlayerDirections.West;
            if(!pc.checkCollisionWest()){
                pc.x -= pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_D) && lastKey.equals("D")) {
            pc.pDirection = PlayerDirections.East;
            if(!pc.checkCollisionEast()){
                pc.x += pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
    }


edit: removed the return in the first if statement of useControlls()
6  Game Development / Newbie & Debugging Questions / Re: Slick2D Top Down Control on: 2016-10-19 19:35:01
Just thought of a flaw with this... if you hold W, then press D and let go of D again, it still registers D as the last key pressed and will not move up.
So you'll also have to do a check to count a key as the "lastKey" if it's the only one that's pressed.

edit: aight wait a sec, let me think on this Cranky
7  Game Development / Newbie & Debugging Questions / Re: Slick2D Top Down Control on: 2016-10-19 19:28:05
Ah I see, I misunderstood you sorry.

I couldn't actually test this but I think it should have the desired effect.
Basically I have a lastKey variable that remembers the key that was pressed last, and only if the key was indeed pressed last will i move in that direction.
So if You were to press W and then D, it will recognize D as the latest one and move in that direction. If I let go of W and press it down again, it will move in that direction.

Hope that works, or at least gives you the right idea Smiley

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
boolean wKeyWasPressed, sKeyWasPressed, aKeyWasPressed, dKeyWasPressed = false;
    String lastKey = "";

    public void useControlls(){
        if (!(CoreGameState.inputHandler.isKeyDown(Input.KEY_W)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_D)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_A)) && !(CoreGameState.inputHandler.isKeyDown(Input.KEY_S))){
            pc.moving = false;
        }
       
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_W ) && !wKeyWasPressed) {
            wKeyWasPressed = true;
            lastKey = "W";
        }
        else if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_W )) {
            wKeyWasPressed = false;
        }
       
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_S ) && !sKeyWasPressed) {
            sKeyWasPressed = true;
            lastKey = "S";
        }
        else if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_S )) {
            sKeyWasPressed = false;
        }
       
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_A ) && !aKeyWasPressed) {
            aKeyWasPressed = true;
            lastKey = "A";
        }
        else if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_A )) {
            aKeyWasPressed = false;
        }
       
        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_D ) && !dKeyWasPressed) {
            dKeyWasPressed = true;
            lastKey = "D";
        }
        else if (!CoreGameState.inputHandler.isKeyDown(Input.KEY_D )) {
            dKeyWasPressed = false;
        }

        if (CoreGameState.inputHandler.isKeyDown(Input.KEY_W) && lastKey.equals("W")) {
            pc.pDirection = PlayerDirections.North;
            if(!pc.checkCollisionNorth()){
                pc.y -= pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }
        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_S) && lastKey.equals("S")) {
            pc.pDirection = PlayerDirections.South;
            if(!pc.checkCollisionSouth()){
                pc.y += pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_A) && lastKey.equals("A")) {
            pc.pDirection = PlayerDirections.West;
            if(!pc.checkCollisionWest()){
                pc.x -= pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
        else if (CoreGameState.inputHandler.isKeyDown(Input.KEY_D) && lastKey.equals("D")) {
            pc.pDirection = PlayerDirections.East;
            if(!pc.checkCollisionEast()){
                pc.x += pc.maxSpeed;
                CoreGameState.inputHandler.clearKeyPressedRecord();
                pc.moving = true;
            }

        }
    }
8  Game Development / Newbie & Debugging Questions / Re: Slick2D Top Down Control on: 2016-10-19 19:00:16
Why not turn all the "else if" statements into just "if" statements. If you have "else if" statements I'd assume that only one of these conditions can be true, which is not the case for you. Multiple of these keys can be pressed at the same time, and not just one.
9  Discussions / General Discussions / Re: Ludum Dare 36 on: 2016-08-29 22:29:25
Finished! Ha! Beat the whole forum ._.

The king is an imbecile. Very realistic game!

10  Games Center / WIP games, tools & toy projects / Re: A Space To Bloom - Free 4X Strategy Game on: 2016-08-25 14:58:23
Thank you. And wow there's a lot of stuff in there, I'm impressed!

It's great that you made a tutorial because I would have been completely lost without it, but the problem is I was still kinda lost. It's a great start but I think you have to go a bit more into detail with your explanations. For example you wrote something like "Don't forget to select a model for you building before you can place it" without actually explaining how to do that. Took me a while to figure out that I had to click on the little rectangle in the bottom right of the building selection.

Also what confused me a lot is that i have no idea what the buildings I'm placing actually do. Clicking on them doesn't do anything so how do I figure out what they are good for?

Besides the fact that it's a little overwhelming because there is so much stuff in your game, I think this has a lot of potential! Especially that you can design your own buildings is a pretty cool idea.
11  Games Center / WIP games, tools & toy projects / Re: A Space To Bloom - Free 4X Strategy Game on: 2016-08-24 23:12:40
Your project seems pretty impressive and I'm sure a lot of people would love to take a look at it, but you are salting your own soup with those ad-fly links.
12  Games Center / WIP games, tools & toy projects / Re: Tramantula Rising on: 2016-08-02 12:43:06
I'm sure it wont get greenlit, but I already paid the $100 submission fee so I'm submitting as many games as possible to there.

This could really hurt you in the long run. If you have a reputation of uploading ridiculous games people might not take you seriously when you try to upload an actually polished game in the future. Just a thought.
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibZ - 2D Java Game Library on: 2016-07-27 15:41:53
Do you mind showing off some projects that have been created with your library? The "Games build with LibZ" link in your documentation leads to a 404
14  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Is it a good idea to make your own library to write less code in the future? on: 2016-07-21 21:15:22
I also use libGdx and when I have abandoned yet another game and start anew, I find myself copying half the code of the old game to the new one. It's not a bad idea to build yourself a library of reusable code. It's common practice.
15  Games Center / WIP games, tools & toy projects / Re: Questica -- Another Gosh Darn Pixel Game on: 2016-07-20 20:40:35
Yeah. Okay. Sure. Why don't you make a game in pixel art that looks absolutely stunning. But that's just not enough right? Here's a wild idea: Why don't you make it in M S  P A I N T

I quit.
16  Java Game APIs & Engines / Java 2D / Re: Changing the hue of an image on: 2016-07-04 10:14:42
Alternatively, if looping through the pixels is too slow for you (it was for me) and you are somewhat experienced with shaders: Here's one I've pieced together at the very bottom that does just that. Also changes the brightness.
17  Discussions / Miscellaneous Topics / Re: Is it possible to get sued by Donald Trump if..... on: 2016-06-24 19:53:13
In my game I have the words "Make Great America Again!" in the Main menu?

<a href="http://www.youtube.com/v/hk2wuT9GW3Y?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/hk2wuT9GW3Y?version=3&amp;hl=en_US&amp;start=</a>

I think you're golden.
18  Discussions / General Discussions / Re: Virtual Reality on: 2016-03-23 17:05:15
The novelty will rapidly wear off and then the inconvenience, pomp and ceremony will become a chore and the whole thing will be put into a cupboard and gather dust, and in the meantime the number of people creating content for VR will shrink drastically when it turns out there's better ways to spend money on development.

So you might aswell jump the bandwagon now and get all the new and shiny things while the "golden age" of VR still lasts  Wink
19  Discussions / General Discussions / Re: Virtual Reality on: 2016-03-23 16:13:49
I think a strategy top-down kind of game could also work really well for VR. All these little fellas running about at your command while you gaze at them from the sky like the god you are.

Has the added benefit that it's probably less nausea-inducing than 1st person and might be more suitable for most people. But yeah, 1st person has the bigger market for sure.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-04 22:36:05
Thank you! That is very encouraging  Smiley
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-04 19:27:11
Today was the deadline of my GameDev class in uni. We pretty much had months to develop a game. 3 days ago we (me + 2) started piecing together a multiplayer card game with Unity and we actually made it in time. Five months of university and i can still barely spell time management...

Turns out Unity is pretty great if you want fast results. The interface is also pretty nifty, and if you finally wrapped your head around how they chose to do things it's pretty fun to use.
That said, it did hurt my 'programmer's pride' a little to fill in text fields and drag around components. I think I'll stick to just code if I have the option to.

Also worked up the courage to put my amateur vocals on the internet for public listening. Wrote the lyrics myself. If you are a fan of piano, Attack on Titan, and.. amateur singing.. you might just like it.

Creative week!
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-01-29 17:38:10
@Gjallar I hope you went anyway!

I did not Sad
180 minute traveltime for a 30minute talk is a bit much.
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-01-29 10:30:01
Mario Zechner aka @badlogicgames aka the godfather of libGDX is giving a talk for the Global Game Jam at my university today.
While I really want to attend this, i also just finished my last week of exams and want to do nothing else but play video games all day.

Sorry Mario, I choose videogames over you. I'm sure you understand.
24  Game Development / Newbie & Debugging Questions / Re: OpenGl Mesh Flickering/Broken Lines Between Vertices on: 2015-12-15 16:49:10
...And what theagendd is talking about is decreasing the size of your perspective fustrum...
...The fustrum is going to be really big and the values in the "Depth component" (Z Buffer) of the image will be skewed because of inaccuracies. The box is only taking up an extremely small part of that fustrum, which means part of the box will fight with the other part for who will be drawn.

You can fix this by shortening your fustrum...

Do you know how sometimes you discover that you've gone all your life misspelling a certain word and thinking it's correct? Sure has happened to me a couple of times. Also, it's frustum.
25  Games Center / Showcase / Re: AutoInvaders - LD34 Compo Entry on: 2015-12-15 16:41:48
Works like a charm, also looks quite appealing, but... I wouldn't pay for the soundtrack, let's put it that way.
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-18 14:45:13
<a href="http://www.youtube.com/v/vxlcIjyDF0Y?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/vxlcIjyDF0Y?version=3&amp;hl=en_US&amp;start=</a>

http://www.java-gaming.org/topics/technicolour-rain/33737/view.html

Congrats @Sekaru !
27  Game Development / Articles & tutorials / Re: How to draw Tinto the Fox on: 2015-09-05 21:22:10
Did you bother to read the first sentence?
28  Discussions / General Discussions / Re: Would appreciate some advice on: 2015-07-10 10:55:52
Oh! There's more of us, go figure. That would be the TU Graz. So not quite the same  Smiley
29  Discussions / General Discussions / Re: Would appreciate some advice on: 2015-07-10 10:26:37
Thanks Riven!

Well... it has been three years since I made this topic. I was so done with school when I finally finished high school, that I absolutely did not want to continue with anything of that sort.

I did pretty much nothing for half a year, and then served my military time in the other half.
Apparently a break was all I needed, because I did end up deciding to give university a shot. And boy am I glad that I did..

It is absolutely nothing like high school. You are your own boss. No one cares if you don't show up to lectures. You decide yourself what is best for you.
Another great thing is that you meet like-minded people. There are others near you that have a passion for programming just like yourself, who knew? You don't have to exclusively sit and work on boring homework yourself.  Staring at three lines of code for an hour to figure out why it doesn't work has never been this fun! Share the pain.

Maybe the idea of university scares you because you think it might be too difficult for you. And I will not deny that it is a lot of work, quite a bit more than high school. But guess what? It is interesting work. It is exciting, fun work. Of course there will be some classes that you are not that interested in, but that is the minority. You chose this major! This is the stuff that you are passionate about! No more classes that cover the general stuff that everyone is supposed to learn. It's finally time to get down to the nitty gritty and learn the things that you actually want to learn about.

Here I am now, with four semesters on my back. I just successfully completed the hardest class of the major, Operating Systems. I had to implement locking (spinlock, mutex, condition variable,..), multi threading, forking, swapping, and other fun things into a very barebone linux-based os. Three years ago I wouldn't have even dared to dream about being able to do such things. If I can do it, you can do it!

This summer I will start working on my bachelor thesis. I'm part of the team that develops Catrobat, or more specific the android version of Pocket Code, which happens to be powered by libGDX! I actually just found out that Mario Zechner (badlogicgames) went to the same university as I do now.
Funny how things turn out  Smiley

TL;DR:
Take a break if you need it and then continue with university. You will not regret it.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-04 05:16:38
Took a morning run after ages of not doing any physical exercise. Someone please kill me.
Pages: [1] 2 3 ... 9
 
ral0r2 (209 views)
2016-11-23 16:08:26

ClaasJG (350 views)
2016-11-10 17:36:32

CoffeeChemist (442 views)
2016-11-05 00:46:53

jay4842 (495 views)
2016-11-01 19:04:52

theagentd (504 views)
2016-10-24 17:51:53

theagentd (493 views)
2016-10-24 17:50:08

theagentd (450 views)
2016-10-24 17:43:15

CommanderKeith (448 views)
2016-10-22 15:22:05

Roquen (421 views)
2016-10-22 01:57:43

Roquen (309 views)
2016-10-17 12:09:13
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!