Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (208)
games submitted by our members
Games in WIP (781)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 4 5 [6] 7 8 ... 10
 51 
 on: 2017-01-19 20:16:13 
Started by Blunderchips - Last post by Blunderchips
Morning All
I just published my first Android project to the play store and I'm looking for some feedback/honest criticism.

Made using libGDX
All icons came from http://game-icons.net/

Gameplay:
Can you .juggle? Tap the screen to jump around universe and collect the magical coins!
The objective of the game is to collect the little golden floating coins by repeatedly tapping the screen to jump. When ever you jump the players X velocity in inverted.
There light swearing in game.

Screenshots:


Below is a short video of what the game looks like in its current state.

<a href="http://www.youtube.com/v/AxEoHa61Vks?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/AxEoHa61Vks?version=3&amp;hl=en_US&amp;start=</a>

Thanks in advance!

 52 
 on: 2017-01-19 19:06:29 
Started by DayTripperID - Last post by DayTripperID
@vfmachado That's exactly what I was doing before, and it works great. I'm moving away from polling to interrupting, though, because I eventually want to use it in bigger projects where it needs to be more flexible and be able to handle mechanics like key mapping. Incidentally, the YouTube link I provided in the OP, which has the tutorial for this method I'm using now, is from the ChernoProject. His stuff has been the most useful to me so far out of the YouTube crowd. I could be totally off-base, but I think in the long run interrupting would be the better approach.

 53 
 on: 2017-01-19 18:55:33 
Started by BurntPizza - Last post by vfmachado
This week I finally finished the BennyBox Game Engine tutorial. It is a tutorial about what is and how to develop a 3D Game Engine in 60 episodes.

I'm including more stuff and creating basic GameComponents (e.g. skybox, gui) to facilitate the game creation.

Hopefully, next week I can post something related to this little project.

 54 
 on: 2017-01-19 18:51:52 
Started by DayTripperID - Last post by vfmachado
My approach to detect keys is use an array of booleans where true represent if the key was pressed and falser otherwise.

Basically it allows you tu combine different keys and do almost everything that you want. I saw other people using this approach, e.g. ThinMatrix, TheBennyBox, ChernoProject ... all with a lot of cool videos in youtube.

I recommend you separate your input system from your logical/update stuff. Normally it's more elegant solution.

 55 
 on: 2017-01-19 18:51:35 
Started by BurntPizza - Last post by SHC
I decided to add multi lingual support for my website powered by Jekyll, and it is extremely easy with the front matter. From now on, I'm going to post in Telugu and Hindi along with English.

https://goharsha.com/blog/multi-lingual-support/

Look at the language-selector in the top right!

 56 
 on: 2017-01-19 18:43:44 
Started by DayTripperID - Last post by DayTripperID
I've actually revised PlayerKeyListener to get rid of the if statements and use a HashMap instead:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
public class PlayerKeyListener implements EventListener {

   private Player player = null;
   
   private interface Action {
      public void perform();
   }
   
   private Map<Integer, Action> actionMap = new HashMap<>();
   
   public PlayerKeyListener init(Player player) {
      this.player = player;      
      actionMap.put(KeyEvent.VK_A, () -> moveLeft());
      actionMap.put(KeyEvent.VK_D, () -> moveRight());
      return this;
   }
   
   @Override
   public void onEvent(Event event) {
      EventDispatcher dispatcher = new EventDispatcher(event);
      dispatcher.dispatch(Event.Type.KEY_RELEASED, (Event e) -> (onKeyReleased((KeyReleasedEvent) e)));
      dispatcher.dispatch(Event.Type.KEY_PRESSED, (Event e) -> (onKeyPressed((KeyPressedEvent) e)));
   }
   
   public boolean onKeyPressed(KeyPressedEvent e) {
      System.out.println("key pressed fired");
     
      if(actionMap.containsKey(e.getKey()))
         actionMap.get(e.getKey()).perform();
      return false;
   }
   
   public boolean onKeyReleased(KeyReleasedEvent e) {
      System.out.println("key released fired");
     
      player.setxdir(Mob.NONE);
      player.setxspeed(0);
      return false;
   }
   
   private void moveLeft() {
      player.setxdir(Mob.LEFT);
      player.setxspeed(3);
   }
   
   private void moveRight() {
      player.setxdir(Mob.RIGHT);
      player.setxspeed(3);
   }  
}



But the problem persists with the exact same behavior, at least on my machine. I just want to make sure it's understood that I INACCURATELY described the bug in the initial post. The actual behavior, at least on my end, is that if I press the second button while the first button is still pressed, a KeyPressedEvent is fired, causing the player to go in the other direction, but then when I release one of them, a KeyReleasedEvent is fired, causing the player to stand still. I inserted some println statements that confirm this behavior.

Here is a step-by-step breakdown of the sequence I am describing.:

1). A held down : player moves right

2). D held down (A still held down): player moves left. This is okay as far as I'm concerned.

3). A released (D still held down): Player stops, even though D is still held down. This is not okay; player should start moving left again.

The reason I don't want this is because when you switch directions rapidly, it halts the player, since most people don't release old key before they press the new one, but rather press the new key then release the old one. I hope that, and the example sequence, make sense.

Also, just wanted to say thanks for taking to time to even bother looking at this. I know it's a pain in the ass, but it's also a huge help to me. Can you please check to see if this happens for you?


 57 
 on: 2017-01-19 17:57:07 
Started by DayTripperID - Last post by Archive
It works fine for me, I never experienced the player stopping due to keys being pressed. However RIGHT has a priority because it's the last key that's checked. What do you want to happen when both left and right are pressed?

 58 
 on: 2017-01-19 17:14:41 
Started by BurntPizza - Last post by Opiop
For the past couple of days I've been working on getting the HTML/CSS done for my band's website. I relied on Bootstrap a little, but most of it is (unfortunately) written by me. I'm not a front end developer or a designer, so this was pretty hard for me  Sad

The content on the site isn't finished (the About page is the main offender), but here it is: astimefades.com

Currently it's just hosted on my github, but the next stage is to add a backend and host it on Linode (or maybe DigitalOcean). I want to give my non-developer friends an easy way to add content to the page, and build out a merch feature (I'm feeling adventurous). The only part that will be new to me on the backend is accepting/handling payments through multiple solutions (PayPal/Stripe/etc...), but I'm hoping it won't be too hard. It'll all be written in that sweet, sweet new ASP.NET Core! 

 59 
 on: 2017-01-19 16:26:58 
Started by pepdeveloper - Last post by pepdeveloper
Thanks a lot!! Problem solved!!  Grin Grin

 60 
 on: 2017-01-19 14:19:32 
Started by pepdeveloper - Last post by nsigma
When you attach a debugger to your application (in your case Eclipse is the debugger client), the JPDA client can issue a request (over the JDWP / Java Debug Write Protocol) to redefine a class

More specifically, it allows you to redefine the code of a method.  You cannot change the structure of a class - add fields / methods, change method arguments, etc.

Oracle's HotSpot and OpenJDK support it)

Well, as they're one and the same thing ...  Grin  usually

Pages: 1 ... 4 5 [6] 7 8 ... 10
 
Galdo (512 views)
2017-01-12 13:44:09

Archive (668 views)
2017-01-02 05:31:41

0AndrewShepherd0 (1142 views)
2016-12-16 03:58:39

0AndrewShepherd0 (1064 views)
2016-12-15 21:50:57

Lunch (1192 views)
2016-12-06 16:01:40

ral0r2 (1425 views)
2016-11-23 16:08:26

ClaasJG (1522 views)
2016-11-10 17:36:32

CoffeeChemist (1481 views)
2016-11-05 00:46:53

jay4842 (1563 views)
2016-11-01 19:04:52

theagentd (1262 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!