Advertising (This ad goes away for registered users. You can Login or Register)

C c++ c# java i need info

Programming on your favorite platform, for your favorite platform? Post here
hgoel0974
Retired Mod
Posts: 2155
Joined: Mon Jul 23, 2012 11:42 pm
Location: New York

Re: C c++ c# java i need info

Post by hgoel0974 »

m0skit0 wrote:I don't understand... What code? I mean in what way is Java limited. What does this have to do with your code?
hgoel0974 wrote: I don't believe that Java has the ability to use any microsoft service built-in (ie. SAPI, TTS)
First, I don't care about M$ buit-in services since they're not standard and only work in Windows, so pretty much useless outside Windows. Java has its own speech and TTS API, which is a standard library and works the same for all platforms, which is way more useful. It's probable that for Windows this API simply wraps up Microsoft's built-in implementation. Anyhow, much more cross-platform, which is definitely what Java shines over .Net which is almost not used outside Windows, even if its goal was to be Microsoft's Java.
My main concern was speed. THAT is the code I plan to send you, I have some code that takes more time in Java than in C#
Advertising
"If the truth is a cruel mistress, then a lie must be a nice girl"
Xian Nox
Retired Mod
Posts: 2744
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: C c++ c# java i need info

Post by Xian Nox »

Can you please post the code here instead, I'm rather curious to see it.
Speaking of Windows-only APIs, if you want to use exactly the ones you listed with Java, you can still do that.
Advertising
hgoel0974
Retired Mod
Posts: 2155
Joined: Mon Jul 23, 2012 11:42 pm
Location: New York

Re: C c++ c# java i need info

Post by hgoel0974 »

Xian Nox wrote:Can you please post the code here instead, I'm rather curious to see it.
I will, it is a weekend right now, and my code is on a computer in school.It is a drawing application (yeah, High School programming sucks, just compare a VM to a simple drawing app) but I tried to implement animations (and I am very sure I did it inefficiently :P - using only awt and swing ) and when I had done an animation program of the same sorts in C# (2 years ago), it was faster (atleast that is what I remember)
"If the truth is a cruel mistress, then a lie must be a nice girl"
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: C c++ c# java i need info

Post by m0skit0 »

Looks legit :lol: Probably .Net will be faster than Java on a Microsoft OS, since this OS is optimized for .Net (which is Microsoft's). Anyway, the speed probably depends on what problem and OS you're targeting.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
hgoel0974
Retired Mod
Posts: 2155
Joined: Mon Jul 23, 2012 11:42 pm
Location: New York

Re: C c++ c# java i need info

Post by hgoel0974 »

m0skit0 wrote:Looks legit :lol: Probably .Net will be faster than Java on a Microsoft OS, since this OS is optimized for .Net (which is Microsoft's). Anyway, the speed probably depends on what problem and OS you're targeting.
Yup, plus in a discussion with Xian, I found out that the only reason Java was slow on me was because I was using awt and swing for animations with about 20 images and shapes at once, and awt is quite slow for animations I hear. I don't know if Java has specialized 'controls' like C#, in C#, you can either use paint() and draw on the form or use a picturebox (which I notice is much faster for animations than directly painting the form - source: My custom made Game Engine)
"If the truth is a cruel mistress, then a lie must be a nice girl"
Xian Nox
Retired Mod
Posts: 2744
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: C c++ c# java i need info

Post by Xian Nox »

Basically, my understanding of Java graphics is like this: swing/awt are to be used for GUIs or graphics that don't need to be refreshed too often. OpenGL bindings like lwjgl can be used in other cases.
StaticCodex
Posts: 34
Joined: Tue Aug 13, 2013 7:54 pm

Re: C c++ c# java i need info

Post by StaticCodex »

Any programming language is viable especially for a simple 2d rpg simulation.

Personally I found that the Objective C proved to be a better route since the code structure wasnt too complex. Its a little jump if you already learned C++ or maybe even C but you will definitely save a lot of time. I suggest you use something like XNA or xCode. If youre using xCode for MAC based system, then you should use the Cocos2d external library. Theres a big userbase and lots of tutorials and samples.

Cocos2d sadly is only for mac but there is also Cocos2d-x which is compatible for both mac and windows but is targeted towards mobile platforms.

Another good one already mentioned is XNA but you should check out MonoDevelop and V-play as these three target both the desktop/mobile platforms which give you cross-platform features such as one click project compiling.

MonoDevelop - http://monodevelop.com/
V-Play - http://v-play.net/

NOTE: Stay away from java if you are trying to code a game. Its best to use C oriented programing as it already has java implemented within it so use it to your advantage. I believe you can also use java / javascripts when coding in C as well but im not too sure as I never really was fond with java.

EDIT2: If you are taking the xCode / cocos2d route then I can give you an open source of the game i programmed last summer as reference
Instagram
2.02 TN-V / 1.67 ARK PS Vita | XBMC 150GB XBOX1 | FreeMCBoot PS2 | 6.60 PSPGO 32GB | R4 16gb NDSL
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: C c++ c# java i need info

Post by m0skit0 »

StaticCodex wrote:Objective C
I wouldn't never ever recommend learning Objective-C unless you want to develop only under OS X for Apple products only.
StaticCodex wrote:Stay away from java if you are trying to code a game
Nonsense. For example Android games are made in Java mostly. Even those in OpenGL. But I guess no need to comment about this since you commented yourself:
StaticCodex wrote: im not too sure as I never really was fond with java.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
Acid_Snake
Retired Mod
Posts: 3100
Joined: Tue May 01, 2012 11:32 am
Location: Behind you!

Re: C c++ c# java i need info

Post by Acid_Snake »

m0skit0 wrote:Nonsense. For example Android games are made in Java mostly. Even those in OpenGL. But I guess no need to comment about this since you commented yourself:
no nonsense at all, he does have a point. And please don't use Android games as an example, cause they are mostly indie games without much graphics. But please do tell me how minecraft (written in Java) requires 3Ghz CPU, latest HD GPU and many tweaks, to run at decent speed, while lamecraft (written in C) only requires the PSP's weak 333Mhz CPU. Just tell me how that is nonsense, he has a more than valid point: making games in Java, or any other interpreted language, is not a good idea, C++ is easy as heck to handle and you get a lot more speed with it.
Xian Nox
Retired Mod
Posts: 2744
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: C c++ c# java i need info

Post by Xian Nox »

Acid_Snake wrote:no nonsense at all, he does have a point. And please don't use Android games as an example, cause they are mostly indie games without much graphics.
So, no great graphics no game? :lol:
Acid_Snake wrote:But please do tell me how minecraft (written in Java) requires 3Ghz CPU, latest HD GPU and many tweaks, to run at decent speed, while lamecraft (written in C) only requires the PSP's weak 333Mhz CPU.
Uh huh. Then let me just say one thing: neither Java, nor any other interpreted language saves you from writing bad or unoptimized code. Minecraft will run on a potato if you get the tweaks.
If we're talking about game graphics, let me point out some J2ME games had extremely good graphics, for example, Galaxy on fire. And also, they ran absolutely fine on like, 10 year old dumbphones.
Also, Starsector, a game written in Java, runs way better than StarDrive, a game written in C++ which had terrible optimization issues at launch.
Acid_Snake wrote:Just tell me how that is nonsense, he has a more than valid point: making games in Java, or any other interpreted language, is not a good idea, C++ is easy as heck to handle and you get a lot more speed with it.
Yeah, so that's why people write games in Java, Python and Lua. Because especially for indie devs some of which are not even programmers, using an interpreted language is by no means easier as heck to handle and debug than C++.
Locked

Return to “Programming”