Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (593)
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 3 [4] 5 6 ... 10
 31 
 on: 2015-01-29 20:39:25 
Started by BurntPizza - Last post by ags1
Wrote an OBJ exporter for my 3D modeling language, and loaded my test model successfully in an online viewer:

http://www.3dvieweronline.com/share/OKMXULwdjN3gnit/OKMXULwdjN3gnit

Hah! I am free of the shackles of jMonkey Engine  Wink

 32 
 on: 2015-01-29 20:32:33 
Started by lcass - Last post by HeroesGraveDev
I for one would be happy if my school started teaching programming seriously at all.

At the moment it is only taught in the last 2 years of the IT class, and even then it is optional in the last year.
Then even when it is taught, it's only one assessment in the year and counts towards about 1/8 to 1/6 of the years mark.

Part of the problem is probably that we have no teachers that can program.

That said, I'm on the "programming is a specialised skill and shouldn't be forced" side of the argument. Enough people have trouble with just basic algebra. No point adding harder problems for them to deal with.

 33 
 on: 2015-01-29 20:22:47 
Started by lcass - Last post by matheus23
I'm currently in "High School" here in Germany (or better: "Gymnasium", as we call it here) and I'll write my final written examination in 7 weeks.
In Germany (or at least in Baden-W├╝ttemberg, the Southwest part of Germany ^^) we all have the opportunity to choose courses for our 11th and 12th year. One of them is "Informatik", basically computer science, but a little more practically oriented. So I've had almost 2 years of 4 times 45 minute lessons a week now. First we learned HTML + PHP, including arrays, iteration, control flow and all that stuff + a little recursion. Then moved on to Java, learning Classes, little bit of OOP, recursion, Linked Lists, Sorting algorithms and currently stuff like sorted, balanced binary trees.

As of now I'm not allowed to do parts of my Abitur in Informatik. That'll change from next year on, though (I'll be gone then :/).

I agree to KevinWorkman. Programming should be taught to everyone. Or better: Some kind of logic thinking. Currently learning to program means learning how to use computers comprehensively, that is, learning how to use the command line (we had a little bit of this when learning Java), learning about how the internet works (HTML + PHP). Basically our computer course included a lot of specification learning, less of the "essence programming - the thinking about processes" stuff. It is also bound to current technology, or better - the technology that was "current" when they wrote the curriculum. Programming technology changes fast. It's not like in maths, where everyone seems to have agreed to some basic concepts and syntax (Sets, Basic number operations, functions, etc.). I, for example, would have liked to learn a lot more functional language stuff in school, instead of Java, since I know functional languages will take over the world, it's just a matter of time *evil-laughter*. Honestly, though, it's not really practical to stick with one technology.

Also, I believe in the future (if programming is going to be taught to a lot of people), programming will appear much more in our daily lifes: It already started with people using Excel in their dayjobs (See Reply #38). They program macros for making their life easier. I think that is going to appear in much more applications in the future. Or at least it should. Because it could make so many things easier! Smiley

About the "the great programmers and the rest" debate: Something like that seems to exist in everything that can be done as a hobby at home. For example Art: I know of some students in an art course at our school, who are significantly more skilled than the rest of the students. It's not as extreme as in our computer science course, to be honest, but it's noticable.

 34 
 on: 2015-01-29 20:09:12 
Started by drokota - Last post by drokota
Ahh right sorry, I was just having trouble with the collision detection. Nothing to do explicitly with Java2D, but more to do with my understanding of how I should be doing it.

 35 
 on: 2015-01-29 19:59:33 
Started by drokota - Last post by ags1
What has collision got to do with Java2D? Or with any other graphics library?

 36 
 on: 2015-01-29 19:53:59 
Started by drokota - Last post by KevinWorkman
You could. And it might make sense that way. But you don't **have** to do anything.

You could also make these interfaces with default methods.

 37 
 on: 2015-01-29 19:52:06 
Started by Shuster - Last post by Shuster
Whenever you add it to the ArrayList, update the reference variable?

I have no idea why I didnt thought of that, now it works great thanks!
If anyone is interested this is the working code:

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  
   public boolean onTouch(MotionEvent e, int scaledX, int scaledY, View v) {
      int pointerCount = e.getPointerCount();
      playerObject = Player.getPlayer();
      for (int i = 0; i < pointerCount; i++) {
         int x = (int) ((e.getX(i) / v.getWidth()) * GameMainActivity.GAME_WIDTH);
         int y = (int) ((e.getY(i) / v.getHeight()) * GameMainActivity.GAME_HEIGHT);
         int action = e.getActionMasked();

         switch (action) {

         case MotionEvent.ACTION_UP:

            if (moveLeft.contains(x, y)) {
               playerObject.setMovingLeft(false);

            }
            if (moveRight.contains(x, y)) {
               playerObject.setMovingRight(false);

            }
            if (moveLeftExit.contains(x, y)) {
               playerObject.setMovingLeft(false);

            }
            if (moveRightExit.contains(x, y)) {
               playerObject.setMovingRight(false);

            }

            break;
         case MotionEvent.ACTION_POINTER_UP:
            if (moveLeft.contains(x, y)) {
               playerObject.setMovingLeft(false);

            }
            if (moveRight.contains(x, y)) {
               playerObject.setMovingRight(false);

            }
            if (moveLeftExit.contains(x, y)) {
               playerObject.setMovingLeft(false);

            }
            if (moveRightExit.contains(x, y)) {
               playerObject.setMovingRight(false);

            }

            break;

         case MotionEvent.ACTION_DOWN:
            if (jump.contains(x, y)) {
               if (playerObject.getVelY() == 0 && playerObject.isJumping() == false && getLevel() != 19) {
                  playerObject.setVelY((float) -11.5 - jumpAdd);

                  Assets.playSound(Assets.jump);
                  if (getLevel() == 17) {
                     jumpAdd += 1;
                  }
                  playerObject.setJumping(true);

               }
            }

            if (restart.contains(x, y)) {
               restart();

            }
            if (getLevel() == 21) {
               if (y < 440) {
                  addObject(new Block(x / 32 * 32, y / 32 * 32, 7, this, ObjectId.Block));
               }
            }
            if (getLevel() == 23) {
               jumpCount--;
            }
            if (jumpCount <= 0) {
               addObject(new Box(480, 50, ObjectId.Box));
               jumpCount = 100;
            }

            break;
         case MotionEvent.ACTION_POINTER_DOWN:
            if (jump.contains(x, y)) {
               if (playerObject.getVelY() == 0 && playerObject.isJumping() == false && getLevel() != 19) {
                  playerObject.setVelY((float) -11.5 - jumpAdd);

                  Assets.playSound(Assets.jump);
                  if (getLevel() == 17) {
                     jumpAdd += 1;
                  }
                  playerObject.setJumping(true);

               }
            }

            if (restart.contains(x, y)) {
               restart();

            }
            if (getLevel() == 21) {
               if (y < 440) {
                  addObject(new Block(x / 32 * 32, y / 32 * 32, 7, this, ObjectId.Block));
               }
            }
            if (getLevel() == 23) {
               jumpCount--;
            }
            if (jumpCount <= 0) {
               addObject(new Box(480, 50, ObjectId.Box));
               jumpCount = 100;
            }

            break;

         case MotionEvent.ACTION_MOVE:

            if (moveLeftExit.contains(x, y) && !moveLeft.contains(x, y)) {
               playerObject.setMovingLeft(false);

            }
            if (moveLeft.contains(x, y)) {
               playerObject.setMovingLeft(true);
               playerObject.setMovingRight(false);

            }
            if (moveRight.contains(x, y)) {
               playerObject.setMovingRight(true);
               playerObject.setMovingLeft(false);

            }
            if (moveRightExit.contains(x, y) && !moveRight.contains(x, y)) {
               playerObject.setMovingRight(false);

            }

            if (moveLeft.contains(x, y) && moveRight.contains(x, y)) {
               playerObject.setMovingLeft(false);
               playerObject.setMovingRight(false);
            }

            break;
         }
      }

      return true;
   }

 38 
 on: 2015-01-29 19:50:56 
Started by drokota - Last post by drokota
That's a good idea, I think I'll try the MovableObject class. I'd have to make that abstract right?

 39 
 on: 2015-01-29 19:33:32 
Started by Shuster - Last post by KevinWorkman
Whenever you add it to the ArrayList, update the reference variable?

 40 
 on: 2015-01-29 19:32:48 
Started by Shuster - Last post by Shuster
Why don't you keep around a reference to your player object instead of searching for it every time you want to move it?
I thought about it but I coudnt find a way how to do it because in each level the player gets created in a different place in the array list..

Pages: 1 2 3 [4] 5 6 ... 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.

Archive (20 views)
2015-01-29 04:26:08

theagentd (21 views)
2015-01-28 15:33:52

GamerIDGoesHere (29 views)
2015-01-27 01:23:23

GamerIDGoesHere (30 views)
2015-01-27 01:22:15

CopyableCougar4 (37 views)
2015-01-27 00:34:41

CopyableCougar4 (23 views)
2015-01-26 04:47:56

Olo (17 views)
2015-01-25 21:26:00

Olo (23 views)
2015-01-25 18:44:22

Robo11 (39 views)
2015-01-25 06:14:26

basil_ (33 views)
2015-01-17 22:29:32
2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!