Off topic in the game, can i ask some ideas about codeombat? what are the algorithm/technique used to evaluating text editor whether right or wrong code that you’ve inputed, hope someone can help me…thank you in advance
This is a very interesting topic. Here’s an overall look:
You can input any code in the editor, the game engine will set up a game world simulation and run your code inside of it.
The enemies and allies have artificial intelligence, which can be customized and tuned on a per-level basis.
Each level has its own map, units, goals and conditions, which are made by level designers.
The game world simulation advances in “frames”, or “steps”. Each action your hero or any other unit makes—like moving, attacking, building—may take multiple frames (game world “steps”) to conclude. Frames are technically the game equivalent of the passage of time in the real world. A frame is like a snapshot of the world at an exact moment. On each frame, the game engine will execute a step of each alive unit’s actions, and thus the game world simulation plays.
On each frame, the game will check for victory and fail conditions for the level you are playing. Fail conditions usually include the hero dying (that is when
hero.health <= 0), running out of time, or letting certain units die. Victory conditions are quite diverse, and can be very specific things like collecting an exact amount of gold or saying certain phrases near defined units.
The victory and fail conditions are designed specifically for each level, and are written in real code which provides the flexibility of the full game engine. This can be difficult for non-programmers, but allows creating diverse scenarios with very tailored and specialized goals. The victory and fail conditions, together with other per-level game customizations such as custom AI and physics, are what we call referee code.
So, for a very superficial overview, the game engine actually runs your code inside a game world simulation and constantly checks for the victory and fail conditions set for the given level.
If this sounds complex, it is because it actually is.
Thank you for that spectacular hints Mr. UltCombo, will you pls specify about the game engine pls sir?
No problem. Sure, the whole game engine is free and open source, you can find its source code available in the CodeCombat repository. You should be able to find everything you need to know, both technical and non-technical topics, in the CodeCombat Wiki.
The Archmage Home and Artisan Home sections will be of interest to you If you are looking into developing or working with the game engine or designing new levels, respectively. The Third party software and services section is also a very interesting read to get a grasp of the architecture and tools CodeCombat is built on top of. Keep looking around the Wiki and you will surely find a lot of interesting stuff.
hi Mr. ultcombo, to be honest its really hard to understand whats inside the archmage and artisan, in my level, it is too tricky for me… by the way, now i almost able to create a simple programming game using unity, my stages and levels are already there but my only problem is the (code editor in the monster battle part) which i don’t really have an idea where to start or how to build it and in additional, my game is like a bookworm but you have to code in order to your character to attack the monster if he got the right answer in the specific programming problem. I badly need a help
What exactly are you requesting?
hi mr. luke10…A simple code editor with a compiler or anything that can evaluate the answer(code) inputed by specific the user i hope u can help me on this problem luke i really need a helping hand on this part
if you want something to give you the code we cannot do that
for what specific reasons
It makes it easier for you to just pass the level. Codecombat is learning to code
ummhhh what i mean Mr. Luke is just i’m creating now my own programming game in unity and my problem is that how to build a simple code editor and compiler at the same time. I have no issues or problems regarding playing in codecombat
PLEASE I HAVE ALREADY TOLD YOU MANY TIMES:
- Do not bring up dead topics
- Format your code according to the FAQ and by pressing the </>
- Please also list what happens as a result of the bad code
- Open a New Topic for a new separate discussion.
Going around dead topics and spamming your code does not help. It will be more proficient to create a new subject.