+ 19

Is it a bad idea to create a game in pure java?

I watched a game tutorial for eclipse and it took 200 lines of code just to display a blank window, the code consisted of threads, passing objects to methods, using keywords "this" and "new here there and everywhere, inserting peices of code which he didnt really understand but made the code work, it was just horrible.... I have studied java for 2 years and made nothing but a few sl codes I studied javascript for 2 weeks and made a game and published to playstore I'm I wasting me time with java? I cant seem to get the whole picture of the language in my mind just seems overly complicated and not always 100% sure what going on behind the scenes with without have to read source code. Sorry for the rant lol but just wondering if anyone find this language a never ending story.😅 My js game https://play.google.com/store/apps/details?id=com.chaosgamez.magmabat

25th Jan 2021, 6:27 PM
D_Stark
D_Stark - avatar
30 ответов
+ 7
Most of my university course work to date has involved using Java Swing. I’ve had to build several games with Swing for various assignments, Tetris, Tic-Tac-Toe, Clue, etc. Game development with Java is absolutely something you can do. Martin Taylor is 100% correct and has given you some excellent examples to get started with. If you need more examples I can share some of my assignments with you as well.
27th Jan 2021, 1:51 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
+ 6
Martin Taylor thanks, I will try this tommrow I have watched a few tutorials now and they have all diffrent ways of creating the window, I think my problem is understanding how threads work I understand that the main method is called by a thread but then I'm thinking why do I need a thread to call my method if i can just call it my self 😅 because in javascript this is all done on one thread were methods just call them selfs. did you say 200 lines of code indeed because it's true?
25th Jan 2021, 11:32 PM
D_Stark
D_Stark - avatar
+ 5
D_Stark Can I have the link of your game published to play store? I want to play your game~ It's a webview or coded with ReactNative?
27th Jan 2021, 2:59 PM
Gordon
Gordon - avatar
+ 3
Martin Taylor quote me right. I said use Spring MVC for web applications. When I said pure Java, I only meant OOP. Also I have clearly stated regarding the supporting API's in the very 1st sentence. You might know the language a lot better than I do but I try my best to not put forward misleading answers.
25th Jan 2021, 8:38 PM
Avinesh
Avinesh - avatar
+ 3
Instead java use kotlin As kotlin is now the official language for android
27th Jan 2021, 5:02 AM
Vrajesh Sulakhe
Vrajesh Sulakhe - avatar
+ 3
D_Stark Sir, can you please share the link of your Javascript game ? I also want to make one 🙄 Haven't you use HTML and CSS in it ? I have not much know on Java, so I also don't know it 😅
27th Jan 2021, 3:34 PM
Prasant
Prasant - avatar
+ 3
Hey ℍ𝕒𝕣𝕣𝕪 💕 𝕻𝖔𝖙𝖙𝖊𝖗 ⚡✨ Gordon , if your following this thread I put a link to the game in the question, I made in pure javascript no css then uploaded to playstore.
27th Jan 2021, 6:08 PM
D_Stark
D_Stark - avatar
+ 2
IMHO Java is better for enterprise software and Android development. If your game is for Android I don't think it's a bad idea but you also have other alternatives like ReactNative if JS is your thing.
25th Jan 2021, 8:01 PM
Sonic
Sonic - avatar
+ 2
Martin Taylor have you made any apps with java?
26th Jan 2021, 9:57 AM
D_Stark
D_Stark - avatar
+ 2
I think no but you have to learn c++ and other language..
27th Jan 2021, 10:31 AM
Prakhar Srivastava
Prakhar Srivastava - avatar
+ 2
D_Stark what did you use to make magmabat? If phonegap or cordova, I would like to ask you questions since I have problems to scale content, which looks well on sl or browsers
16th Feb 2021, 12:18 PM
bell
bell - avatar
+ 1
Sonic I really wanted to create a game in java but I feel like I'm missing somthing and cant figure out what it is😔 javascript is an alternative and I'm capable of making games with this but for some reason I have put so much time into java I want to get somthing back from it.
25th Jan 2021, 8:09 PM
D_Stark
D_Stark - avatar
+ 1
for me it is a bad idea for two reasons. First is that java is slow and the second is that if you use swing or javafx it won’t use the graphical card (i think).
27th Jan 2021, 3:11 AM
Anonyme Anonyme
+ 1
Just try, you will see.
27th Jan 2021, 10:12 AM
Alexander m
Alexander m - avatar
+ 1
No ....but you should have a great knowledge of java for it
27th Jan 2021, 1:35 PM
Arnav..
Arnav.. - avatar
+ 1
No it is working
27th Jan 2021, 3:40 PM
Imasha Nethsara
0
Pure Java in itself is not capable of doing a lot of stuff without supporting API's that you might be able to do with JavaScript. You need to mix it up a little, do android development, learn Spring MVC and try creating web applications or learn JavaFX and build a desktop application. I'm telling you this because you need to explore more, not just the language but other technologies that could be integrated with Java to build cool stuff. When you talk about large scale enterprise level applications, you will find Java and C# as backend languages in most of the cases. Btw JavaScript is weird. And unfortunately I'm learning it too.
25th Jan 2021, 7:40 PM
Avinesh
Avinesh - avatar
0
Подскажите, что не так в коде? import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); int number = read.nextInt(); int a = number%10; int b = number%9; int c = number%4; int d = number%6; if(a==0&&b==0){ System.out.println ("You won $200"); }else if(c==0||d==0){ System.out.println ("You won $50"); }else{ System.out.println("Try agan."); } //ваш код } }
27th Jan 2021, 9:38 AM
Эрик Бружас
Эрик Бружас - avatar
- 1
Java
27th Jan 2021, 1:37 PM
Эрик Бружас
Эрик Бружас - avatar