-
March 24th, 2013, 07:47 PM
#1
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?
-
March 25th, 2013, 02:12 AM
#2
Re: You can create a program like this?
If I can? Probably yes.
How? Sweating a lot.
-
March 25th, 2013, 12:00 PM
#3
Re: You can create a program like this?
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...
-
March 25th, 2013, 12:15 PM
#4
Re: You can create a program like this?
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
-
March 25th, 2013, 12:43 PM
#5
Re: You can create a program like this?
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?
-
March 25th, 2013, 01:28 PM
#6
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.
-
March 25th, 2013, 01:29 PM
#7
Re: You can create a program like this?
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.
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
-
March 25th, 2013, 02:02 PM
#8
Re: You can create a program like this?
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
-
March 25th, 2013, 03:14 PM
#9
Re: You can create a program like this?
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) 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
-
March 25th, 2013, 03:29 PM
#10
Re: You can create a program like this?
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.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|