Show Posts
|
|
Pages: [1] 2
|
|
11
|
Game Development / Game Mechanics / [SOLVED] "Fog of War"
|
on: 2011-12-24 03:10:44
|
|
Is there any way I can have it so I can't see units a certain distance away? I thought of drawing only units that intersect with an oval around my player, but it would look weird when they came into view, as they would just pop up. I also thought of a vignette image I could lay over the canvas, but not sure if that would work.
|
|
|
|
|
13
|
Game Development / Newbie & Debugging Questions / Re: Slick Applet
|
on: 2011-12-20 01:25:53
|
My apologies  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Mon Dec 19 19:25:29 EST 2011 INFO:Slick Build #274 Mon Dec 19 19:25:29 EST 2011 INFO:Starting display 1024x768 Mon Dec 19 19:25:29 EST 2011 INFO:Controllers not available Test 1 Mon Dec 19 19:25:29 EST 2011 INFO:Initialising sounds.. Mon Dec 19 19:25:29 EST 2011 INFO:- Sound works Mon Dec 19 19:25:29 EST 2011 INFO:- 64 OpenAL source available Mon Dec 19 19:25:29 EST 2011 INFO:- Sounds source generated Test 2 Mon Dec 19 19:25:30 EST 2011 ERROR:null java.lang.NullPointerException at com.theducecat.pong.Pong.update(Pong.java:96) at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657) at org.newdawn.slick.AppletGameContainer$Container.runloop(AppletGameContainer.java:514) at org.newdawn.slick.AppletGameContainer$ContainerPanel.start(AppletGameContainer.java:218) at org.newdawn.slick.AppletGameContainer$1.run(AppletGameContainer.java:92) org.newdawn.slick.SlickException: Game.update() failure - check the game code. at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:663) at org.newdawn.slick.AppletGameContainer$Container.runloop(AppletGameContainer.java:514) at org.newdawn.slick.AppletGameContainer$ContainerPanel.start(AppletGameContainer.java:218) at org.newdawn.slick.AppletGameContainer$1.run(AppletGameContainer.java:92) |
|
|
|
|
|
17
|
Java Game APIs & Engines / Java 2D / Collision Question
|
on: 2011-12-07 03:48:32
|
|
I have a player sprite that must collide with blocks in the world. However, I don't want to use a for loop to check every single block in the world every tick, so what can I do? My idea was to get the player's current position, and only check blocks around the player. Is this a good idea?
|
|
|
|
|
18
|
Discussions / Miscellaneous Topics / Re: JavaScript is a scam
|
on: 2011-12-07 03:44:40
|
I'm going to be honest, I don't like JavaScript, it isn't my type of language, but I'm forced to use it. I love how easy it is to set up a small script of 10-20 lines of code, but I really hate writing big applications with it. I really hope Google's Dart( http://dartr.com/) takes off. They made some very valid points in their explanation for creating the language. I got a chance to play around with it, and I much prefer the syntax. Right now, it compiles right into JS, but Google wants to strive for this language on browsers, as well as the server.
|
|
|
|
|
26
|
Java Game APIs & Engines / Java 2D / Re: 2D Block Problems
|
on: 2011-12-03 03:23:29
|
1 2
| int blockX = x / (int) gameScale / 16 + (int) (camera.getLocation().x / 16f); int blockY = y / (int) gameScale / 16 + 1 + (int) (camera.getLocation().y / 16f); |
I tried rounding the camera / 16 values, but it doesn't help much.
|
|
|
|
|
27
|
Java Game APIs & Engines / Java 2D / [SOLVED] 2D Block Problems
|
on: 2011-12-03 03:14:02
|
|
I have two problems with the game I'm making. I have a 2D block sandbox game, like Terraria. When I move the camera around, I can still click the blocks to break them, but the blocks are sometimes off when I click. For example, when clicking on one block, it will destroy the one next to it. I believe this had to do with the camera's position being a float, and the positioning being thrown off by this. How can I fix it?
|
|
|
|
|
30
|
Game Development / Newbie & Debugging Questions / Getting Clicked Block
|
on: 2011-11-29 04:22:52
|
|
I'm making a game like Terraria, 2D sandbox. I'm stuck, I can't figure out how to find out what block a user hit. I have the mouse x and y, but the only way I can think of is to have a Rectangle for each block, then use a for loop to cycle through every block to see which rec contains the co-ordinates, but it seems so inefficient.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|