Answer the question
In order to leave comments, you need to log in
C++ or Java for games and various applications?
Hello. I understand that there are many such questions. and you are probably tired of answering them. but for a couple of weeks now I've been torturing google, Yandex, and even bin... I can't find specifics and solutions, please help....
The bottom line. make Games (game dev) and periodically applications for various mobile devices (phones, tablets).
the fact is that games are planned both for PC (serious projects * yes, I know a big team, a lot of money, etc. * that is, obviously not mobile) but also mobile games that I would like to work on both Android and PC (of course these are not big games in terms of indie developments for example, *you have to start somewhere :)* ).
as the plans and something serious and not so. I understand that Java is not very suitable, (and to be honest, I don’t like java for me, it’s not logical for me, it’s terrible points ... it really infuriates me ...).
and then there would be no C ++, and android would not be typical, since I understood the central core of the C ++ system, and in games (on mobile devices) they often use, so to speak, "patches" from C ++ codes for optimization, etc. .d ..
as I understand it: it’s clear that Tetris can be written both there and there. but in C++ it will be faster, but in Java it is easier. I understand it.
Yes, I know about QT, but there is a lot of paid content there .... because of which you can forget about some kind of 3D without having the amount in your pocket (I don’t have it),
but I would like this. tell me how?
well, I wrote some code, roughly speaking, in notpad ++, or in any C ++ environment. The same Tetris for example.
Connected OpenGL made the game started running. Naturally, it turns out there is nothing special for me there, unlike if you do it through QT or the tighter Android studio that cram files, and there are a bunch of unnecessary garbage in the files.
that is, I would like to cleanly (without any unnecessary things that IDEs like usually use) write the same "hello world" so that it works on android and at least windows.
or all this is difficult and dreary and it’s easier for me to overcome myself (and this is terribly difficult for me). and learn java well, or tinker with QT. in general, for self-development, I want it more to understand how everything works and is arranged (well, very much as you want).
Learning 2 languages, yes, I understand everything is NECESSARY (even arguing is pointless * the programmer must be able to do everything :) * )
but I want to do C ++ right there and there. without extra IDEs, can you tell me how to treat my illness? )
I ask those who believe that: One must be able to, and the language is just a tool, I will answer.
Briefly: there are different tools !!!!!, a hammer and anvil (it suffers for a long time), and for example a CNC machine (pressed the button, everything is ready),
Expanded: I already see how, according to your reasoning, a game of the level of crisis or Starcraft 2, tera, duum, what else is modern there .. etc. written in Java is not funny to you? , sits about 50 progers and makes Java 3D a full-fledged shooter that is also on OpenGL (since Java is mainly based on it) oh, it will be fun for them ... and what kind of PC is needed to run all this, the pentagon is resting ...
I'm not an idiot and I understand that serious games are not made for 1 year and far from 1 person, but this does not change the essence of the issue!
Please read my question intelligently and answer to the point.
Answer the question
In order to leave comments, you need to log in
Try to
use cross-platform C++ libraries ,
for example Cocos2d
- x touch screen, as well as the Sensor class for working with a gyroscope, etc.
An example of building an application for Android: here
IMHO. Principles must be taught. And write on anything. Language is a tool for displaying abstractions on the canvas, in essence.
and then there would be no C ++, there would be no android as I understood the central core of the C ++ system
C++ is harder to write than Java. You can code natively in any language and it will be very slow and gluttonous, in terms of resource consumption, in principle, you will not lose much if you compare java vs c ++, unless of course you create billions of lines of text in a recursive loop.
In any case, as mentioned above, the language is a matter of taste and the silver bullet does not exist at all. Games can be written on ready-made engines. Let's say if the choice falls on the unit, then C # and JS rule the ball. If you choose Unreal then C++ or scripted blueprint. If you choose to write the engine yourself, especially for mobile phones, then there will be a hell of a mixture of Java and C ++. If you take a certain "semi-engine" or a framework, then there you will be tied to a specific language or scripting language. In addition, each platform has its own languages and in addition there can be many of them. On Android, this is java and much less often c++ (mostly crap because of the incredible number of crutches) or html5 admixtures. On IOS, this is objective-c and swift, and also sometimes with html5 crutches. On Windows C++\C\C# and rarely anything else, on macs objective-c mostly, on Linux C++\C\Mono\Java\Python\Perl\Lua\NodeJS\Go and a lot of other stuff. If they write a multiplayer game, then the servers are very often written in python\go\java\node.
In general, if you want to aim for the maximum possible with minimal costs, then start learning Java or C # (these languages are very similar and it will be easy to learn another one) and then take a framework or a ready-made engine and create. It doesn't make sense for you to think that that language is slow\gluttonous\etc. absolutely all languages are approximately the same in speed if they are "well prepared" and the main difference is only in the following:
1) The complexity of the syntax of the language.
2) The speed of learning the language.
3) The complexity of learning the language and its principles.
4) Speed to write programs.
A generalized example: Java or C# are very simple languages and you can write quite serious programs in a couple of weeks, but they will be slow for one simple reason, in order to understand that this is slow and you need to write differently, it will take a lot of time and experience because . many points are artfully abstracted in the bowels of the VM. The situation with C \ C ++ is different, languages are 10 times more difficult, especially for a beginner, to write any kind of complex software, you will have to intensively study the language for half a year or more, but due to the need to read and understand and more study time, your code will initially be faster, simply because that there will already be at least a small but understanding of why it is so slow and so faster and why more resources are being eaten and so less. The same applies to the portability of the language to other platforms, java strongly abstracts api from hardware and OS and the programmer just writes 1 code and it just works wherever there is java. In C ++, a huge number of rakes when transferring software from win to Linux and vice versa, almost all code that somehow works with OS or hardware will have to be rewritten again. Well, about the speed of writing software, java \ c # is much ahead, someone else's code is hundreds of times easier to understand than someone else's code in c \ c ++, the programmer thinks about the algorithm, excluding thoughts about the intricacies of working with memory, etc.
The choice is entirely yours =D.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question