mattconsto / lost-the-game

Deserted. Created in 48 hours as part of the Global Game Jam 2015.
https://mattconsto.itch.io/lost-the-game
3 stars 0 forks source link

Stop using Slick2D #39

Open steppers opened 9 years ago

steppers commented 9 years ago

I've had a look at the Slick2D source and i can safely say we need to stop using it for the tile system. The rendering methods it uses are the slowest it could possibly use. I'm going to change the rendering to use plain lwjgl/opengl and I expect we'll see a huge frame rate improvement.

mikejewell commented 9 years ago

That sounds good! Would we keep Slick2D for the non-rendering side (audio, etc)?

steppers commented 9 years ago

That's what i was thinking.

mikejewell commented 9 years ago

How does libGDX compare to Slick2D? Looks like it's quite portable (allegedly runs on iOS/Android), and quite well maintained: http://libgdx.badlogicgames.com/

steppers commented 9 years ago

I've seen it before, read a book by the developer and it seems like it could be a good idea. But performance wise I'm not sure if iOS or Android would like our game. I'm writing some new rendering code at the moment with lwjgl only which shouldn't take too long to finish, i've got another idea to make the fog of war even better with it aswell :) If the performance boost is good enough, I'll have a look at libgdx because it uses lwjgl for desktop anyway.

steppers commented 9 years ago

If people don't mind I'm going to start porting as much of the game to LibGDX as I can. I'm going to attempt to read the entire libgdx wiki first though so that I know exactly what I should be doing to get the most out of it. Slick is being a pain in the arse with letting me mix pure opengl in with it...

agjlewis commented 9 years ago

Sounds good :) Full non tile based FoW would be ace :)

steppers commented 9 years ago

I'm going to give libgdx a miss i think... The GUI doesn't currently lend itself well to tablets (definately not phones). We can develop for desktop for now and then port later on if we feel that it's neccesary. I'm going to use lwjgl and a few other packages for image loading and sounds etc. now.

steppers commented 9 years ago

I've started with the conversion and created a new branch. I haven't pushed anything yet because I need to make sure that the project will load properly in eclipse and IntelliJ. I'm essentially reimplementing the core slick2d stuff like States, GameContainer, Input etc. The current stage is working but because i've removed the slick libraries, every other class fails to compile now... :( I'm going to make the conversion as painless as possible by just needing an import change, with the methods and classes having the same names and fields.

steppers commented 9 years ago

Please refrain from pulling at the moment as I may have messed the repo up a bit... Just give me some time please. Sorry!

steppers commented 9 years ago

No worries, i've managed to remove the changes :)