Game in C++
Ok I am clueless where to put this since it doesn't seem to exist any forum where we can discuss game development so I decided to go with C++/C since I do code it in c++ lol, and also there are probably people here that knows assembly (which is not needed really to give me advices but it's a advantage, asm forum seems to be more dead also).
To the thing, sorry for the confusing beginning
I am making a game somewhat similar to Core Wars, link here if you don't know about it: Core War - Wikipedia, the free encyclopedia
My game is loosely based on Core Wars because I never really got into it, however I found it very interesting to try & develop my own version.
However the main idea is the same, release two warriors coded in a assembly like language into a "memory arena" and let them take turns executing their instructions until one of the warriors die by executing a faulty instruction.
Atm, I finished the basics of how I want it (game is still buggy but works). I emulate the memory by using a char array[1000] and I parse the warriors from text files and then drop them into a random position in the memory, with a specified minimum space between them. I also keep addresses to access for each instruction in a separate array.I have come up with 4 operations to use in the warriors so far, they are simplified asm operations:
*MOV 50 for example - moves the whole warrior 50 addresses ahead, it takes as many turns to perform as the number of instructions the warrior program got. Then it continue to execute from the new address.
*JMP 50 - jump 50 addresses ahead continue to execute any instruction found on that address.
*DAT 50 - Drops a faulty instruction, if the enemy tries to execute it, it will die =)
*NOP - Self explanatory, do nothing.
I understand it may seem a bit confusing if you never even got in touch with the concept by playing core wars so I will show it looks in my game right now (I print out the memory array on the screen for each turn, the DM/DDDJ is the warriors and - is empty memory addresses)
--------------------------------------DM---------------------------------
--------------------------------------------------------------------------
--------------------------------------------------------------------------
---------------------------DDDJ------------------------------------------
This is in the beginning of the game, you can see the both warriors represented in the memory by their signatures, the first has DM which means it has a DAT and then a MOV instruction, the other one has 3 DAT's and one JMP. So for example the second warrior would put a faulty instruction on 3 addresses and then jump back to the beginning of itself.
Maybe I should also mention that the memory wraps around itself, since you got 1000 addresses in total, if a instruction executed on address 900 to mov the warrior 400 addresses ahead it would end up on address 300.
Well I have no idea if someone even bothered to read this far but here comes the thing I would like some help/ideas on, atm I almost always get ties between the warriors. There are too few operations/options to choose between when coding the warriors, atm they just tend to move/jmp around in memory and DAT'ing the same addresses all the time, always missing each other. If anyone have same cool operations/options to come up with I would be really happy, they don't neccessary need to be connected to asm in any way. Just ask if it was something you didn't catch about how my game works and I'll explain it to you.
I'm thinking about adding a split process operation which the original Core Wars also have, that spawns a new process for the warrior and then it takes turn executing the warriors processes. Should make it a little more interesting. I think this whole game development thing is hard, on one hand I don't want to "control" the game too much and deciding exactly what approach would be best to win it because it's funnier for players to find their own strategys, on the other hand I don't want a boring game or a game where you can come up with one solution that always beats all the others.
Ty if you had the patience to read, and even more ty's if you give me some input/feedback
To the thing, sorry for the confusing beginning

I am making a game somewhat similar to Core Wars, link here if you don't know about it: Core War - Wikipedia, the free encyclopedia
My game is loosely based on Core Wars because I never really got into it, however I found it very interesting to try & develop my own version.
However the main idea is the same, release two warriors coded in a assembly like language into a "memory arena" and let them take turns executing their instructions until one of the warriors die by executing a faulty instruction.
Atm, I finished the basics of how I want it (game is still buggy but works). I emulate the memory by using a char array[1000] and I parse the warriors from text files and then drop them into a random position in the memory, with a specified minimum space between them. I also keep addresses to access for each instruction in a separate array.I have come up with 4 operations to use in the warriors so far, they are simplified asm operations:
*MOV 50 for example - moves the whole warrior 50 addresses ahead, it takes as many turns to perform as the number of instructions the warrior program got. Then it continue to execute from the new address.
*JMP 50 - jump 50 addresses ahead continue to execute any instruction found on that address.
*DAT 50 - Drops a faulty instruction, if the enemy tries to execute it, it will die =)
*NOP - Self explanatory, do nothing.
I understand it may seem a bit confusing if you never even got in touch with the concept by playing core wars so I will show it looks in my game right now (I print out the memory array on the screen for each turn, the DM/DDDJ is the warriors and - is empty memory addresses)
--------------------------------------DM---------------------------------
--------------------------------------------------------------------------
--------------------------------------------------------------------------
---------------------------DDDJ------------------------------------------
This is in the beginning of the game, you can see the both warriors represented in the memory by their signatures, the first has DM which means it has a DAT and then a MOV instruction, the other one has 3 DAT's and one JMP. So for example the second warrior would put a faulty instruction on 3 addresses and then jump back to the beginning of itself.
Maybe I should also mention that the memory wraps around itself, since you got 1000 addresses in total, if a instruction executed on address 900 to mov the warrior 400 addresses ahead it would end up on address 300.
Well I have no idea if someone even bothered to read this far but here comes the thing I would like some help/ideas on, atm I almost always get ties between the warriors. There are too few operations/options to choose between when coding the warriors, atm they just tend to move/jmp around in memory and DAT'ing the same addresses all the time, always missing each other. If anyone have same cool operations/options to come up with I would be really happy, they don't neccessary need to be connected to asm in any way. Just ask if it was something you didn't catch about how my game works and I'll explain it to you.
I'm thinking about adding a split process operation which the original Core Wars also have, that spawns a new process for the warrior and then it takes turn executing the warriors processes. Should make it a little more interesting. I think this whole game development thing is hard, on one hand I don't want to "control" the game too much and deciding exactly what approach would be best to win it because it's funnier for players to find their own strategys, on the other hand I don't want a boring game or a game where you can come up with one solution that always beats all the others.
Ty if you had the patience to read, and even more ty's if you give me some input/feedback



. Yep I will for sure release it when I finished a Beta with some more operations and I also need to wrap everything up because I yet have to add things like keep count on who has won most of the rounds, atm the whole game is scattered with debug info for me.