1. Post #3201
    DeadKiller987's Avatar
    September 2010
    1,070 Posts
    I got Terraria to compile!



    I hate this codebase. I know that decompilation changes stuff a little bit but Main.cs is 9803 lines long and I doubt a decompiler would lengthen it that much. Main.cs contains a method called GetInputText, which (as the name implies) handles texboxes, and it's 252 lines long and full of hacks.
    It's awesome how people are just casually compiling a game that's released on Steam and the developer is still becoming richer by the second. This is going to be one of those games whose modding communities are going to make it more popular. If only big-shot companies such as Activision would do this...
    Reply With Quote Edit / Delete Windows 7 Lithuania Show Events Disagree Disagree x 1 (list)

  2. Post #3202
    Gold Member

    October 2008
    3,838 Posts
    It's awesome how people are just casually compiling a game that's released on Steam and the developer is still becoming richer by the second. This is going to be one of those games whose modding communities are going to make it more popular. If only big-shot companies such as Activision would do this...
    It's so easily modded because it's made in an easily decompilable language: C#.
    CoD is made in C++, IIRC, and decompiling that back to C++, changing code and then recompiling it again is a hell of a lot harder to do with C++ than with C#.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 5 (list)

  3. Post #3203
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    Save the text as a batch file

    Edit line
    xcopy MyFolder "backup\%str%\MyFolder" /-Y /H /E /G /K /O /I

    For example if i would like to backup 2 folders


    C:\Test 1234\Folder1
    C:\Folder2

    I would change the batch file to

    Code:
    echo off
    
    echo Backing up Files
    echo ""
    
    set slash = "/"
    set stuff = ":"
    set str=%time:~-0,8% %date%
    set str=%str:/=-%
    set str=%str::=.%
    mkdir "backup\%str%"
    
    xcopy "C:\Test 1234\Folder1" "backup\%str%\Folder1" /-Y /H /E /G /K /O /I
    xcopy "C:\Folder2" "backup\%str%\Folder2" /-Y /H /E /G /K /O /I
    
    echo ""
    echo Done Backing up files
    Then to create the Scheduled event Asuming you are running Windows 7 (might work for vista to)

    - press CNTRL+R Type "compmgmt.msc" press enter
    - Right click on system tools -> Task Scheduler -> Create Task

    - Under the Actions tab add the Bat file.
    - Under Triggers add a new Trigger
    -- Choose "One Time"
    -- Choose Repeat Task Every 1 hour for a duration of unlimited.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Friendly Friendly x 1 (list)

  4. Post #3204
    I love Lemon Punch
    Sakarias88's Avatar
    January 2006
    1,268 Posts
    The project deadline is getting near.
    Just a few days left now.
    Have planned to finish it this weekend so we've started wrapping stuff up.

    We've fixed dialogues, a map editor and a dialogue editor today.
    The camera automatically focuses on the one talking actor.
    I know the dialogue box is a bit stretched, will fix that tomorrow.

    Still don't have any name of the game. Any suggestions?
    It's basically a shmup air plane game inside an arena.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Funny Funny x 13 (list)

  5. Post #3205

    May 2011
    1 Posts
    Who here uses/used C++ Primer Plus 5th Edition to learn C++?
    I bought it together with Accelerated c++, Only read the intro in both of them.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events

  6. Post #3206
    SupahVee's Avatar
    December 2007
    1,114 Posts
    I got Terraria to compile!



    I hate this codebase. I know that decompilation changes stuff a little bit but Main.cs is 9803 lines long and I doubt a decompiler would lengthen it that much. Main.cs contains a method called GetInputText, which (as the name implies) handles texboxes, and it's 252 lines long and full of hacks.
    Wow yeah, the source code is messy as hell. Seriously, what the fuck were they thinking?
    Reply With Quote Edit / Delete Windows 7 Italy Show Events Dumb Dumb x 8Agree Agree x 1 (list)

  7. Post #3207
    Gold Member
    Jallen's Avatar
    December 2007
    7,584 Posts
    Probably something like "It doesn't matter as long as it works well, people find it fun and it's successful"
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 23Optimistic Optimistic x 1 (list)

  8. Post #3208
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    You are decompiling something, Are you expecting it to be clean ?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 17Dumb Dumb x 3Late Late x 2 (list)

  9. Post #3209
    voodooattack's Avatar
    October 2009
    1,994 Posts
    Who here uses/used C++ Primer Plus 5th Edition to learn C++?
    I tried reading a C++ book once, but I found myself ignoring the paragraphs and going for the code samples right off.

    So I learned C/C++ by trial and error.. the syntax gradually stuck on me.

    That's probably why I tend to use google every time I decide to use something from the STL that I don't use often, but that kinda grows on you as well.

    Wow, I really want to start on some kind of project but I have no clue what to do/try. Any ideas?
    How about a Minecraft clone?
    Reply With Quote Edit / Delete Windows 7 Egypt Show Events Agree Agree x 1 (list)

  10. Post #3210
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    People put too much emphasis on the language, rather than general programming theory or problem solving skills.
    I really think that most good programmers can pick up new syntax in a week or less.
    I think experience is just as important when it comes to language, especially higher level ones. Being experienced in a language and knowing all it's quirks and such is very important in being productive and writing less buggy code. (Was going to put bug free, but I've never met anyone who can bang out some code and have it no bugs first time.)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 1 (list)

  11. Post #3211
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    A* is the fastest, yes.
    If you want to know more you might want to try different heuristic functions (Chebyshev, Manhattan or Euclidian distance).
    The heuristic function and overestimation you choose will have a major impact on how fast and accurate the algorithm is.
    Right now it's basically the pythagorean distance. I should try some others...
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Friendly Friendly x 1 (list)

  12. Post #3212
    Gold Member
    r4nk_'s Avatar
    April 2005
    2,023 Posts
    I got Terraria to compile!



    I hate this codebase. I know that decompilation changes stuff a little bit but Main.cs is 9803 lines long and I doubt a decompiler would lengthen it that much. Main.cs contains a method called GetInputText, which (as the name implies) handles texboxes, and it's 252 lines long and full of hacks.
    Riiiiighhttt so you think its more likely that the developers wrote a 10,000 line main file than that it is caused by decompiling.....
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 8Dumb Dumb x 2Optimistic Optimistic x 1 (list)

  13. Post #3213
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts
    What's the deal with long main files anyway? What's so bad about it? I honestly have no clue so someone educate me.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 2Optimistic Optimistic x 1 (list)

  14. Post #3214
    Richy19's Avatar
    May 2010
    5,413 Posts
    How about a Minecraft clone?
    Pff minecraft?
    terraria is where its all at now
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 3Agree Agree x 2Optimistic Optimistic x 1 (list)

  15. Post #3215
    Remember how I posted about my first C++ game? (Probably not, so; http://www.facepunch.com/threads/108...1#post29670848)

    It was for my next school and it was good enough. I got an invite for an interview.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Informative Informative x 1 (list)

  16. Post #3216
    LeninStalin's Avatar
    May 2011
    135 Posts
    Alright, as you know I am just starting C++, well I wanted to make a simple counter that adds 1 when A(dd) is pressed, but it doesn't work, can someone tell me what I did wrong?

    #include "stdafx.h"
    
    
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
    	int x = 1;
    	cout << x;
    	int Akey = 5;
    	if (5)
    		x++;
    
    	cin.get();
    	return 0;
    }
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Funny Funny x 16Artistic Artistic x 1 (list)

  17. Post #3217
    SupahVee's Avatar
    December 2007
    1,114 Posts

    Buggy, slow, unoptimized, lags with more than 40 roaches.
    Reply With Quote Edit / Delete Windows 7 Italy Show Events Winner Winner x 5Programming King Programming King x 4 (list)

  18. Post #3218
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,627 Posts
    // break: fileName is "test.obj", good
    private static void parse(string fileName, OnVertex onVertex, OnNormal onNormal, OnTexCoord onTexCoord, OnFace onFace, OnMaterial onMaterial)
    {
    	// break: actualFileName is "data/models/test.obj", good
    	string actualFileName = Util.DATA_DIR + "models/" + fileName;
    	// break: actualFileName is still good, everything looks good
    	StreamReader reader = new StreamReader(new FileStream(actualFileName, FileMode.Open, FileAccess.Read));
    
    
    [later]
    parse("test.obj", ...); // all good
    
    OpenFileDialog fileDialog = ...;
    fileDialog.ShowDialog(); // (browsing for the file)
    // break: fileDialog.SafeFileName is "test.obj", good
    parse(fileDialog.SafeFileName, ...); // EXCEPTION! "Could not access part of path"
    

    Guess The Bug
    Reply With Quote Edit / Delete Windows XP United States Show Events Dumb Dumb x 1 (list)

  19. Post #3219
    Samuka97's Avatar
    April 2007
    1,982 Posts
    Finally got C::B looking the way I want, with a copy that auto-installs on my pendrive and managed to compile & run SFML 2.0. And then, when I thought I was already happy enough:

    YEEEEEEEEEEAHH
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events Winner Winner x 10 (list)

  20. Post #3220
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,503 Posts
    What's the deal with long main files anyway? What's so bad about it? I honestly have no clue so someone educate me.
    The longer the file is, the harder it is to read. The harder it is to read the more difficult it is to maintain. IMO anyway.

    No difference at all to the end-user, obviously.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2 (list)

  21. Post #3221
    Gold Member

    October 2008
    3,838 Posts

    Procedurally generated snowflake-like physical objects, yay!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 18Programming King Programming King x 2Funny Funny x 1Winner Winner x 1 (list)

  22. Post #3222
    Neigh
    CarlBooth's Avatar
    June 2007
    28,550 Posts

    Procedurally generated snowflake-like physical objects, yay!
    If they were different opacities it would make a cool wallpaper
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 7Programming King Programming King x 1 (list)

  23. Post #3223
    Meow :3
    Ac!dL3ak's Avatar
    July 2005
    6,090 Posts

    Procedurally generated snowflake-like physical objects, yay!
    I wish I could do stuff like this :smith:
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Friendly Friendly x 7Agree Agree x 7Funny Funny x 1 (list)

  24. Post #3224
    OrYgin's Avatar
    November 2007
    752 Posts
    I wish I could do stuff like this :smith:
    You can. Searching and learning is the real force of a programmer.
    Reply With Quote Edit / Delete Windows 7 Belgium Show Events Informative Informative x 1 (list)

  25. Post #3225
    Gold Member

    October 2008
    3,838 Posts
    If they were different opacities it would make a cool wallpaper
    Like this?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 12 (list)

  26. Post #3226
    OrYgin's Avatar
    November 2007
    752 Posts
    Like this?
    Seems like an optical illusion to me
    Reply With Quote Edit / Delete Windows 7 Belgium Show Events Dumb Dumb x 2 (list)

  27. Post #3227
    Neigh
    CarlBooth's Avatar
    June 2007
    28,550 Posts
    OK, that's my winter wallpaper for this year sorted
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Winner Winner x 8Artistic Artistic x 2Funny Funny x 1 (list)

  28. Post #3228
    Eudoxia's Avatar
    July 2009
    6,009 Posts
    As a side project I'm making a program that will speed up my posting of news by aliasing things like [ QUOTE ] and [ B ] with single-character things. Because typing them out involves too many keystrokes and I often end up typing QBOPE//].
    Reply With Quote Edit / Delete Windows 7 Uruguay Show Events Winner Winner x 1 (list)

  29. Post #3229
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    Ok I just found out that the manhatten distance works way better in terms of efficiency than the euclidian distance for the heuristic function in A-*
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 1 (list)

  30. Post #3230
    Gold Member
    ThePuska's Avatar
    October 2005
    3,451 Posts
    In a square grid, possibly.

    Edited:

    What kind of a heuristic would one use in a triangular grid anyway?
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  31. Post #3231
    Project Lead, Internet Explorer for Linux
    lavacano's Avatar
    October 2008
    14,616 Posts
    (Crosspost between Programming WAYWO and WebDev WAYWO)

    Whoo hoo, I'm actually working on something complicated for once! I'm making a bug tracker.

    Sadly here's what I have so far:



    I'm still working out what the default text colors will be, as well as what would actually be in the default header. But it doesn't matter TOO much, seeing as it's going to be shit simple to create your own damn header and footer.

    I don't have many feature plans for this yet, but one I do have planned is having multiple priority levels saved. So instead of one little thing marked "This is a high priority bug", you'll have a thing similar to GetSatisfaction's Mood display that says something like "12 people think this is a high priority bug, 6 people think this is a critical bug, and 4 people think this is a medium priority bug".
    Reply With Quote Edit / Delete Linux United States Show Events Optimistic Optimistic x 2 (list)

  32. Post #3232
    Gold Member
    Veers's Avatar
    December 2008
    2,178 Posts
    As a side project I'm making a program that will speed up my posting of news by aliasing things like [ QUOTE ] and [ B ] with single-character things. Because typing them out involves too many keystrokes and I often end up typing QBOPE//].
    If you don't actually want to do the work you can just use a text expander. Lifehacker has a free one that works even though it has not been updated recently.
    Reply With Quote Edit / Delete Mac United States Show Events

  33. Post #3233
    Gold Member
    r4nk_'s Avatar
    April 2005
    2,023 Posts
    Am I the only one who doesn't really like the MSDN documentation? I find it harder to browse than others, less appealing and so on. But it has code examples which is good.

    As a side project I'm making a program that will speed up my posting of news by aliasing things like [ QUOTE ] and [ B ] with single-character things. Because typing them out involves too many keystrokes and I often end up typing QBOPE//].
    On one of the old version of facepunch (or maybe it was just my browser) if you had a block of text selected and hit ctrl-b it would insert bold tags around the text. Those were the days.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 4 (list)

  34. Post #3234
    Everyone has a $1 title
    Skipcast's Avatar
    November 2008
    7,083 Posts
    Am I the only one who doesn't really like the MSDN documentation? I find it harder to browse than others, less appealing and so on. But it has code examples which is good.



    On one of the old version of facepunch (or maybe it was just my browser) if you had a block of text selected and hit ctrl-b it would insert bold tags around the text. Those were the days.
    Does in firefox IIRC.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Agree Agree x 3Informative Informative x 1Useful Useful x 1 (list)

  35. Post #3235
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    -snip-
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  36. Post #3236
    Eudoxia's Avatar
    July 2009
    6,009 Posts


    To do: Disable parsing the slash in URL's into Italics tags

    Bit of a derp there.
    Reply With Quote Edit / Delete Windows 7 Uruguay Show Events

  37. Post #3237
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    Riiiiighhttt so you think its more likely that the developers wrote a 10,000 line main file than that it is caused by decompiling.....
    When dealing with .NET yes. Granted the decompiler might have added a few lines but the 'Main' class is a mess. http://pastebin.com/qdBaTnL3
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  38. Post #3238
    strata8's Avatar
    September 2009
    228 Posts
    When dealing with .NET yes. Granted the decompiler might have added a few lines but the 'Main' class is a mess. http://pastebin.com/qdBaTnL3
    What the hell? I don't know anything about coding, but shouldn't that all be in classes or something?

    Code:
        protected override void UnloadContent();
        protected override void Update(GameTime gameTime);
        private static void UpdateClient();
        private static void UpdateDebug();
        private static void UpdateInvasion();
        private static void UpdateMenu();
        protected void UpdateMusic();
        private static void UpdateServer();
        private static void UpdateTime();
    Ugh.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  39. Post #3239
    HeatPipe's Avatar
    October 2007
    1,574 Posts
    People put too much emphasis on the language, rather than general programming theory or problem solving skills.
    I really think that most good programmers can pick up new syntax in a week or less.
    This.
    Reply With Quote Edit / Delete Windows 7 Slovenia Show Events Agree Agree x 2 (list)

  40. Post #3240
    Gold Member
    VoiDeD's Avatar
    August 2005
    860 Posts
    There's something about the ratio of code quality to indie success that just makes me want to punch children.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Optimistic x 8Agree x 6Funny x 5Dumb x 1Artistic x 1 (list)