Java-Gaming.org Hi !
 Featured games (91) games approved by the League of Dukes Games in Showcase (757) Games in Android Showcase (229) games submitted by our members Games in WIP (844) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 Show Posts Pages: [1]
 1 Game Development / Game Mechanics / Re: Best collision pixel perfect system EVER, without physics (T_T) on: 2013-03-30 22:55:02 Quote from: wreed12345 on 2013-03-30 22:39:13http://www.java-gaming.org/topics/making-a-sprite-jump/28350/msg/257412/view.htmldefinitely check that out! I asked a similar question about jumping / gravity Thanx! When I'm done, I'll share source code.
 2 Game Development / Game Mechanics / Re: Best collision pixel perfect system EVER, without physics (T_T) on: 2013-03-30 22:37:01 Okay.jpgI apologize for the stupid question.
 3 Game Development / Game Mechanics / Re: Best collision pixel perfect system EVER, without physics (T_T) on: 2013-03-30 20:51:59 Sorry, that is not expressed. I need a pseudocode of jump & gravity.
4  Game Development / Game Mechanics / Re: Best collision pixel perfect system EVER, without physics (T_T) on: 2013-03-29 17:20:12
Oh, sorry...

 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17 `// CHECKcollides(Level level) {   boolean result = false;      // TOP      if (is_tile_solid(x+1, y, level)) result = true;      if (is_tile_solid(x+w-2, y, level)) result = true;      // BOTTOM      if (is_tile_solid(x+1, y+h-1, level)) result = true;      if (is_tile_solid(x+w-2, y+h-1, level)) result = true;      // LEFT      if (is_tile_solid(x, y+1, level)) result = true;      if (is_tile_solid(x, y+h-2, level)) result = true;      // RIGHT      if (is_tile_solid(x+w-1, y+1, level)) result = true;      if (is_tile_solid(x+w-1, y+h-2, level)) result = true;   return result;}`

 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19 `// MOVE ENTITYvoid move(Level level, int delta) {   float axs = Math.abs(xs);   float ays = Math.abs(ys);   float max = ays;   if (axs > ays) { max = axs; }   float xstep = xs/max;   float ystep = ys/max;   float axstep = Math.abs(xstep);   float aystep = Math.abs(ystep);   while (axs > 0 || ays > 0) {      x += xstep;      if (collides(level)) { x -= xstep; }      y += ystep;      if (collides(level)) { y -= ystep; }      axs -= axstep;      ays -= aystep;   }}`

 1  2  3  4  5  6  7  8  9  10 `// COLLISIONboolean is_tile_solid(float xpos, float ypos, Level level) {   int i = (int) ((xpos) / Level.tilesize);   int j = (int) ((ypos) / Level.tilesize);    if (i >= 0 && i < level.getMapWidth() && j >= 0 && j < level.getMapHeight()) {      if ( level.getMap().getTileId(i, j, Cnst.COLLISION) == Cnst.SOLID ) return true;      else return false;   }   return true;}`
 5 Game Development / Game Mechanics / Re: Resolving Pixel Perfect Collisions on: 2013-03-29 17:16:46
 6 Game Development / Game Mechanics / Best collision pixel perfect system EVER, without physics (T_T) on: 2013-03-29 17:15:11 Sup, community, I'm newbie. I'm creating a game with elements of classic platformer (Mario, etc...) on Slick2D. I made a pixel perfect, quick and simple system collision, I think. You can download and try for yourself. But I have some problems with physics (jump, gravity, acceleration). I learned a lot of stuff, soo... and I have no idea how it works. Please, help! T__T
 Pages: [1]
 EgonOlsen (76 views) 2018-06-10 19:43:48 EgonOlsen (56 views) 2018-06-10 19:43:44 EgonOlsen (76 views) 2018-06-10 19:43:20 DesertCoockie (258 views) 2018-05-13 18:23:11 nelsongames (156 views) 2018-04-24 18:15:36 nelsongames (155 views) 2018-04-24 18:14:32 ivj94 (896 views) 2018-03-24 14:47:39 ivj94 (160 views) 2018-03-24 14:46:31 ivj94 (809 views) 2018-03-24 14:43:53 Solater (173 views) 2018-03-17 05:04:08
 Java Gaming Resourcesby philfrei2017-12-05 19:38:37Java Gaming Resourcesby philfrei2017-12-05 19:37:39Java Gaming Resourcesby philfrei2017-12-05 19:36:10Java Gaming Resourcesby philfrei2017-12-05 19:33:10List of Learning Resourcesby elect2017-03-13 14:05:44List of Learning Resourcesby elect2017-03-13 14:04:45SF/X Librariesby philfrei2017-03-02 08:45:19SF/X Librariesby philfrei2017-03-02 08:44:05
 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