Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (799)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (865)
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 7643 times)
0 Members and 1 Guest are viewing this topic.
Offline 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. :-/
Offline 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 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
Global Moderator

JGO Wizard

Medals: 76
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.

Offline 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).


artemis-odb: bugfixing and performance optimized fork of artemis ECS
Offline 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.


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

(Ow shit it actually doesn't work..)
(Ow shit it actually does work.... Cheesy)
(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.
Offline 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

Senior Devvie

Medals: 2
Projects: 3

« 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.
Offline 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

Senior Devvie

Medals: 2
Projects: 3

« 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  

Riven (198 views)
2019-09-04 15:33:17

hadezbladez (4909 views)
2018-11-16 13:46:03

hadezbladez (1810 views)
2018-11-16 13:41:33

hadezbladez (5183 views)
2018-11-16 13:35:35

hadezbladez (1023 views)
2018-11-16 13:32:03

EgonOlsen (4387 views)
2018-06-10 19:43:48

EgonOlsen (5228 views)
2018-06-10 19:43:44

EgonOlsen (2971 views)
2018-06-10 19:43:20

DesertCoockie (3874 views)
2018-05-13 18:23:11

nelsongames (4305 views)
2018-04-24 18:15:36
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45 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‑
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!