Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (563)
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  Discussions / Miscellaneous Topics / Re: Statistics project: Please take a few seconds to answer! :) on: 2012-03-13 01:04:12
Age? Race? Gender?What is your favorite genre of music?
27, Caucasian, MaleTriphop
2  Discussions / General Discussions / Re: The Game Developers' Society on: 2012-03-10 12:51:36
I still get 403s
3  Discussions / Business and Project Management Discussions / Re: Can I have an Experience poll? on: 2012-03-09 10:39:39
Time with JavaGames MadeDeveloped IdeasNot so developed ideasLearningEducationAgeIn collaborationNeed collaborationLocation
5 yearsnothing serious13Raycasters (I'm not quite sure why Tongue)almost BSc in CS27noopen to the ideaNetherlands
4  Discussions / General Discussions / Re: The Game Developers' Society on: 2012-03-09 10:32:46
I get 403's (forbidden) on all the images.
5  Discussions / Suggestions / Sorting in showcase broken? on: 2012-03-08 22:24:17
It seems the sorting of topics in the showcase forum isn't working properly.

Currently (for me?) it's sorted
-apocalypse run (7 hours ago)
-skyfall (7 hours ago)
-rock-paper-scissors (2 days ago)
-DarkGalaxy (3 hours ago)
-Sphere CCG (6 hours ago)
etc..

Clicking the 'last post' column doesn't change anything

EDIT: it seems all the other subforums work correctly
6  Games Center / Showcase / Re: ErnCon on: 2012-03-02 10:32:36
I just tried it on my HTC Desire S. I Completed the tutorial (or at least the first level of it, don't know if there's more?) and then the game seems to hang at the loading screen. The animation and music continue, but other than that nothing seems to happen. I'm from the Netherlands.

EDIT: oh, lol, when I pressed my phone's back button I got into the mission menu and everything seems to work again Smiley

The controls take some getting used to, but I do like it so far Smiley
7  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-25 11:14:22
Regarding the power; if I understand correctly the only way to disrupt power right now is to build a road over a wire, right? So if you change that so it makes a road under the wire (like when you place a wire on a road) the power can only expand to new cells (cells that are powered will never lose power). That way you only need to check the neighbors of each new cell to see if it's powered (there are no new cells that require power but don't spread it, so this should work)

EDIT: just played it again and it seems to do a lot better already. The limiting factor seems to be the drawing now, when I click on the traffic overview the game suddenly runs a lot smoother (pop 450 city).
EDIT2: I do realize this doesn't make any sense, trees shouldn't bee easier to render than buildings, but that's what I'm experiencing
EDIT3: it doesn't seem to slow down much more after that, I'm up to 1000 population right now Smiley I did notice the traffic calculations might be wrong. I have a single road connecting my entire residential/commercial area to my entire industrial area and it's only slightly congested.

I do really like the game btw, in case that wasn't obvious Smiley
8  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 17:22:21
I made a quick image of a scenario where the game slows down a lot:

http://imageshack.us/photo/my-images/823/city4k.png/

btw, is the placing of items bound to the mouseUp event? when I click somewhere and move the mouse during a slowdown the tile get's placed at the position where my mouse ends up (hence the odd road and powerline in the screenshot Smiley)

If the slowdowns are indeed because of traffic calculations, you don't have to update them each step, only when something on the map changes. It could be solved with a simple boolean check, so it shouldn't take up too much space.
9  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 11:32:31
Took me a few tries to get people to move in, but I got it now.

However, after I got a reasonable village (about 180 people, 4 industrial areas and 3 commercial areas) the game started to get extremely slow and the window turned white for some time. It seems like there is some loop that's taking up a lot of time.

Other than that I think a bulldoze function would be nice (and if it fits maybe a minimap, I keep losing my city when I go to other windows Tongue)
10  Games Center / 4K Game Competition - 2012 / Re: PORT4K on: 2012-02-22 19:27:41
The jump button seems to work fine now, but now the fps is crappy Tongue
11  Games Center / 4K Game Competition - 2012 / Re: Applet template on: 2012-02-20 18:55:43
I'm sorry, apparently the x and y values are public. You don't need to use getters but you can use this:
1  
mouseX=e.x;

this is all deprecated code by the way. In case of the 4k competition you can still use this (because it requires less code this way) but in other applications I recommend using mouseListener and mouseMotionListener.

EDIT:
The code I gave for the button doesn't work with the old events either. In order to differentiate between mouse buttons you need to check e.modifiers.
1  
2  
3  
4  
case Event.MOUSE_DOWN:
    if (e.modifiers == 0) //left button
   if (e.modifiers == Event.ALT_MASK // middle button
   if (e.modifiers == Event.META_MASK // right button

Unfortunately, this method counts pressing the left button while holding the alt key as pressing the middle mouse button. If that's a problem, you'll need to use the newer listeners.
12  Games Center / 4K Game Competition - 2012 / Re: Applet template on: 2012-02-20 16:30:14
The event that is passed to the handler has all the information, so in case of the movement:

1  
2  
3  
4  
5  
6  
...
case Event.MOUSE_MOVE:
    mouseX=e.getX();
    mouseY=e.getY();
    break;
...


And in the case of the mouse_down and mouse_up, e.getButton() returns an int corresponding to the mousebutton the event applies to, so:

1  
2  
3  
4  
5  
6  
7  
...
case Event.MOUSE_DOWN:
    if (e.getButton() == MouseEvent.BUTTON1) {
        mouseButtonState="down";
    }
    break;
...


and similar for Event.MOUSE_UP
13  Games Center / 4K Game Competition - 2012 / Re: Applet template on: 2012-02-20 15:58:40
Well, it kind of depends on what you want exactly, that's why there are so many methods Smiley

Anyway, you should probably check out these two tutorials:
http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html
http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html
14  Games Center / Archived Projects / Re: Could I get some feedback on my destroyable terrain physics? on: 2012-02-15 14:16:16
Which works fine, but tends to get a bit slow on large levels.
If I were you I'd make a bitmap and update it (for example with draw oval if it is that kind of explosions) when needed. Not draw each explosion that ever occured on each frame Smiley

Yeah, I'm doing that Smiley It's only slow when you get a lot of explosions in a short period of time. I also use that method to draw a border as well (like in the later worms games) so I guess it's not really that odd that it slows down.

If you are doing that and it still is slow, how large is large? If large is huge and you need a world that big, split up the bitmaps into smaller and only draw the ones in the viewport.
Mike

I tried it on 6000*1000, so I guess it's huge Smiley It was just an experiment to see how it would work, but I guess splitting it up is the best way to go.
15  Games Center / Archived Projects / Re: Could I get some feedback on my destroyable terrain physics? on: 2012-02-15 12:53:40
I've been wondering for some time how they did this, never figured it was just a bitmap with bits cut out Smiley

Anyway, I tried to make my own worms (or scorched earth if you prefer Smiley) style destructible terrain and I was wondering what you use to draw the gaps?

I use this:
1  
2  
g.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
g.fillOval(xpos - radius, ypos - radius, radius * 2, radius * 2);


Which works fine, but tends to get a bit slow on large levels.
16  Games Center / Showcase / Re: Multiplayer Chess on: 2012-01-28 08:52:01
Your website get's blocked by NOD32, no reason given
17  Games Center / Archived Projects / Re: Escape the Men's Room on: 2011-05-10 10:17:19
Finished Smiley

-I agree on the screwdriver thing, I only started looking for it when Mickelukas mentioned it above. Maybe highlight the place where it is somewhat or at least change the color a bit so it stands out from the rest.
-Also, I feel there should be some confirmation when you have the code at the lock right, now you have to leave the puzzle screen to check (I entered the code in the wrong order at first)

Other than that I really liked it Smiley
18  Games Center / 4K Game Competition - 2011 / Re: Trains 4k on: 2011-02-26 11:54:34
I don't know the original, but i really like this Smiley

I do think that the orange should be a bit more reddish, right now it's hard to see the difference between orange and yellow.

EDIT: btw, I really like the way you introduce new concepts in the game. (simple level to try it out, and then harder levels to master)
19  Games Center / Archived Projects / Re: The GINI the M: Dogs on: 2011-02-05 19:43:25
Damint, I had pretty much the same ideas for a game Smiley
20  Game Development / Game Mechanics / Re: Game Board running in a BorderLayout panel on: 2011-01-11 21:03:19
Oh, right, I usually have startDoingSomething() and a stopDoingSomething() methods, so that's why i was confused.
21  Game Development / Game Mechanics / Re: Game Board running in a BorderLayout panel on: 2011-01-11 16:51:05
I don't understand what the use of the timer is in the above example. Why not just add a mouselistener with your code to the JFrame the gameboard is in?
22  Game Development / Newbie & Debugging Questions / Re: Dummy statement needed, else code won't run on: 2010-12-01 14:47:11
In the future the updatable will be on another machine and the method is called through RMI (i know, not the best idea, but the assignment was to write a multiplayer game using RMI). I don't want the game loop to wait for a failing RMI call, so that's why all this is in a separate thread. The thread has a setter to change updateNextCycle which first checks if (!busy).

But you're right about the locked CPU thing. I didn't really think this through Smiley Anyway, it works now, ty Smiley
23  Game Development / Newbie & Debugging Questions / Dummy statement needed, else code won't run on: 2010-12-01 14:07:04
Can anyone figure out why the code below only works if I add a dummy statement in the loop? Sleep(0) also works, but without any statement it simply wont run (ie. the update method on the updatable isn't called), no errors are given.

The ticking boolean is always true (insterted if i ever wish to pause the routine), updateNextCycle and msPassed are set by the main game loop. (the reason this is in a thread is because I don't want the game loop to wait for the update method to complete. Busy is used to indicate to the main loop that the previous update isn't ready yet).

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
    @Override
    public void run() {
        while(ticking) {
            int i = 0; //@todo figure out why this is needed
           if (updateNextCycle) {
                busy = true;
                updateNextCycle = false;
                updatable.update(msPassed);
                busy = false;
            }
        }
    }
24  Game Development / Newbie & Debugging Questions / Gray screen until resize on: 2010-11-08 14:01:50
Hello,

I'm working on a game which currently has a strange issue. When I start the application all I get is a gray window. When I resize the window (or even just click on the edge) the grahics suddenly appear and everything is fine from then on.

I have a class that extends JFrame as a window, I add a class that extends JPanel for the view and I override paintComponent in the JPanel to add the graphics. I know the view is correctly created (using System.out.println) only the graphics don't start updating until i resize.

I'm probably missing something very simple here, but I haven't got a clue what it is Smiley

(If you need to see the actual code feel free to ask, but I didn't think it would clarify anything and only make things more complicated)
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Grunnt (13 views)
2014-09-23 14:38:19

radar3301 (14 views)
2014-09-21 23:33:17

BurntPizza (31 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (29 views)
2014-09-20 20:14:06

BurntPizza (33 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (75 views)
2014-09-10 13:57:51

TehJavaDev (105 views)
2014-09-10 06:39:09
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!