Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles >>NEW MAP EDITOR BUILD: 6-22-2014!!<< on: 2014-06-25 12:55:28
I really enjoyed playing with this.  It is really great.  I'm looking forward to seeing little peeps running around and trying to cope with the crazy map that I draw.  

Some quick ideas to help you.

On the initial map creation screen, TAB should probably jump you from one field to another (minor).  Also minor, the font is quite hard to read when you type in your map name.  Fonts are hard though (I certainly struggle with them), so not one to labor over right now I expect.

When placing trees it would be nice if there was a round brush, or if the edges were always a little more organic.

If you select a tile from the right draw, it would be nice if one tile is selected by default (perhaps the last one you used).  Otherwise you have to also click on the tile to select it.  Even if there is only one tile.

The eraser erases everything.  But drawing grass or earth respects the fact that trees exist and does not write over them.  Would be nice if the eraser respected the layers.  

You cant draw gravel up against "tiles" or walls without it erasing part of them and putting the base layer (like grass) in between.  Even if the brush size is 1.

If you hold down both mouse buttons and draw with dirt with a thin brush, then the drawing does not keep up with the speed that you move at.  It looks like you are drawing a nice road, but when you go back over it, there are gaps in it.

I can see that you can draw rock on top of rock, to make a mountainside, but its not initially clear how. I think that it is Accent Mode, is that right?  This does not work for drawing walls on top of rock, which would be nice.  It would also be nice if you could keep drawing layers to make a mountain.  Of course then we would need gravity for rivers and bridges and all sorts of fun stuff. Snow on the top for example.

Need an undo button.  I clicked several times by accident and found myself hitting ctrl-z automatically and then was disappointed when nothing happened...

Chris
2  Discussions / General Discussions / Re: Have you ever debug your programs/games on an emulator? on: 2014-06-23 14:20:20
It would be better to test on the actual hardware if at all possible.  Unfortunately you are looking for subtle incompatibilities between different implementations of the JVM and how they interact with the hardware.  You might have issues with your emulator that never show up on a real machine and vice versa.  It would be a shame to spend hours trying to chase down a problem that will never happen on a real machine.

This might be a reasonable test if you don't have access to another machine, but you could also solicit testers with suitable hardware who want to try out the game.
3  Discussions / General Discussions / Re: Game Design Advice on: 2014-06-20 13:05:50
Oh, and in terms of ideas (which is what you really asked), pick a movie you like, or a book, or a tv show and use that as the situation.  Or take the vague objective from it.  You only need something simple in most cases.  What's the situation?  What's the objective?  What are the obstacles?  What does the hero need to do...

So for a (seemingly) simple game like VVVVVV, the situation is simple.  Ship has crashed, something weird has happened and the crew are scattered.  Need to rescue the crew.  Theme is space station, sort of...  Code from there..

So pick a theme or objective from a topic you like.  Hero is trapped and needs to escape from the dungeon, castle, desert or shopping mall that he/she is stranded in.  The cops, knights, dragons, robots or viral agents are out to get him and need to be defeated or avoided.  Oh, and better get it all done before the tidal wave, solar radiation storm, or black friday sale starts.

Chris
4  Discussions / General Discussions / Re: Game Design Advice on: 2014-06-20 12:53:38
If its your first game, I would make a simple 2D platform game, with typical classic elements.  Mostly that will just give you a reason to learn the game loop mechanics, timing, simple animation using sprites, smooth movement etc.  You can add sounds and some effects.  All things that will help you with future games.  Don't be too ambitious at first.
5  Game Development / Newbie & Debugging Questions / Re: [Question] Rendering Tiles from an Array of Chunks on: 2013-01-09 18:24:28
Not sure I understand the question exactly, but I would go about it like this.  Let's say your chunks are 32x32 tiles and your world is made up of 100x100 chunks.  You have an area of 3200x3200 to explore. 

Let's say you know that the character is at tile 1000,2000 - the starting point.  You get the chunk that tile is in by Math.floor(1000/32) and Math.floor(2000/32).  Those are the coordinates of the chunk.

You can go in the other direction too.  If you know a tile is at 10,10 in a chunk then its world coordinate is 32*chunkCoordinate + 10.

Note that the coordinates go from 0 - 31 for a chunk with 32x32 tiles.

For rendering you can test if any of a chunk is on the screen before you render it.  This saves you from rendering things that are not visible.  Do this check at the chunk level.  Then for chunks that are partially on the screen run the check again at the tile level.  To improve performance just grab the chunk coordinates around the player to do the tests, rather than all of them.

For debugging, I find it is helpful to insert some code to color the corners of the chunk so that you can see that everything lines up well.  You remove the coloring once it works.  In fact you can render dummy chunks with just corner tiles to test this out.

Ask more questions if that does not help or if I misunderstood the question.

Chris
6  Game Development / Newbie & Debugging Questions / Re: ConcurrantModificationException on: 2013-01-07 22:33:31
I would use the standard for loop.  You get very used to the format of it.  I save iterators for hashMaps and other collections that are not easy to traverse with a simple loop. 
7  Game Development / Newbie & Debugging Questions / Re: How to HANDLE collision? on: 2012-12-05 16:54:01
I created a function called collisionDetectedSlide().  When a collision is detected, it does not roll back the players position, it just rolls back the component of the vector that caused the collision.  So it the player only overlapped the object in the Z direction, then it just rolls back the Z movement.  This means that players rolls off objects and slides along them if they hit the object at an angle.  It works much better than just rolling back the movement, which tends to make the player stick to the wall when they hit it.  Basically each time the player moves you store the previous X,Y,Z positions.  Then revert one or more of them if the movement resulted in a collision.

Its as simple as this:

   /**
    * Check if the player has intersected with a block and slide along a surface if you hit it at an angle
    * Makes for a better play experience than coming to a dead halt.
    *
    * @param lastX
    * @param lastY
    * @param lastZ
    */
   private void collisionDetectedSlide(float lastX, float lastY, float lastZ) {
      boolean undo=false;
      float x = player.getX();
      float y = player.getY();
      float z = player.getZ();
      float newx, newy, newz;
      
      undo=false;
      
      if (collisionDetected(x, lastY, lastZ)) {
         newx = lastX;
         undo=true;
      } else newx=x;
      if (collisionDetected(lastX, y, lastZ)) {
         newy = lastY;
         undo=true;
      } else newy=y;
      if (collisionDetected(lastX, lastY, z)) {
         newz = lastZ;
         undo=true;
      } else newz=z;
            
      if (undo) player.undoMove(newx, newy, newz);
      
   }
8  Game Development / Newbie & Debugging Questions / Re: LWJGL Loading Progress on: 2012-12-05 16:43:26
I think the key might be that you are missing Display.sync(60).  So Display.update() tries to render the screen at as high a frame rate as possible.  Add that just after you Display.update() and see if it reduces the time.

As the post above says, there are probably ways to reduce the 1.7 seconds, but the extra time for drawing the screen should not be there.
9  Game Development / Newbie & Debugging Questions / Re: Thought process of making a game. Am I doing this right? on: 2012-12-05 16:34:05
Start with something simple, but which progresses you towards the finished game.  I would start with the game board.  See if you can render the board on the screen.

Don't start with an image of the board, you need to store the positions of the walls in a data structure and then render each wall in the right location.  You will need that if the walls can be removed and added by spells. You also need to know where the walls are so that later, the player and monsters are prevented from passing through walls. 

It looks like a 2D tile game, which is a great place to start, so use a 2D array.  Something like

byte[][] maze = new byte[32][32]

would create an empty array.

Write a game loop that does nothing other than draw the screen.  The screen can be a single quad for the "grass" in the background and then small quads where ever you have data in your array.  I suggest using a byte in the data structure, rather than a Boolean, because you could have different wall types in the future.

You will need to fill the array with data of course.  For a test like this you might just put it into the code by hand.  Maybe start with an 8x8 grid.

Once you have a maze, add a Character.  It can be a simple sprite that hops from tile to tile as you press the keys.  Then you can make it move smoothly with more changes to the code. Stop is hitting walls.  Add other entities and so on.

You will not end up with an award winning game this way and the code will be far from optimal.  But you will learn a lot.  And your next game will be better.

10  Game Development / Newbie & Debugging Questions / Re: MAC OSX Fullscreen on: 2012-12-05 15:55:51
Its OSX 10.6 on a laptop. Everything else runs fine.  The mouse is a bit too sensitive, but that is fixable.

Here is the code.  Like I said, I think it is straight from the tutorial:

/**
    * Set the display mode to be used
    *
    * @param width The width of the display required
    * @param height The height of the display required
    * @param fullscreen True if we want fullscreen mode
    */
   private void setDisplayMode(int width, int height, boolean fullscreen) {

      // return if requested DisplayMode is already set
            if ((Display.getDisplayMode().getWidth() == width) &&
         (Display.getDisplayMode().getHeight() == height) &&
         (Display.isFullscreen() == fullscreen)) {
         return;
      }
      
      try {
         DisplayMode targetDisplayMode = null;
         
         if (fullscreen) {
            DisplayMode[] modes = Display.getAvailableDisplayModes();
            int freq = 0;
            
            for (int i=0;i<modes.length;i++) {
               DisplayMode current = modes;
               
               if ((current.getWidth() == width) && (current.getHeight() == height)) {
                  if ((targetDisplayMode == null) || (current.getFrequency() >= freq)) {
                     if ((targetDisplayMode == null) || (current.getBitsPerPixel() > targetDisplayMode.getBitsPerPixel())) {
                        targetDisplayMode = current;
                        freq = targetDisplayMode.getFrequency();
                     }
                  }

                  // if we've found a match for bpp and frequency against the
                  // original display mode then it's probably best to go for this one
                  // since it's most likely compatible with the monitor
                  if ((current.getBitsPerPixel() == Display.getDesktopDisplayMode().getBitsPerPixel()) &&
                      (current.getFrequency() == Display.getDesktopDisplayMode().getFrequency())) {
                     targetDisplayMode = current;
                     break;
                  }
               }
            }
         } else {
            targetDisplayMode = new DisplayMode(width,height);
         }
         
         if (targetDisplayMode == null) {
            System.err.println("Failed to find valid mode: "+width+"x"+height+" fs="+fullscreen);
            return;
         }

         Display.setDisplayMode(targetDisplayMode);
         Display.setFullscreen(fullscreen);
         
      } catch (LWJGLException e) {
         System.err.println("Unable to setup mode "+width+"x"+height+" fullscreen="+fullscreen + e);
      }
   }
11  Game Development / Newbie & Debugging Questions / MAC OSX Fullscreen on: 2012-12-04 02:56:19
Here's a strange one.  I've developed a game on the PC and just tested it on a MAC.  It works fine, except when I press F1 to toggle into Fullscreen mode, the screen spins around and around like crazy.  Toggling back from fullscreen does not stop the spinning.  You have to stop the game and restart.

Anyone else seen this?  I've basically used the fillscreen code from one of the tutorials.  Is there a fix?

thanks

Chris
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.

Longarmx (41 views)
2014-10-17 03:59:02

Norakomi (33 views)
2014-10-16 15:22:06

Norakomi (26 views)
2014-10-16 15:20:20

lcass (30 views)
2014-10-15 16:18:58

TehJavaDev (59 views)
2014-10-14 00:39:48

TehJavaDev (60 views)
2014-10-14 00:35:47

TehJavaDev (50 views)
2014-10-14 00:32:37

BurntPizza (66 views)
2014-10-11 23:24:42

BurntPizza (38 views)
2014-10-11 23:10:45

BurntPizza (80 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!