Diogo Abreu

Members
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

143 Neutral

About Diogo Abreu

  • Rank
    Member
  1. Unity Is Unity 2D worth it?

        Yes, that I do know, as I have learnt some stuff about Unity in the past, thank you. But what do you mean with "high-quality code" exactly?
  2. Unity Is Unity 2D worth it?

    Thank you all so much for your replies. So if I wish to build it on Unity, you're telling me that there is no problem to build it for mobile devices and it is reliable? I don't wanna make the mistake of realizing halfway through that I need to make it in Javascript or another language to make it efficient
  3. Unity Is Unity 2D worth it?

    Convert what? I've used Unity for a couple years now at work and nothing really rings a bell...   Maybe converting is not the expression I was looking for but I've heard that the user may need some Unity plugin to be able to play the game in their mobile device.
  4. Unity Is Unity 2D worth it?

      Well Javascript actually, there is no Java in Unity3D, and it depends of the 2D game you have. If you can roll with C++ maybe better to go with a simpler route.   Nono, what I meant was, I either use Java and its tools to develop or use Unity.
  5. Hey guys, I've decided to make some projects on mobile game development with a friend, we are both very experienced in programming overall, and I have some experience in game development with C++ and Unity. From what we have seen, we can either program it in Java or C# with Unity, the problem is I HATE Java.   So my question to you is, am i really doomed to swallow my hatred and work with Java or is Unity 2D really worth it? I've heard that you have to convert it to make it operational and that may lead to slower and heavier programs etc. Thank you very much in advance.
  6. hm no i stil haven't used vectors for anything, up until now i can succesfully write all the variables and array to the file, and trying to see how to read them back. (looking again to the vectors i understand what you're doing, although i wanna assign those values into my own variables, maybe your code can do that and i'm just too noob to realise)    this is my writing code: ofstream myfile("data\\checkpoint01.txt", ios::trunc); if(myfile.is_open()){ myfile << playerInfo[0] << endl; myfile << playerLocation << endl; myfile << roleNr << endl; myfile << role << endl; myfile << playerName << endl; myfile << gold << endl; myfile << playerHealth << endl; myfile << playerStrength << endl; myfile << playerAgilty << endl; myfile << playerEndurance << endl; myfile << playerMaxHealth << endl; myfile << playerItemCount << endl; for(int i=0; i<playerItemCount; ++i){ for(int j=0; j<3; ++j){ myfile << playerItems[i][j] << endl; } } for(int i=0; i<3; ++i){ for(int j=0; j<3; ++j){ if(playerEquippedItems[i][0]!=0){ myfile << playerEquippedItems[i][j] << endl; } } } myfile << questUpdate1 << endl; myfile.close(); } else cout << "Unable to open quest file.\n"; i hope this answers to all that you asked
  7. well i seem to understand that code, but how do i assign those values into my variables? and how do i do it if it's, for example, an array? because my method of writing to the file atm is 1 line per value, so if i have like playerItem[1][0] = 0 playerItem[1][1] = 2 playerItem[1][2] = 3   it writes like   o 2 3
  8.   well i'm using the "standard" way of I/O files, like this   string line; ifstream myfile("data\\checkpoint01.txt"); if(myfile.is_open()){ while(myfile.good()){ getline(myfile,line); cout << line << endl; } myfile.close(); but this clearly doesn't fit for me because it writes everything in the file, and i want it to grab the first line, assign it to a variable, second line same thing, grab the next 4 lines and assign it to an array and so on
  9. i still don't know how to read the data from the text file and give those values to the differente variables, can anyone give me a hint?
  10. i'll just change it then, it's not too late...
  11. thank you very much, this helps a lot, and when i'm using it in the game itself, i just declare them as i would do with a regular array right?
  12. it's just that, not defining the size spares me from the work of changing its size everytime I add a new enemy name for example but if i don't have any option i guess i'll change it..
  13. Hey guys, I'm doing a Text-based RPG game and it will include some checkpoints, on those checkpoints the game will save the progress, so I need to write all my variables to a text file and then read them all when the player loads the game. Some of my variables, like enemyNames, dont have any determined size, they're like this: "int enemyNames[ ];" So how do I write an array to a text file without determining a size? And how do I read them when the player loads the game? Thank you so much for your help.
  14. never heard of it, what is it?
  15. @AllEightUp the problem is that I want something drawed like in my example, not just with symbols like x's and o's, if I understood correctly what you were trying to say.   @ViX3LG0N that helped a bit, I would like to do it just with the SDL drawing library because I'm trying to learn SDL (and by trying I mean I nearly started) and learning even another "language" would be even more confusing for me. But that example you gave me left me a bit lost there ;D