Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
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]
  ignore  |  Print  
  Libgdx + Eclipse.  (Read 1600 times)
0 Members and 1 Guest are viewing this topic.
Online trollwarrior1
« Posted 2014-01-15 09:52:04 »

Sooo I started working with Libgdx yesterday. Downloaded everything and stuff. I almost finished porting my game from LWJGL to Libgdx. Wanted to see performance difference.

Soo what I found out, was that after I edit my sprite sheet and save it, changes don't appear in my game when I run it. I need to refresh Libgdx Android project in Eclipse for changes to take effect. Is there a way to fix this?

Offline Screem
« Reply #1 - Posted 2014-01-15 11:32:57 »

This isn't a libGDX problem. You need to refresh any Eclipse project if you change a file other than a class. AFAIK, There's no option in Eclipse to have it automatically refresh. :-/

Online trollwarrior1
« Reply #2 - Posted 2014-01-15 11:36:14 »

What do you mean this is not libgdx problem. It is. When I was working with 1 project and LWJGL, there as no such problem.

When I run my program, the image that I changed using paint.net doesn't change. I need to refresh eclipse so that I can see changes IN MY PROGRAM. I know that eclipse doesn't refresh when you add/remove file through windows. But this is different problem entirely.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline xsvenson
« Reply #3 - Posted 2014-01-15 11:45:17 »

It might have worked previously, yet it is still Eclipse that is responsible for refreshing and keeping the workplace up-to-date.
Try this "Preferences -> General -> Workspace" and "Refresh using native hooks or poll" and "Refresh on Access"

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #4 - Posted 2014-01-15 11:45:37 »

When I was working with 1 project

Yes, you were working with 1 project. The assets in libgdx are in the Android project, and you normally will change the main project. That means, Android project will not be refreshed automatically since eclipse will not invoke a build on it for no reason.

On a side note, you should really try to be more polite on this forum, specially to people trying to help. This is not the first nor second time I see you talking to people like they have the obligation to help you and give you the answer you deem correct. More specially in the case he is right and you are wrong - it is not a libgdx problem.

Online trollwarrior1
« Reply #5 - Posted 2014-01-15 11:57:17 »

So does that mean that when I run my program in Eclipse, it has already stored all the stuff from the hard drive into memory? Before my program even starts? Does that mean that my program is not actually reading from the hard drive, but memory instead?
Offline junkdog
« Reply #6 - Posted 2014-01-15 13:27:26 »

Eclipse maintains its own file cache, which can become inconsistent in projects spanning multiple eclipse projects. You could come around eclipse's caching by loading resources with a different FileHandle type (Local, I think, or external - don't remember which).

Ref: https://github.com/libgdx/libgdx/wiki/File-handling

artemis-odb: bugfixing and performance optimized fork of artemis ECS
Online trollwarrior1
« Reply #7 - Posted 2014-01-28 09:14:16 »

I found a way to fix that thingy where you have to refresh resources manually.

goto:

Window -> Preferences -> General -> Workspace -> Refresh On Access (tick on)

EDIT---
(Ow shit it actually doesn't work..)
EDIT----------
(Ow shit it actually does work.... Cheesy)
EIDT---------------
(Ow shit it kinda works..... It seems that it refreshes after 5 seconds the changes were made or something like that)
Offline jrenner
« Reply #8 - Posted 2014-01-28 13:18:51 »

Have you conisdered using IntelliJ IDEA (free community edition) + libgdx? That is the combination I have used for the past year and I can't recommend it enough.
Online trollwarrior1
« Reply #9 - Posted 2014-01-28 18:44:48 »

I always like to try new programs Tongue Thanks I will try it.

----------
It costs 500$?Huh For what??...

Uhmmmm, it also seems to be lot slower than eclipse.. After typing 1 word it always hangs up for a moment. This should be easily fixable by disabling some plugins I guess, but I still don't like it Cheesy

Getting used to new controls would be too much of a challenge..

I think I will stick with Eclipse for now.. Might try Netbeans just for fun Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ricardo
« Reply #10 - Posted 2014-01-28 18:53:58 »

With my android projects in eclipse, when I replace some resource I need to replace same file two times, or clean the project, or try to run the application to refresh the graphical layout.
I will try to tick "Refresh On Access" option and see if it refresh automatically, thanks for this tips.

EDIT: Do not work for me.
Online trollwarrior1
« Reply #11 - Posted 2014-01-28 19:00:35 »

Ummm tick "native something" options near the one I said. It updates after 5 seconds.
Offline ricardo
« Reply #12 - Posted 2014-01-28 19:06:23 »

"native hooks or polling" does not work for me too.

But, I tick "refresh using native hooks or polling" and "refresh on access" and it works now!
I do not understand why. Just one of the options ticked does nothing.

Well, thanks for this tips. Now I do not need to update same resources two times.
Offline jrenner
« Reply #13 - Posted 2014-01-29 11:23:32 »

Never experienced that slow down.  Most people report it being faster than Eclipse.

As for the price, the community edition is enough for most people.
Pages: [1]
  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.

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

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

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

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

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

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

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

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

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (85 views)
2014-10-11 22:30:10
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!