Show Posts
|
|
Pages: [1]
|
|
5
|
Discussions / Suggestions / Sorting in showcase broken?
|
on: 2012-03-08 23: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 11: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  The controls take some getting used to, but I do like it so far 
|
|
|
|
|
7
|
Games Center / 4K Game Competition - 2012 / Re: City4k
|
on: 2012-02-25 12: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  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 
|
|
|
|
|
8
|
Games Center / 4K Game Competition - 2012 / Re: City4k
|
on: 2012-02-24 18: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  ) 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 12: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  )
|
|
|
|
|
11
|
Games Center / 4K Game Competition - 2012 / Re: Applet template
|
on: 2012-02-20 19: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: 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) if (e.modifiers == Event.ALT_MASK if (e.modifiers == Event.META_MASK |
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 17: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
|
|
|
|
|
14
|
Games Center / Archived Projects / Re: Could I get some feedback on my destroyable terrain physics?
|
on: 2012-02-15 15: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  Yeah, I'm doing that  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  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 13:53:40
|
I've been wondering for some time how they did this, never figured it was just a bitmap with bits cut out  Anyway, I tried to make my own worms (or scorched earth if you prefer  ) 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.
|
|
|
|
|
17
|
Games Center / Archived Projects / Re: Escape the Men's Room
|
on: 2011-05-10 12:17:19
|
Finished  -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 
|
|
|
|
|
18
|
Games Center / 4K Game Competition - 2011 / Re: Trains 4k
|
on: 2011-02-26 12:54:34
|
I don't know the original, but i really like this  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)
|
|
|
|
|
22
|
Game Development / Newbie & Debugging Questions / Re: Dummy statement needed, else code won't run
|
on: 2010-12-01 15: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  Anyway, it works now, ty 
|
|
|
|
|
23
|
Game Development / Newbie & Debugging Questions / Dummy statement needed, else code won't run
|
on: 2010-12-01 15: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; 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 15: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  (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)
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|