Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  Tycoon type system  (Read 524 times)
0 Members and 1 Guest are viewing this topic.
Offline Bassex96

Senior Member


Medals: 4



« Posted 2013-09-06 03:39:15 »

Hey guys. I've been scarce here lately and had to put my programming efforts on hold for a bit. I just didn't have the time due to my job. Due to recent events..and a bunch of bullshit. I'm now unemployed and looking for a new job. I'm getting back into coding and hopefully won't have to stop once I get a new job.

I'm practicing with a tycoon type game and have some questions...

I'm using LibGDX and it's mainly going to consist of multiple screens..A store screen, stat screen, options screen, etc. and finally a play screen. On the play screen, it will be the same menu style, but the screen will be split in two. The top half will have an isometric mini-world so-to-speak. It will show the players stand, and people walking up to it, walking around, etc. The bottom half will show the time and stats and such.

I'm pretty lost for the most part on going about implementing this. I'm thinking (and i'm not sure on this) that I would have to use Scene2d..Is this correct? or would there be a better way to go about it? It's basically just going to be a bunch of menus with information on them. I really want to be able to use tabs as well as I plan on making this for android and I think that would be the best way to organize the screens and information.

I've never used Scene2d...So far i've only made a brickbreaker game and a pacman game..I need something a little more challenging and something I would enjoy programming. brickbreaker and pacman were kind of...boring. I want to get past this learning curve...

ANY information/suggestions/links/articles/tips would be GREATLY appreciated!

Thanks guys!
Offline Bassex96

Senior Member


Medals: 4



« Reply #1 - Posted 2013-09-15 00:47:30 »

Anybody?
Offline Bassex96

Senior Member


Medals: 4



« Reply #2 - Posted 2013-09-15 01:16:13 »

Basically, what i'm asking is. If the whole game is going to be a UI system with the exception of one small part that will have isometric or orthogonal play area. What would be best to use?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #3 - Posted 2013-09-15 02:11:39 »

Basically, what i'm asking is. If the whole game is going to be a UI system with the exception of one small part that will have isometric or orthogonal play area. What would be best to use?

Since you're using libgdx anyway, what's wrong with using their scene2d.ui package? Looking over the documentation, it would appear to have enough functionality to do what you want with a minimal of fuss.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline BenningtonHD

Junior Member


Projects: 1



« Reply #4 - Posted 2013-09-15 02:30:32 »

I haven't used libgdx before, but for pretty much any game with a separate screens, you should make an enum of states, and use a switch statement to use the correct code for the menu that your currently on ex:

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  
public class TycoonGameWoo(){
   private static enum State {
   TITLE, STORE, STATSCREEN, OPTIONS, GAME;
   }
   //initialization stuffs
  private State state = State.TITLE
   while(!Display.isCloseRequested){
      switch(state){
         case TITLE:
         //do title stuff
        break;
         case STORE:
         //do store stuff
        break;
         case STATSCREEN:
         //show stats
        break;
         case OPTIONS;
         //do options stuff
        break;
         case GAME:
        //do main game stuff
       break;
   }
}


Then if i wanted to change menus I would just do something like this
1  
2  
3  
If(Keyboard.isKeyDown(Keyboard.KEY_RETURN)){
   state = state.GAME;
}


I programmed this in chat, so don't take it word for word but thats the general idea
Offline Bassex96

Senior Member


Medals: 4



« Reply #5 - Posted 2013-09-15 03:18:40 »

scene2d.ui is what I was planning on using. I just didn't know if there was anything better. I'm finding a lot of old documentation and having some problems getting it going.

Another concern I have with scene2d.ui is I don't think it has anyway to do a tabbed screen.
Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #6 - Posted 2013-09-15 03:47:38 »

scene2d.ui is what I was planning on using. I just didn't know if there was anything better. I'm finding a lot of old documentation and having some problems getting it going.

Another concern I have with scene2d.ui is I don't think it has anyway to do a tabbed screen.

Better is a matter of opinion. I'm not really a libgdx user, but I would say that if scene2d.ui can handle what you need, then go with it. Since it's already a part of libgdx, you won't have to worry about any potential compatibility quirks with the rest of the library. There are plenty of alternatives, but if you're wanting to develop for/port your application to mobile, you'll have to do some digging to see how suitable they are.

As for tabbed screens, it shouldn't be hard to roll your own using the available widgets. Conceptually a tabbed control is nothing more than a split pane with buttons in one half that set the state for what should be displayed in the other half. If you have to make your tabs "wrap", you may have to put a little more effort into it, but overall it shouldn't be too complex one way or the other.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline Bassex96

Senior Member


Medals: 4



« Reply #7 - Posted 2013-09-15 03:59:00 »

That's the problem. I'm not exactly sure what it's capable of. I'm trying to get it going but am having a bit of a problem as to where to start because of the old documentation.
Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #8 - Posted 2013-09-15 04:11:45 »

Which set of docs are you looking at. There appears to be one set hosed on Google, and one set hosted on GitHub. Since the main page directs to GitHub, I'd assume that would be the authoritative source. If those are the docs you're referencing already, then you may want to post a topic asking about the best source for the docs. There are plenty of libgdx users around here, so I'm sure they'd be able to point you in the right direction. The other option would be delving into tutorials, and learning what you need by examples. Unfortunately many of the libraries out there are susceptible to bit rot when it comes to documentation. persecutioncomplex

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (14 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (29 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!