Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Basic Game  (Read 89282 times)
0 Members and 3 Guests are viewing this topic.
Offline luisoft

JGO Coder


Projects: 6


Java games rock!


« Reply #30 - Posted 2012-03-09 18:25:36 »

Great tutorial. Can you share Geometry Wars Remake's soource code?

Offline Regenuluz
« Reply #31 - Posted 2012-03-10 19:13:57 »

I'm sorry to be an ass here, but this most certainly is not an article or a tutorial. There's *no* explaining going on what so ever. If anything, then this is just a codesnippet for someone to use and you can't use it without knowing how every part of the code works, or else you wont be able to make a game out of it. So it's not even a "basic game". And just copy/pasting wont teach you how to do anything.

Besides this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
 
if(deltaLoop > desiredDeltaLoop){
    //Do nothing. We are already late.
}else{
    try{
        Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000));
    }catch(InterruptedException e){
        //Do nothing
   }
}


really ought to be this:
1  
2  
3  
4  
5  
6  
7  
 if(deltaLoop <= desiredDeltaLoop){
    try{
        Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000));
    }catch(InterruptedException e){
        //Do nothing
   }
}


because having an empty if clause is just weird. Especially when it seems like it was only ever supposed to do nothing.
Offline Gudradain
« Reply #32 - Posted 2012-03-20 17:29:42 »

@Regenuluz Indeed...

Personally I learn faster with code snipset that I can execute than long text. Still if you want to contribute you can write a description of what every part is doing and I will add it to the first post.
Pages: 1 [2]
  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.

Riven (9 views)
2014-10-02 14:36:20

Pippogeek (41 views)
2014-09-24 16:13:29

Pippogeek (32 views)
2014-09-24 16:12:22

Pippogeek (22 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (30 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!