You can create a program like this?
Hello Guys,
Someone can tell me if it is possible to create a program like Robocode, a game controlled at runtime by an external source file in visual c ++? For example create a checkers game where there would be an external source file, read at runtime, which would play automatically, with artificial intelligence. You can? If yes, how?
Re: You can create a program like this?
If I can? Probably yes.
How? Sweating a lot.
Re: You can create a program like this?
Quote:
Originally Posted by
ovidiucucu
If I can? Probably yes.
How? Sweating a lot.
Oh, sorry for my bad english, i wanted to say: "it is possible create a program like this?" how to interpret the code at runtime with c++? I have no idea how to do...
Re: You can create a program like this?
Quote:
Originally Posted by
ordan1
Oh, sorry for my bad english, i wanted to say: "it is possible create a program like this?" how to interpret the code at runtime with c++? I have no idea how to do...
So do you think that someone is going to post thousands, if not millions of lines of code? What answer are you expecting us to give you?
The best answer came from ovidiu -- hard work, study, and a lot of sweating. What you ask for is very advanced, and must be broken down into individual modules. Even an advanced programmer would have sleepness nights trying to come up with all of these details you described.
Regards,
Paul McKenzie
Re: You can create a program like this?
Quote:
Originally Posted by
Paul McKenzie
So do you think that someone is going to post thousands, if not millions of lines of code? What answer are you expecting us to give you?
The best answer came from ovidiu -- hard work, study, and a lot of sweating. What you ask for is very advanced, and must be broken down into individual modules. Even an advanced programmer would have sleepness nights trying to come up with all of these details you described.
Regards,
Paul McKenzie
Millions of lines of code to read and execute source code? I do not know if you understood my idea or seen the Robocode, but would for example something like this: There would be a square on the screen and the user would send a source code with predefined functions to move the square, for example "move up "," move down ", etc.. I'm not asking you to do this for me. I do not have much experience with object-oriented language, I am still studying, just wanted to know the possibility and viability of doing something. I think it would be easier with Java, being an interpreted language, but wanted to do in C + +, however I can not find stuff on the internet about it. Java would be more viable?
Re: You can create a program like this?
That's not "source code", that's just a file that contains instructions. That could be fairly simple. Read the file, match the instruction to an action and execute the action. Your question is still pretty vague to give a detailed answer.
Re: You can create a program like this?
Quote:
Originally Posted by
ordan1
There would be a square on the screen and the user would send a source code with predefined functions to move the square, for example "move up "," move down ", etc.. I'm not asking you to do this for me. I do not have much experience with object-oriented language, I am still studying, just wanted to know the possibility and viability of doing something.
Of course someone or some team of programmers can write such a program.
Quote:
I think it would be easier with Java, being an interpreted language, but wanted to do in C + +, however I can not find stuff on the internet about it.
And what is the "stuff" you're looking for? Wouldn't it be source code or libraries?
Regards,
Paul McKenzie
Re: You can create a program like this?
Quote:
Originally Posted by
GCDEF
That's not "source code", that's just a file that contains instructions. That could be fairly simple. Read the file, match the instruction to an action and execute the action. Your question is still pretty vague to give a detailed answer.
Have you seen Robocode?
I wanted to do something like this: http://ideone.com/QL9nU5
The user would play with your code, without interfering in the source code or visual game
Robocode is like that but it is in java
Re: You can create a program like this?
Quote:
Originally Posted by
ordan1
Robocode is like that but it is in java
Your original question was answered.
1) Yes, practically any software can be created with C++.
2)
Quote:
You can? If yes, how?
This is where you're vague. Just asking us "how" is an open-ended question. It's like asking someone "can you build a skyscraper", and then asking "how?".
Regards,
Paul McKenzie
Re: You can create a program like this?
Quote:
You can? If yes, how?
By first producing a program design and then crafting the correct c++ code from the design. The hard part is nearly always producing the design because that is where most of the thinking has to be done. What input/output is needed, what classes are needed, how they interface with each other etc etc etc. None of this is directly related to c++. The design if done properly could then be coded in any suitable language.