Jump to content
  • Advertisement

xxSavagexx

Member
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

118 Neutral

About xxSavagexx

  • Rank
    Member
  1. Thanks very much, you have been extremely helpful :)
  2. Oh, one more thing! I noticed, when I put more projects in the same workspace, especially while using Gradle/libgdx, everything is very messy, is it possible to separate these workspaces somehow? And I know it's funny, but I hate this when eclipse automatically generates a method: [method parameters][method name]{ } is it possible to make it do this? [method parameters][method name] { } I usually write everything on my own, but for example when implementing an interface or something, if I forget, I usually use it's auto generate feature and if there are many methods it really makes my head hurt :)
  3. OK, I'll try doing that. Thanks very much. The problem is, I've never really wanted to be so dependable on everyone, just trying to do everything on my own haha :) Thanks again!
  4. Hello, a friend recently lend me his book for libgdx programming by Andreas Oelkhe. Everything cool, but to be honest, I dislike his "teaching style". I am looking for a tutorial that explains everything in detail, in this book it's all about "add this huge method here, add this huge method there". I want to learn everything in details so I can do everything on my own, be creative and not be limited by rechecking his code every time I fail! Can anyone recommend any eBook or tutorial for libgdx programming that is up to date (one more problem was, I had latest version of libgdx and had a lot of work to do before I even started learning. I mean, I'm relatively experienced in java, I've done few gaming tutorials, but none of them was nearly related to libgdx, I know there is a libgdx tutorial on kilobolt, but it's about flappy bird and to be honest, I don't want to make such games. Well, that's it...I'm looking forward to your advices! Thank you!
  5. xxSavagexx

    Stubborn libgdx problems!

    FIXED! I dug around a little bit more and here's how I fixed the problem, not sure if only one step or all of them together so I'm going to list everything I did! 1. Go to help in Eclipse and Update Software (Update everything you can!). 2.Download latest LibGdx setup file (last one was out few days ago) 3. Rebuild the project you want to make 4. IF you run the desktop or android app the first time, it's gonna fail (on PC and your android phone both) 5. Go to Run->Run Configurations->Desktop Launcher->Arguments tab. Then click other in the working directory tab and choose Android/assets folder as the default working directory 6. Run your apps and the app should be working fine on both platforms (it is for me)
  6. xxSavagexx

    Stubborn libgdx problems!

    Hello, sorry for not getting back sooner! OK, I updated everything on my eclipse, I downloaded newest libgdx, created new project, didn't mess around with the code and I tried starting the application (Desktop version) On my guess, the same error is stopping dektop and android version from starting. So...Here's the error.   Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: badlogic.jpg at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140) at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java:64) at com.badlogic.gdx.graphics.Texture.load(Texture.java:130) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:121) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:92) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:88) at com.imstudios.demo.Main.create(Main.java:16) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: badlogic.jpg (Internal) at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136) at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:220) at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137) ... 9 more
  7. xxSavagexx

    Stubborn libgdx problems!

    I'll send you, I gotta get some stuff done on the faculty and I'll get back to you as soon as I get a chance.
  8. xxSavagexx

    Stubborn libgdx problems!

    Wait, so, what's seems to be the problem then?
  9. xxSavagexx

    Stubborn libgdx problems!

    Okay, I got to the source of the problem. Let me first coppy the code and highlight all the spots causing it package com.packtub.libgdx.demo; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; public class MyDemo extends ApplicationAdapter {     SpriteBatch batch;     Texture img;<<<<<<<<<<<<<<<<<<          @Override     public void create () {         batch = new SpriteBatch();         img = new Texture("assets/badlogic.jpg");<<<<<<<<<<<<<<<<<<<     }     @Override     public void render () {         Gdx.gl.glClearColor(1, 0, 0, 1);         Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);         batch.begin();         batch.draw(img, 0, 0);<<<<<<<<<<<<<<<<<<<<<         batch.end();     } } When I try to run the app with these three lines put under comment section, the app starts with red background, when I put them back together, the app crashes. Under error section, it says something like badlogic.jpg cant be found but I got it in assets folder in demo, android and desktop version! Thanks!
  10. Hello! A few weeks ago I was working on Android game in eclipse (without ADT or any additional tools) when I found out my app was comepletely useless without SDK. Then I bought got a book from a library from Andreas Oelkhe about java android programming and started playing around with LibGdx. Well, playing around isn't really what I'm trying to say as I'm still trying to find out how to run the damn app when my HTC Wildfire S is connected to my PC directly. First problem I had (when running desktop version) was that the app was constantly throwing an error because it couldn't fin the badlogic.jpg which was there, but I somehow fixed it (it was a directory thing, can't really remember everything). Then, I tried to start the app while my phone was plugged in with debugging enabled and it DOES start (the screen flips to landscape position) but then it creashes right away! I thought it was the picture problem, so I put it in a comment section temporarily, but it still happens. The screen flips and then, MyDemo.java (or something) has stopped. I was so pissed, and I still can't find the right answer. I came here to you guys hoping some of you had experienced the same problem before. Oh, my Android version is 4.4.2, it is a bit unstable, but all the apps seem to be working quite well, some system processes sometimes crash, but that's it. Thanks in advance!
  11. Well, to be honest, I really like Java, it's not that complicated, and I learnt the basics very well, now I am able to make classes with constructors and make objects in other classes with those constructors. I've also heard about engines like Unity, but I like building everything from scratch. Regarding the NPE, well, if you think you could analyze the code a little bit, I would zip the whole program and send it to you for analyzing, but I'm not sure you'll like it, it's a bit messy, I got flamed hard and banned from StackOverflow because they didn't like my code. Thanks btw :D
  12. Well, I had an idea of trying to make my own equation for the shape of an object, I was a bit confused for object more complex than a circle or triangle, I mean I know I could have done something with sinuses and cosinuses, but I guess the rgb value thing could work :) I'll try to learn something about it these days! About the NPE, the weird thing is that it appears once in 20 runs, the Graphics error appears wheter I used coordinates of an object or set some none changing coordinates, it just seems like it has a problem fetching the picture from the folder since the pictures were dissappearing, but that can't be the only problem because it throws me the error even if pictures are there sometimes. Thanks a lot!
  13. Hello guys! Before I start with anything, I'd like to express my hapiness for having a chance to be a member of such a functional and big community of game developers and programmers. It would be rude to start without introducing, so here it is: My name is Marko, I am from Rijeka, Croatia. I am a student at Engineering Faculty of Rijeka, my field is electrical engineering. Even though I am (future) electrical engineer, it always was a pleasure to make programs. Recently I decided to earn some extra money by making some Android games. I always was a passionate gamer, I mostly understand what happens everywhere, I always dreamt about making few of my own games, so I decided to try learning it a bit, I've had some previous experience in Python, c++, basic, VB, perl etc., but I mostly learned everything about syntax, not much about each and every one of them individually. I learned java was used for android phones so I found a good tutorial at kilobolt.com and started learning, after few weeks I stopped learning and repeating everything they did and started implementing my own code. Now, I have a few questions (I'll try to be very precise, my code is huge since I am a bit inexperinced so it usually takes few more lines to do something than usually, so I'd rather keep it at words here. If anyone wants me to send them my code, I'll gladly do it, but I doubt you'll find any information in that pile haha! :)) Ok, my first question would be: I used JFrame superclass to make a GUI. At paint method, when I decide to assign coordinates of an object to a picture everything works well, but the problem is, I don't know how to enter whih coordinates I want. To be precise, of course, I know how to add them, but for example if I want to add a circular object (or some more complex) and add a .png file, it is being recognizes as a cube. So when I try to implement any simple collision recognition system, other objects interact with it as if it was a cube. That means I can't implent some laws of physics or geometry. For example if ball collided with a wall at some certain point it start heading in different direction, depending on angle between the balls moving line and wall's horizontal line. So if the wall wasn't flat, if it had some spikes, it would be still recognized as a cube with dimensions equal to maximum distance between both coordinates. I am using following command: g.drawImage(picture object, object.getX(),object.getY(),this); And the second question would be: I am sometimes getting NullPointerException when I run my code, or series of errors in Graphics superclass. I rechecked the code hundreds of times. I scanned my computer for viruses and found few trojans. It turns out my girlfriend downloaded some game which installed few adware programs, and I noticed it when files started missing from the folder I placed my image files for the game. So, is it possible, Eclipse got damaged during virus disinfection or by the adware trojans themselves? So sorry for writing such a long text, English is not my mother language so I can't explain everything in short. I heard you guys are very friendly so wanted to get some help here, I also want to stay here and be a prt of this community. Well, good night folks, it's pretty late here. First thing in the morning, I'll check for the answers, and once again, sorry for the length of the text and if you need my code, let me know!  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!