Blastcore development thread

Discussion in 'Development General' started by Blastcore, Dec 31, 2010.

  1. Donkey

    Donkey Banned

    Joined:
    Jun 30, 2011
    Messages:
    251
    Likes Received:
    0
    I wish this was in Java..i got a 97 in my first comp sci class. Hopefully down the road i'll happen to be taught c+ but im too lazy..
     
  2. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    If this was Java I wouldn't be here :}
     
  3. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    seconded.
     
  4. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
  5. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    +1 :o

    Java sucks, well. Not really, just not a good language (For me).

    =O

    Btw, my biology exam, i think... I Think... D=! A big 1 (One) =D
     
  6. Donkey

    Donkey Banned

    Joined:
    Jun 30, 2011
    Messages:
    251
    Likes Received:
    0
    JAVA IS BETTER. I actually think it is nicer to use though.. its just.. idk but it has a cleaner, nicer feel to it.
     
  7. Donkey

    Donkey Banned

    Joined:
    Jun 30, 2011
    Messages:
    251
    Likes Received:
    0
    Well the languages are pretty similar; i can understand a lot of what you've written. If you ever need help with a complex algorithm or recursion or something i could help you guys with logic. Also i have resources and contacts with some very esteemed comp sci professors lol..
     
  8. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    As long as you define 'better' as memory hungry with slow GUI, then sure :3 For desktops this sucks. Also I find a concept of OS-in-OS to be flawed, but that's just me.

    As for algorithms and logic coyotte might know better whether there is a need currently.
     
  9. Donkey

    Donkey Banned

    Joined:
    Jun 30, 2011
    Messages:
    251
    Likes Received:
    0
    Yeah i know java isnt great for desktop programs, i was just joking. Java excels in its virtual machine compiler/interpreter, so it works best in web based apps. I know it wouldnt work as well as c+ in implementing PO like you guys did, which is a great achievement btw :p
     
  10. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    There's a certain pokemon simulator implemented in java already..
     
  11. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Don't worry for algorithms, I'm there ^^

    And it takes more time you explaining the problem to someone and having someone explain you an algorithm and then you implementing it than just doing it already, but if you can code what you imagine then why not :)
     
  12. Donkey

    Donkey Banned

    Joined:
    Jun 30, 2011
    Messages:
    251
    Likes Received:
    0
    Lamperi..regardless Java is still better for web based applications although it can still work fine on desktops. Theres a reason why its the basis of teh interwebs. And coyote, makes sense. I'm good at recursion tho :p
     
  13. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    laitos, could you make it so when the server isn't minimized, it shows in the task bar and not only the tray bar?
     
  14. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    You mean, when it's maximized it doesn't show on Tray? And when it's minimized it shows on it? =O
     
  15. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    nevermind
     
  16. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Wait, why my changes doesn't appear in Source Code? Either in SourceForge and when i git clone o.O
     
  17. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Wrong branch, or you forgot to actually push them?
     
  18. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    branch Latios... They've been pushed? o.O

    Actually, i'm going to retry. ._.
     
    Last edited: Jul 25, 2011
  19. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Gah! Can't compile, just downloaded the source again. Without touching anything, tryed to compile Utilities and i get 3 errors:

    C2057: expected constant expression
    C2466: cannot allocate an array of constant size 0
    C2133: 'buffer' : unknown size
     
  20. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    give at least the lines...
     
  21. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Line 73 of Functions.cpp in Utilities.
     
  22. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    functions.cpp*

    Case sensitivity is not to be trifled with!

    Code (text):
    1. void cropImage(QImage &p)
    2. {
    3.     uchar * scanline = p.scanLine(0);
    4.  
    5.     uchar buffer[p.bytesPerLine()];
    6.     memcpy(buffer, scanline, p.bytesPerLine());
    7.  
    8.     int c = 0;
    9.     while (memcmp(p.scanLine(-c-1+p.height()), buffer, p.bytesPerLine()) == 0 && (-c-1+p.height() >= 0)) {
    10.         c++;
    11.     }
    12.  
    13.     for (int k = p.height() - 1; k - c >= 0; k--) {
    14.         memcpy(p.scanLine(k), p.scanLine(k-c), p.bytesPerLine());
    15.     }
    16.  
    17.     for (int k = 0; k < c; k++) {
    18.         memcpy(p.scanLine(k), buffer, p.bytesPerLine());
    19.     }
    20. }
    You probably have some compiler option to prevent you to use C99 syntax. Try finding how to enable variable size arrays on your compiler with your favorite tool, google :x
     
  23. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Wtf, it's strange. i we're compiling with Qt 4.8.0 beta for Desktop - MSVC 2010 (Qt SDK) Debug, which basically gave me the errors. When i cleaned the proyect, tryed to build again but with Qt 4.7.3 for Desktop MinGW 4.4 (Qt SDK) Debug and it compiled fine. o.O

    EDIT: Okay, nevermind. Seems that it wasn't that. :Looks for workaround:
     
    Last edited: Jul 28, 2011
  24. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
  25. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Eeeeeevil.

    EDIT: I look more pro with this avatar, no? Haha. :Goes to compile and sleep:
     
    Last edited: Jul 28, 2011
  26. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    Mikrofluffy? Wuzz dat? :}

    Edited to make it better :}
     
  27. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    It'z magik mah friendz. Hahahaha.

    (? Well i'm going to sleep, need to finish the update for some day lol.
     
  28. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    EDIT: Nevermind... ._.

    EDIT 2: No nevermind...

    moves.cpp:2387: error: 'struct BattleCounters' has no member named 'counter'
    moves.cpp:2132: error: 'struct BattleCounters' has no member named 'counter'

    Does this hates me, right? ._:
     
    Last edited: Jul 29, 2011
  29. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Fixed compiling error ~~
     
  30. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Open the space for another DLL. Since PSID works with an DLL.

    TOMORROW, MAYBE WE WILL HAVE SYS.PSID(SRC) WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO <3

    Also if we and you can coyo, i can make a DLL to make functions that Qt doesn't let us to do. Like get RAM, process CPU usage, etc.

    EDIT 1: PSID only will work on Windows, since i have no experience on Android, Linux or Mac.

    EDIT 2: The #ifndef for Windows was #ifndef Q_WINDOWS , right?!
     
    Last edited: Jul 30, 2011
  31. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    #ifndef WIN32

    but no, i won't add PSID, unless there's been a LOT of careful consideration going on.
     
  32. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    What you mean? =O (:has done it already: )

    Oh that, yea. Sorry i'm still sleepy, been working on it all night haha.

    Yeah, i'm still re looking all the whole code of the DLL and PO. Until i see it works fine and also get maybe something working on Linux don't think will release it.
    Web client and Android, no idea of how they work. :/

    EDIT: If you could tell me how to send it to the server from the client, since i've got a way which is in the notify() of loginIn (Analyzer of Teambuilder) or create an sendPSID() notify(PSID, psid)

    I meant:

    Analyze.cpp (Teambuilder)
    Code (cpp):
    1.  
    2. void Analyzer::sendPSID()
    3. {
    4.     notify(PSID, psid);
    5. }
    6.  
    Analyze.cpp (Server)
    Code (cpp):
    1.  
    2. // In void Analyzer::dealwithcommand...
    3.  
    4. case PSID:
    5.     {
    6.          if(socket().id() != 0) {
    7.              QString psid;
    8.              in >> psid;
    9.              emit psidReceived(psid);
    10.              break;
    11.          }
    12.     }
    13.  
    Analyze.h (Server)

    Code (cpp):
    1.  
    2. signals:
    3.     void psidReceived(QString &psid);
    4.  
    player.h (Server)
    Code (cpp):
    1.  
    2. public:
    3.     QString psid;
    4.  
    5. public slots:
    6.     void psidReceived(QString *psid);
    7.  
    player.cpp (Server)
    Code (cpp):
    1.  
    2. // In player::Player
    3.  
    4.     connect(&relay(), SIGNAL(psidReceived(QString), SLOT(psidReceived(QString)));
    5.  
    6. // Then create this:
    7.  
    8. void psidReceived(QString *psid) {
    9.     mypsid = psid;
    10. }
    11.  
     
    Last edited: Jul 30, 2011
  33. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Anyone offers to do the Linux library? I s*c* for Linux, i don't know how to do a Linux Library either load it in Qt. ._. /sys/class/dmi/id is maybe where everything we need is.
     
  34. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    I don't even have /sys/class/dmi on my linux server.
     
  35. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    Debian... Strange, though. I've looked on Ubuntu and /sys/class/dmi it's there o.O (Yes i know, Debian is another distribution of Linux like Ubuntu (Or thats what i heard) However, i'll look later. I'll try to do it for Linux, need to find a way. Until now, if i release it (maybe) i'll use #ifndef WIN32 ._.

    EDIT: #ifndef for Linux? =O
     
  36. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Look, on linux it could base itself on the mac address plus a generated config key, or whatever.

    The thing is , you have to have a solution for each platform before even thinking of adding it.
     
  37. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    I don't know how to Develop for Android, either i know a little of web site programming. Linux i'll may get it, Windows it's done. Web and Android aren't out yet.

    What i heard is that Android also haves an Unique ID which is obtainable
    http://stackoverflow.com/questions/3115918/android-unique-id
    http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id

    Going to talk with Android developers about that right now.

    Still the issue is Web Client. :/


    Also, trying to run Ubuntu again, I GOT BSOD. Fuu Virtual box. lol.
     
  38. Super SkarmPiss

    Super SkarmPiss Member

    Joined:
    Jul 27, 2011
    Messages:
    36
    Likes Received:
    0
    LOL

    Anyway, how is the syntax highlighter coming? I could probably do that fairly easily if you're having trouble. Using simple replaces won't be sufficient, of course.
     
  39. Blastcore

    Blastcore Developer

    Joined:
    Jul 19, 2010
    Messages:
    763
    Likes Received:
    1
    I'm busy with exams, lol. (Yes, again...) Basically i know simple replaces won't work. But yes, i'm trying to continue working on it while i'm studying. Gets hard but may have it. (Currently not going to release it with Autocompleter... Just later) o.O

    Sorry if you didn't understand me, i wrote this very fast (:confused: Studying maths D:)
     
  40. Super SkarmPiss

    Super SkarmPiss Member

    Joined:
    Jul 27, 2011
    Messages:
    36
    Likes Received:
    0
    Studying is fun. I've been reading huge books all summer. ._. Although, mostly about history, biology, Java, C++, blah blah blah. Which isn't really studying but idc KK.

    So, how are you doing it? Regular expressions?