Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

What should I choose between java sdl, sfml, opengl, etc.

Asked by Lillian Hart Oct 10, 2022 1.3K views 3 answers
Share

About this question

I recently started a new project, and I'm wondering if I should change the technology now before it's too late.

I'm using SDL with C++, I have around 6 classes, and the game is going alright, but I got to this point where I have to rotate my sprite to make it point to the coordinates of the mouse.

It's a 2D topdown game, so if I pre-cached the images, I'd have to load 360 images, which is bad for memory. If I used SDL_glx, I could do the rotation in real time, but I heard it'd drop my frame rate very drastically, and I don't want my game to be slow.

I also read that I could use OpenGL, which is faster at these things. The problem is, how much would I have to change my code if I moved to OpenGL with SDL.

So, I considered moving to a completely different language - Java - which is much simpler, and would allow me to focus on the game and handle networking much more easily than with C++.

Your answer

3 Answers

Haki Latest answer

Answered on May 26, 2026

If you're already comfortable with C++, I'd stick with SDL for now — switching languages mid-project usually creates more headaches than it solves. For the rotation issue specifically, pairing SDL with OpenGL is a solid move. It takes a bit of adjustment to get comfortable with, but once you're past the initial setup, real-time transformations become much more manageable. Honestly, it's one of those things where the learning curve feels steep at first but clicks pretty fast. Take it step by step rather than trying to overhaul everything at once. I had a similarly frustrating stretch a while back where I was stuck on multiple problems at the same time - oddly enough, stumbling onto https://animeflix.city/ Fast Payout Casinos while looking for something unrelated actually gave me a clear breakdown of a process I'd been overthinking, which reminded me that sometimes the clearest explanations come from unexpected places. Same energy applies here - break the problem down, tackle the OpenGL integration separately, and don't let the big picture overwhelm the small steps.

Was this helpful?

Amandalawrancee

Answered on May 12, 2026

rotating a sprite in 2d doesn’t require 360 cached images; just store one texture and rotate with a transform. if you stay on sdl, using sdl2 with hardware acceleration or an sdl+opengl renderer can handle this fine without tanking fps. switching to java won’t magically simplify graphics either, though lwjgl/jme can be nicer for tooling. i got distracted once while debugging input math and ended up on https://twinspinca.com/no-deposit-bonuses/ which says more about my procrastination than my engine choice. i’d pick one stack and finish a small playable slice before rewriting everything.

Was this helpful?

More Java discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Java Blogs

Guides, tips and career advice on Java from JanBask experts.