Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 8 9 [10]
 91 
 on: 2014-10-24 15:03:24 
Started by Norakomi - Last post by Norakomi
O yes, forgot about that, that's a good way for sure.

But then I get to my resetLevels method:
1  
2  
3  
4  
5  
6  
7  
8  
9  
   public void resetLevels() {
      LEVEL1FINISHED = false;
      LEVEL2FINISHED = false;
      LEVEL3FINISHED = false;
      LEVEL4FINISHED = false;
      LEVEL5FINISHED = false;
      LEVEL6FINISHED = false;
      LEVEL7FINISHED = false;
   }


And I'm still curious if it is possible to do this more efficiƫnt for say if it where 40 levels.

 92 
 on: 2014-10-24 14:58:54 
Started by Norakomi - Last post by BurntPizza
Keep a counter?

1  
2  
3  
if (levelsFinished == 7) {
    reset();
}

 93 
 on: 2014-10-24 14:57:29 
Started by Norakomi - Last post by Norakomi
I've got a level select screen where the player can choose between 1 of the 7 levels of my game.
If he finishes a level a boolean (LEVELxFINISHED = true;) gets set and a check mark is drawn over the level in the level select screen and the player is only able to choose from the remaining levels.

If he finishes ALL level, for now I want all boolean for if the leve is finished to be reset.

I'm doing this with this code.

1  
2  
3  
4  
if (LEVEL1FINISHED && LEVEL2FINISHED &&
            LEVEL3FINISHED && LEVEL4FINISHED &&
            LEVEL5FINISHED && LEVEL6FINISHED &&
            LEVEL7FINISHED ) {resetLevels();}


I was wondering is there is a way to automate/optimize this code.
It works fine, but imagine i would have had like 40 levels....
Would be nice to know how to do this check with some kind of for loop.


 94 
 on: 2014-10-24 14:10:24 
Started by BurntPizza - Last post by theagentd
Is the performance profiler HDR rendered?
I think this game is getting too polished... Wink
Hehe, I'm glad you think so, but no, it's not. I do apply a very simplified bloom filter to it and add it on top of the UI using a special additive blending operation which gives a very good HDR look and preserves anti-aliased gradients etc.

More info here: http://www.java-gaming.org/index.php?topic=33171.0

 95 
 on: 2014-10-24 13:40:48 
Started by Jacob Pickens - Last post by princec
I was intrigued by Papers, Please because of the idea of how it messed with your emotions. At the time I was thinking of getting it though I didn't want any extra negative emotions in my life though and passed on the opportunity at the time. As I understand it it makes you feel like something of a monster.

Cas Smiley

 96 
 on: 2014-10-24 13:30:35 
Started by Jacob Pickens - Last post by kappa
Papers, Please IMO is a pretty good example of how you can deliver a pretty good experience through a game without being too heavily focused on gameplay mechanics.

 97 
 on: 2014-10-24 12:52:27 
Started by Jacob Pickens - Last post by gouessej
When I want my game to convey a message, I display it (explicit) or I would use the gameplay to make the player do something that makes her/him draw a conclusion related to my message. For example, some parts of a level could be almost impossible to get across alone but it would become doable with a few comrades. Some civilians could shout out "eat this" to make you spotted and/or throw some objects into your face if you were famous for your ill-treatments on others.

 98 
 on: 2014-10-24 12:40:05 
Started by roland - Last post by roland
Hmm actually how are you checking the output data?

Cas Smiley
Opening it with gimp and deleting the alpha channel. Don't know if that works though.

Saved as a compressed byte array now (with width and height stored in the first 8 bytes) and that works fine so I could just keep it like that, file size seems ok

 99 
 on: 2014-10-24 12:14:13 
Started by roland - Last post by princec
Hmm actually how are you checking the output data?

Cas Smiley

 100 
 on: 2014-10-24 11:42:18 
Started by roland - Last post by roland
I think it might be a bug then. Fairly sure I had some severe headscratching over this exact issue.

Cas Smiley
Hmm, I tried another library too (pngj) and no luck there. I guess I'll just save it as a compressed byte array.
Thanks,
roland

Pages: 1 ... 8 9 [10]
 

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

The first screenshot will be displayed as a thumbnail.

theagentd (16 views)
2014-10-25 15:46:29

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

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

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

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

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

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

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

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

BurntPizza (45 views)
2014-10-11 23:10:45
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!