Mouse/TouchScreen Coordinates Tutorial

  Рет қаралды 5,620

ForeignGuyMike

ForeignGuyMike

Күн бұрын

Пікірлер: 26
@Majskolvenz
@Majskolvenz 10 жыл бұрын
Thanks, your tutorials have really helped me with both getting started with libGDX and getting a good structure for my game projects.
@R0bit
@R0bit 10 жыл бұрын
YAY! Now to start showing off to my friends!
@sonic2kk
@sonic2kk 10 жыл бұрын
So the *screen* co-ordinates are basically co-ordinates relative to what you can see, and *world* co-ordinates are like a global co-ordinate system?
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
"what you can see" is a bit unclear to me. Screen coordinates are exactly what they sound like. If your phone is 1920x1080, then any touch will only be from (0, 0) to (1920, 1080). World coordinates are the *game* coordinates. Whatever game units you are using. The game coordinates are an infinite plane.
@thevioletmasquerade
@thevioletmasquerade 9 жыл бұрын
Hey Mike, I'm trying to implement a Gdx.isTouched() method but can't get it to work correctly. I need the mouse input to get the coordinates from the worldCoordinates variable instead of the screenCoordinates. Any idea how I can go about doing this?
@CGRAPHlCS
@CGRAPHlCS 10 жыл бұрын
Very helpful. Hey Mike, have you come across a way to render filled circles smoothly in libgdx? Right now, when I render filled circles in libgdx the border appears pixelated and not smooth. I've looked into anti-aliasing and filled shapes but the methods suggested don't seem to work. Any ideas? Thanks
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
You're using the ShapeRenderer? As far as I know, there's really no easy, reliable way to do it. You can try drawing the shape to a texture instead, or use an antialiasing shader.
@RoganPlant
@RoganPlant 10 жыл бұрын
After using both a library and pure Java, which would you reccomend to an advanced game programmer?
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
If by "pure" Java you mean everything that comes in the standard package (Swing/Java 2D/Java Sound), then I recommend moving on to an actual gaming framework. There is nothing in the standard JDK designed for gaming.
@luizlls
@luizlls 10 жыл бұрын
Hey Mike, can you please upload this example project?
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
dl.dropboxusercontent.com/u/59779278/libgdxtutorials/MouseTutorial.rar
@luizlls
@luizlls 10 жыл бұрын
ForeignGuyMike thx!
@jacquessarraffe9431
@jacquessarraffe9431 10 жыл бұрын
Aye mike I just started on programing games and taking a online java course. it. Seems as if you have an idea for a game you could just make it. And I kno those skills won't just come over night but can you tell me what you did to learn all this.
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
Pretty much experimenting. If I don't know how something works, I'll look up its documentation, then just mess around with it for a while and come up with ways to use it.
@jacquessarraffe9431
@jacquessarraffe9431 10 жыл бұрын
Did you take any classes or anything.
@jacquessarraffe9431
@jacquessarraffe9431 10 жыл бұрын
I've seen the games you made with libgdx and I have to say they look amazing. But I've watch your tutorials and really have No idea what going on.
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
Jacques Sarraffe Game programming isn't something you should be doing if you're just starting out. It's like trying calculus when you're just learning how to add. You should really get more comfortable with Java, or programming in general, before doing this stuff.
@jacquessarraffe9431
@jacquessarraffe9431 10 жыл бұрын
OK thanks for the tips I've also had a Lil bit of experience with unity and c#. It does seem a bit easier but I'm going more for quality with my game so I will be using libgdx. I will get back to you after I finish my java course
@ausechi
@ausechi 10 жыл бұрын
In the new version of the lib GDX they use just OpenGL 2.0 above, but I want to use OpenGL 1.0, how can I do this?
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
Try to find older versions of LibGDX. Maybe they still host those in an archive or something.
@MuresanVladMihail
@MuresanVladMihail 10 жыл бұрын
Use version 0.9.9!
@ausechi
@ausechi 10 жыл бұрын
Muresan vlad mihail it's what I'm doing...
@1123g0
@1123g0 10 жыл бұрын
can u do a tutorial how to make a menu for game
@ForeignGuyMike
@ForeignGuyMike 10 жыл бұрын
Nope.
@nelisvanlaeken2053
@nelisvanlaeken2053 10 жыл бұрын
Nice!
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,5 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 4,6 МЛН
15 Years Writing C++ - Advice for new programmers
4:04
SyncMain
Рет қаралды 1,3 МЛН
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 708 М.
Why I Code on Linux Instead of Windows
7:34
ForrestKnight
Рет қаралды 973 М.
What is the Smallest Possible .EXE?
17:04
Inkbox
Рет қаралды 546 М.
Java MouseListener 🖱️
11:46
Bro Code
Рет қаралды 77 М.