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   
Pages: [1]
  ignore  |  Print  
  Searching for a UI Developer (Mobile) [[Simple]]  (Read 3777 times)
0 Members and 1 Guest are viewing this topic.
Offline CTucker1327
« Posted 2014-05-21 06:09:54 »

So, I guess I'll go ahead and start this thread off with the story. The one that nobody cares about.

My name is Chris, I'm 19 years of age and I've been teaching myself Java on and off for a few years now, around a year ago I decided that I wanted to jump into Game-Development with Java, leaving the Unity3D Game-Engine behind. I picked up a few skills and extended my knowledge quite a bit, but I never really got around to finishing an actual game. I'm not sure why I stopped, I guess you can say I just lost the hype that I had for my own project. I didn't have a reason to create it, or really a general idea of the direction I wanted the game to go, so after playing with it for awhile and learning how to do different things, it literally just became my programming sandbox.

I stopped working on things for a few months and decided that I wanted to start with application design. After awhile I have finally completed the core of my application and it runs exactly how I want it to; However there's a simple problem.  The way it's presented.

I've taken numerous man-hours slaving over how I wanted to bring this game to life, what I could do to create a simple, yet addictive game-play that would bring people back for absolutely no reason whatsoever. I finally believe that I've found that game-play style.

Because of this reason and how simple it is, I won't be releasing any details on the game itself until it's completed, because I'm sure any experienced programmer could create a clone prototype in a few hours, but I'm not the experienced person everyone would want on their professional team. I'm just a teen learning.

-----------------------------------------------------------


Alright, so let's cut to the chase.

Here's the mock-up of the menus that I need created.


Basically what I need you to do is the following:

I need you to create an application that will have this UI setup working, obviously you're not going to be able to incorporate anything like the actual games achievements or anything into the UI, but you can create a system that works with false data (Hardcoded).

Instead of making the game button load the game, make it load the game-over menu. This way I can understand how to go through menu transitioning.

--------------------------

I don't have much money, but I do have expectations for this game to profit. If you require payment I'll see what I can scrape up, but as I stated earlier I'm 19 without a job. All of the money I have goes towards school and a car-note and I get it through freelance work.

Thanks in advance,
Chris
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #1 - Posted 2014-05-21 08:46:30 »

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  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
215  
216  
217  
218  
219  
220  
221  
222  
223  
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;

public class Mockup extends ApplicationAdapter {
   static final boolean debug = true;

   Viewport viewport;
   Stage stage;
   Skin skin;

   Actor currentScreen;

   public void create () {
      viewport = new ScreenViewport();
      stage = new Stage(viewport);
      Gdx.input.setInputProcessor(stage);
      createSkin();
      setScreen(new MainMenu());
   }

   void createSkin () {
      skin = new Skin();

      // Generate a 1x1 white texture and store it in the skin named "white".
      Pixmap pixmap = new Pixmap(1, 1, Format.RGBA8888);
      pixmap.setColor(Color.WHITE);
      pixmap.fill();
      skin.add("white", new Texture(pixmap));

      // Store the default libgdx font under the name "default".
      skin.add("default", new BitmapFont());

      // Configure a TextButtonStyle and name it "default".
      TextButtonStyle textButtonStyle = new TextButtonStyle();
      textButtonStyle.up = skin.newDrawable("white", Color.DARK_GRAY);
      textButtonStyle.down = skin.newDrawable("white", Color.DARK_GRAY);
      textButtonStyle.over = skin.newDrawable("white", Color.LIGHT_GRAY);
      textButtonStyle.font = skin.getFont("default");
      skin.add("default", textButtonStyle);

      // Configure a LabelStyle and name it "default".
      LabelStyle labelStyle = new LabelStyle();
      labelStyle.font = skin.getFont("default");
      skin.add("default", labelStyle);
   }

   public void render () {
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
      stage.act();
      stage.draw();
      Table.drawDebug(stage);
   }

   public void resize (int width, int height) {
      viewport.update(width, height, true);
   }

   void setScreen (Actor newScreen) {
      int screenWidth = Gdx.graphics.getWidth();
      if (currentScreen != null)
         currentScreen.addAction(sequence(parallel(moveBy(-screenWidth, 0, 0.750f), fadeOut(0.750f)), removeActor()));
      currentScreen = newScreen;
      stage.addActor(newScreen);
      newScreen.setX(screenWidth);
      newScreen.getColor().a = 0;
      newScreen.addAction(parallel(moveBy(-screenWidth, 0, 0.750f), fadeIn(0.750f)));
   }

   class MainMenu extends Table {
      TextButton challenge30sButton, challenge1mButton, challenge5mButton, achievementsButton, highScoresButton;

      public MainMenu () {
         super(skin);
         if (debug) debug();
         createWidgets();
         createLayout();
         createEvents();
      }

      void createWidgets () {
         challenge30sButton = new TextButton("30 Second Challenge", skin);
         challenge1mButton = new TextButton("1 Minute Challenge", skin);
         challenge5mButton = new TextButton("5 Minute Challenge", skin);
         achievementsButton = new TextButton("Achievements", skin);
         highScoresButton = new TextButton("High Scores", skin);
      }

      void createLayout () {
         setFillParent(true);
         add("Game Name").row();
         pad(10).defaults().space(10).fillX();
         add(challenge30sButton).row();
         add(challenge1mButton).row();
         add(challenge5mButton).row();
         add(achievementsButton).row();
         add(highScoresButton).row();
      }

      void createEvents () {
         ClickListener gameOverListener = new ClickListener() {
            public void clicked (InputEvent event, float x, float y) {
               setScreen(new GameOver());
            }
         };
         challenge30sButton.addListener(gameOverListener);
         challenge1mButton.addListener(gameOverListener);
         challenge5mButton.addListener(gameOverListener);
         highScoresButton.addListener(gameOverListener);

         achievementsButton.addListener(new ClickListener() {
            public void clicked (InputEvent event, float x, float y) {
               setScreen(new Achievements());
            }
         });
      }
   }

   class Achievements extends Table {
      ScrollPane scroll;
      Table itemsTable;

      public Achievements () {
         super(skin);
         if (debug) debug();
         createWidgets();
         createLayout();
         populate();
      }

      void createWidgets () {
         itemsTable = new Table();
         scroll = new ScrollPane(itemsTable);
      }

      void createLayout () {
         setFillParent(true);
         add(scroll).expand().fill();

         itemsTable.pad(10).defaults().fillX().space(10);
      }

      public void populate () {
         ClickListener mainMenuListener = new ClickListener() {
            public void clicked (InputEvent event, float x, float y) {
               setScreen(new MainMenu());
            }
         };
         for (int i = 0; i < 50; i++) {
            TextButton button = new TextButton("Achievement " + (i + 1), skin);
            itemsTable.add(button).row();
            button.addListener(mainMenuListener);
         }
      }
   }

   class GameOver extends Table {
      TextButton submitButton, shareButton, againButton;

      public GameOver () {
         super(skin);
         createWidgets();
         createLayout();
         createEvents();
      }

      void createWidgets () {
         submitButton = new TextButton("Submit High Score", skin);
         shareButton = new TextButton("Share Score", skin);
         againButton = new TextButton("Play Again!", skin);
      }

      void createLayout () {
         setFillParent(true);
         add("Game Name").row();
         pad(10).defaults().space(10).fillX();
         add("Your score: " + MathUtils.random(10, 100)).row();
         add(submitButton).row();
         add(shareButton).row();
         add(againButton).row();
      }

      void createEvents () {
         ClickListener mainMenuListener = new ClickListener() {
            public void clicked (InputEvent event, float x, float y) {
               setScreen(new MainMenu());
            }
         };
         submitButton.addListener(mainMenuListener);
         shareButton.addListener(mainMenuListener);
         againButton.addListener(mainMenuListener);
      }
   }

   public static void main (String[] args) throws Exception {
      LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
      config.width = 320;
      config.height = 480;
      new LwjglApplication(new Mockup(), config);
   }
}

It is completely self contained, you just need to paste it into a libgdx project. Use it as a start to learn this stuff yourself!

Offline CTucker1327
« Reply #2 - Posted 2014-05-21 09:14:18 »

I'm not using libgdx as I'm having a ridiculously hard time getting it setup on a linux machine.
My problem is with all of the XML that comes with the standard Java version of doing this.
I've decided to just use an approach where menus are drawn images, and I check the bounds on the TOUCH_UP event for menus.

This is probably not the best way to do it, but until I can get LibGDX working this seems like my only choice.
I've spent my last 9 hours reading up on a framework for android games, and they aren't making it very easy on us.

The LibGDX Version looks very simple to use, but I feel like it shouldn't be too different using the standard graphics that I'm using now that I've got the basics down. We'll see.

Thanks for all the help! Going to reference this while trying to convert to standard and when I move to LibGDX
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2014-05-21 09:32:57 »

You didn't specify you wanted the UI created with Java2D. If you are making a game, using Java2D is not the way to do it.

Online Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #4 - Posted 2014-05-21 12:16:16 »

Classic! Going overboard to help somebody, getting a 'nah' as response Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Cero
« Reply #5 - Posted 2014-05-21 12:37:35 »

I'm not using libgdx as I'm having a ridiculously hard time getting it setup on a linux machine.

I dont follow ._.
whats the connection between linux and libgdx ?

Maybe he is developing on freaking SOLARIS =D

Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #6 - Posted 2014-05-21 13:07:52 »

Classic! Going overboard to help somebody, getting a 'nah' as response Smiley
When will I learn?  Huh

Online Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2014-05-21 13:44:09 »

Classic! Going overboard to help somebody, getting a 'nah' as response Smiley
When will I learn?  Huh
Well, at least you got to plug the ease of use of LibGDX, disguised as an overly helpful post, right? Smiley And I got a freaking medal by playing along! Win-Win!

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #8 - Posted 2014-05-21 13:53:08 »

Haha Cheesy Nah, everyone knows scene2d is hard to use. And table? WTH is a table?!

Offline CTucker1327
« Reply #9 - Posted 2014-05-21 20:28:08 »

I'm not using libgdx as I'm having a ridiculously hard time getting it setup on a linux machine.

I dont follow ._.
whats the connection between linux and libgdx ?

Maybe he is developing on freaking SOLARIS =D

 Cranky Go home.

The connection is I can't get the project to setup correctly, and when importing the gradel project into eclipse, it totally craps all over itself.

You didn't specify you wanted the UI created with Java2D. If you are making a game, using Java2D is not the way to do it.

This is what all of the tutorials I've been reading so far have showed. Hundreds of pages wasted if this is the case. Besides, this game isn't going to be anything like you'd envision a game to be, it's basically just a standard app, but I'm presenting it as a game. There aren't any animations, or sprites moving around, so I figured this would be fine. If it's not could you please explain why?

Classic! Going overboard to help somebody, getting a 'nah' as response Smiley

I didn't give him the nah response, I'm actually very grateful for what he did and it helped me understand how to do things on the LibGDX Side, which is great. I used LibGDX a little when I was on windows.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline matheus23

JGO Kernel


Medals: 109
Projects: 3


You think about my Avatar right now!


« Reply #10 - Posted 2014-05-21 20:43:37 »

when importing the gradel project into eclipse, it totally craps all over itself.

Try to focus on this problem for now and provide us a little more info. I really recommend fixing this, because libGDX will be a very good choice for you in the end. You'll be glad that you got it fixed Wink

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline CTucker1327
« Reply #11 - Posted 2014-05-21 20:51:12 »

Al-right, will do. I've tried everything that I know how though, including a reinstall of eclipse. I'll continue to google the issue, but it's not very well known.
Offline CTucker1327
« Reply #12 - Posted 2014-05-21 21:50:00 »

I finally got LibGDX working and I'll be using nates example to learn from. Thanks again nate!
Offline CTucker1327
« Reply #13 - Posted 2014-05-21 23:08:59 »

Having some problems with the size, the buttons are rediculously small and I'm trying to make them larger.

Here's what I've tried

1  
2  
btnPlay30s = new TextButton("30 Second Challenge!", game.getSkin());
      btnPlay30s.setSize((Gdx.graphics.getWidth()) - (Gdx.graphics.getWidth() / 4), Gdx.graphics.getHeight() / 8);


I've also tried the setScale, but it's not changing.
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #14 - Posted 2014-05-22 09:18:55 »

RTFM

Offline CTucker1327
« Reply #15 - Posted 2014-05-22 18:26:23 »

RTFM

Where do you think I got the information I used? I didn't pull it out of my ass. I figured it out anyway.
Offline seismic
« Reply #16 - Posted 2014-05-22 22:12:52 »

Well that escalated quickly
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #17 - Posted 2014-05-23 07:22:19 »

Where do you think I got the information I used? I didn't pull it out of my ass. I figured it out anyway.
You asked for help before making reasonable effort yourself.

Quote
I never instruct those who aren't full of passion, and I never enlighten those who aren't struggling to explain themselves. If I show you one corner and you can't show me the other three, I'll say nothing more. -Confucius
This forum has a nice ignore feature. Best of luck!

Pages: [1]
  ignore  |  Print  
 
 

 

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 (38 views)
2014-10-17 03:59:02

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

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

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

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

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

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

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

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

BurntPizza (78 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!