• What are you working on? - December 2013
    1,511 replies, posted
I just realized something. Working on the physics engine has made me really value version control higher than I used to.
Android 2.3 is the Windows XP of the phone world.
[QUOTE=layla;43306875]One of these days I'd love to finish my 317 client rewrite to work with a 317 private server. Not a naff looking client either, just a 1:1 copy but with modern OpenGL, it would be cool as fuck.[/QUOTE] You just got me interested, I remember playing on private servers and original servers alike back in ~2005. Any guides/documentation/helpful resources for private servers?
[QUOTE=Ac!dL3ak;43306722]I hate to ask, but in the survey I had posted a while back, someone asked for a "pipe/loopback API" if I'm going to make a chat app. Could someone please explain to me what this is?[/QUOTE] It's one way to avoid all the API incompatibilities, basically you would start the backend/connection somewhere and provide a filesystem pipe or local TCP port to control it. The alternative is a C API (because anything can call into C), but that can be ugly if you have common configuration because you can't (easily) do synchronization that way and not all languages can offer one. Which option is the best really depends on the system you're aiming for, but if it's incompatible or would have to be reimplemented to work with existing apps it's just [I]another[/I] incompatible program noone will use because noone else uses it. [editline]25th December 2013[/editline] The TCP/pipe option is slightly more resource hungry afaik.
[QUOTE=WTF Nuke;43307203]You just got me interested, I remember playing on private servers and original servers alike back in ~2005. Any guides/documentation/helpful resources for private servers?[/QUOTE] You'll have to learn from reading other server sources, the dev community is shit. People release poorly written servers as zip archives with no documentation and no one bothers to share their information outside of uploading uncommented sources
[QUOTE=Doritos_Man;43306640]Hexxeh has iirc[/QUOTE] Oh, yes. I remember that now; I think he even took his apart to examine the innards. Is he still around?
I can't believe how hard it is to install this goddamn plugin for VIM: [url]https://github.com/Valloric/YouCompleteMe[/url] plugins should be drag and drop kind of easy. not: Recompile VIM with python support Compile another plugin manager to manage the built-in plugin manager Set up the other plugin manager Compile clang Compile plugin forget to add some parameters because the documentation is pure shite [quote]Step x: ./install.sh (this will take a goddamn hour! :D) Step x + 1: oh yeah, i almost forgot add this infinite amount of parameters or else Step x is useless[/quote] Compile plugin again Set up plugin on the other plugin manager --i'm here but i still have to figure out what even are the next steps!-- Yes, this is what i'm working on.
The script I use basically only does [code]cmake -DUSE_SYSTEM_LIBCLANG=ON make ycm_core[/code] and it worked using the system Vim (Python is already enabled for me) and clang.
I think i already have YCM set, but it all looks the same. I opened cpp, lua and py files but it doesn't highlight anything and no autocomplete. Also, for some reason python only works on gvim and not on vim even though i purged vim, recompiled and reinstalled with python support.
[code]import random while True: for i in range(1,2): chars = random.choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=_+[]{};"\:/?.<>,|') print chars,[/code]
[QUOTE=MatheusMCardoso;43308083]I can't believe how hard it is to install this goddamn plugin for VIM: [url]https://github.com/Valloric/YouCompleteMe[/url] plugins should be drag and drop kind of easy. not: Recompile VIM with python support Compile another plugin manager to manage the built-in plugin manager Set up the other plugin manager Compile clang Compile plugin forget to add some parameters because the documentation is pure shite Compile plugin again Set up plugin on the other plugin manager --i'm here but i still have to figure out what even are the next steps!-- Yes, this is what i'm working on.[/QUOTE] Why are you doing all that? Plugin installation in VIM for me is just add "NeoBundle 'Valloric/YouCompleteMe'" Aaand.. Restart vim, done. That's literally it. Why are you compiling clang and plugins and vim from scratch?
[QUOTE=mastersrp;43308321]Why are you doing all that? Plugin installation in VIM for me is just add "NeoBundle 'Valloric/YouCompleteMe'" Aaand.. Restart vim, done. That's literally it. Why are you compiling clang and plugins and vim from scratch?[/QUOTE] I'm just following the installation guide. Also, it doesn't even mention NeoBundle. [url]https://github.com/Valloric/YouCompleteMe[/url]
[QUOTE=WTF Nuke;43307203]You just got me interested, I remember playing on private servers and original servers alike back in ~2005. Any guides/documentation/helpful resources for private servers?[/QUOTE] This is the best one I know of: [url]http://rswiki.moparisthebest.com/index.php?title=317_Protocol[/url]
As you may know, C# string manipulation is not good regarding Unicode by default. I started a small project to fix that with extension methods, and to try out MonoDevelop. Here's what I have so far:[code]s == In the game of mahjong &#127004; denotes the Four of circles s.Length == 53 s.TextLength() == 52 s.Codepoints().Count() == 52 c in s: I n t h e g a m e o f m a h j o n g &#65533; d e n o t e s t h e F o u r o f c i r c l e s c in s.Codepoints().Select(char.ConvertFromUtf32): I n t h e g a m e o f m a h j o n g &#127004; d e n o t e s t h e F o u r o f c i r c l e s c in s.TextElements(): I n t h e g a m e o f m a h j o n g &#127004; d e n o t e s t h e F o u r o f c i r c l e s s == Ka&#776;sekuchen s.Length == 11 s.TextLength() == 10 s.Codepoints().Count() == 11 c in s: K a &#776; s e k u c h e n c in s.Codepoints().Select(char.ConvertFromUtf32): K a &#776; s e k u c h e n c in s.TextElements(): K a&#776; s e k u c h e n[/code] (The [I]Text...[/I] methods are just wrappers around TextInfo constructs for the most part.) There are also TextSubstring methods that operate on text elements. I still need to check if not-cutting string manipulation works properly by default. [editline]26th December 2013[/editline] The code font seems to be broken, the last line is correct even if you see it separated here.
[QUOTE=adnzzzzZ;43302169] [IMG]http://i.minus.com/ilmKcP4KQciex.gif[/IMG][/QUOTE] This. Also, maybe you should make a little animation of when he standing at the edge of a platform, like sonic. :dance: It's important to get these things out of the way before moving on to trivial stuff such as gameplay.
Working on a turn based RPG as my second big project. I probably won't get this done but it'll be a good test and learning enviroment. I've already coded the base hierarchy and system I want in Java(it takes turns, checks for special conditions etc) but I want to move it to C++ for added learning(plus, if I'm actually going to get anywhere with this, I might as well as libgdx annoys me whereas SFML doesn't). Right now for my special conditions I have a class called State, which is simply a wrapper for an arraylist holding strings of special conditions(paralysis, burning and the likes) and can report what the current state is. Each object holds a State class, and I list what conditions it has, so that some objects can't be burned or whatever. This works, however now while porting the code over to C++ I've been questioning it a bit. Would it be better to use enums or something less intensive for what seems to be a simple concept? Also with the current design, how hard would it be to switch the system to something that loads the states from a json formatted file? But I think I'll take things one step at a time.
[CODE]package hangman01; import java.util.Scanner; public class HangMan01 { static Scanner keyboard = new Scanner(System.in); public static void main(String[] args) { String word = getPlayerOnesWord(); boolean gameFinished = false; int incorrectGuesses = 0; do { gameDeclaration(word, incorrectGuesses); String MatchWord = getMatchWord(); boolean gallows = getGallows(word, MatchWord); if (gallows) { incorrectGuesses++; } if (incorrectGuesses == 6) { gameFinished = true; loss(); } } while (!gameFinished); } public static String getPlayerOnesWord() { System.out.println("Player 1, please enter a word you would like Player 2 to guess."); String playerOneWord = keyboard.next(); for (int i = 1; i <= 20; i++) { System.out.print("\n"); } return playerOneWord; } public static void drawHangman(int incorrectGuesses) { if (incorrectGuesses == 0) { System.out.println(" -------\n" + "| |\n" + " |\n" + " |\n" + " |\n" + "----------"); } else if (incorrectGuesses == 1) { System.out.println(" -------\n" + " | |\n" + " O |\n" + " |\n" + " |\n" + "----------"); } else if (incorrectGuesses == 2) { System.out.println(" -------\n" + " | |\n" + " O |\n" + " | |\n" + " |\n" + "----------"); } else if (incorrectGuesses == 3) { System.out.println(" -------\n" + " | |\n" + " O |\n" + "/| |\n" + " |\n" + "----------"); } else if (incorrectGuesses == 4){System.out.println(" -------\n" + " | |\n" + " O |\n" + "/|\\ |\n" + " |\n" + "----------");} else if (incorrectGuesses == 5) {System.out.println(" -------\n" + " | |\n" + " O |\n" + "/|\\ |\n" + "/ |\n" + "----------");} else {System.out.println(" -------\n" + " | |\n" + " O |\n" + "/|\\ |\n" + "/ \\ |\n" + "----------");} } public static void gameDeclaration(String playerOneWord, int incorrectGuesses) { System.out.println("Player 2, guess a letter or word that is " + playerOneWord.length() + " characters long"); drawHangman(incorrectGuesses); boolean[] letterExists = new boolean[playerOneWord.length()]; for (int i = 0; i <= playerOneWord.length(); i++) { System.out.print("-"); } } public static String getMatchWord() { System.out.println(""); String twoMatchWord = keyboard.next(); return twoMatchWord; } public static boolean getGallows(String playerOneWord, String twoMatchWord) { boolean hangHim = false; if (playerOneWord.equals(twoMatchWord)) { System.out.println("You survived!"); } else if (playerOneWord.indexOf(twoMatchWord.toString()) >= 0) { System.out.println(twoMatchWord + " exists in the word!"); } else { System.out.println("The letter " + twoMatchWord + " does not exist in the word"); hangHim = true; } return hangHim; } public static void loss() { System.out.println("He's a dead man"); while (0 < 1) { System.out.println(" -------\n" + " | |\n" + " O |\n" + "/|\\ |\n" + "/ \\ |\n" + "----------"); System.out.println(""); System.out.println(" -------\n" + " / |\n" + "O |\n" + "|\\ |\n" + " | |\n" + "----------"); System.out.println(""); } } } [/CODE] Hey guys made some progress and things are looking pretty good. Now to replace the dashes with correct letters in the word. How does it look?
[QUOTE=Blueridge;43310094]Working on a turn based RPG as my second big project. I probably won't get this done but it'll be a good test and learning enviroment. I've already coded the base hierarchy and system I want in Java(it takes turns, checks for special conditions etc) but I want to move it to C++ for added learning(plus, if I'm actually going to get anywhere with this, I might as well as libgdx annoys me whereas SFML doesn't). Right now for my special conditions I have a class called State, which is simply a wrapper for an arraylist holding strings of special conditions(paralysis, burning and the likes) and can report what the current state is. Each object holds a State class, and I list what conditions it has, so that some objects can't be burned or whatever. This works, however now while porting the code over to C++ I've been questioning it a bit. Would it be better to use enums or something less intensive for what seems to be a simple concept? Also with the current design, how hard would it be to switch the system to something that loads the states from a json formatted file? But I think I'll take things one step at a time.[/QUOTE] I would vote for enum not for the sake of efficiency (although it is certainly more efficient than comparing strings) but for the sake of keeping the interface sane and (more-or-less) type-safe. With your system, typos in conditions are not caught until runtime (when the strings are added/removed from the States object). Conversely, with enums your interface would include all available states up front: [code] class States { public: enum State { kBurned = 0, kFrozen, kImmune, ... }; bool get(State state) { return states_ & 1 << state; } void set(State state, bool active) { active ? states_ |= (1 << state) : states_ &= ~(1 << state); } private: static const MAX_STATES = 64; std::bitset<MAX_STATES> states_; }; [/code] with this system adding a new state is as simple as adding another enum entry, and it simply becomes a transparent (and enforceable) part of the interface: [code] states.get("burned"); // becomes states.get(States::State::kBurned); [/code] The only caveat is that this isn't 100% type safe if you use the old enum types, which are implicitly convertible to their underlying integral type, such that instead of: [code] void set(State state, bool active); [/code] the compiler basically sees: [code] void set(int state, bool active); [/code] which is a problem if you mess up and pass some other integral type in which is not a part of the enum: [code] States.set(42, true); [/code] If you can use an C++11 compiler you can replace that enum with an enum class, which [i]is[/i] type safe. If not, this is how it has been done since the dawn of C, so you should be fine.
[QUOTE=adnzzzzZ;43304604]In my case I don't think I can do that easily. box2d acts up a lot when it comes to this and it was a miracle I was able to make them not bouncy+elastic at all.[/QUOTE] I'm curious, how are you doing the drawing of the chain?
[QUOTE=Tamschi;43307325]It's one way to avoid all the API incompatibilities, basically you would start the backend/connection somewhere and provide a filesystem pipe or local TCP port to control it. The alternative is a C API (because anything can call into C), but that can be ugly if you have common configuration because you can't (easily) do synchronization that way and not all languages can offer one. Which option is the best really depends on the system you're aiming for, but if it's incompatible or would have to be reimplemented to work with existing apps it's just [I]another[/I] incompatible program noone will use because noone else uses it. [editline]25th December 2013[/editline] The TCP/pipe option is slightly more resource hungry afaik.[/QUOTE] I'm going to write it in C, and I had decided before hand I'd separate the whole thing into a backend and frontend, with a C library (I think static) as the backend, and the frontend being anything that interfaces with that backend. The entire idea is to make the service usable for pragmatic purposes, so if someone wanted to make something like [url=http://hubot.github.com/]hubot[/url] for the service, they can. You're still not making much sense though with the rest of what you're saying...
[QUOTE=nomad1;43311356]I'm curious, how are you doing the drawing of the chain?[/QUOTE] [URL]http://www.iforce2d.net/b2dtut/joints-revolute[/URL] Last example on this tutorial is how I'm doing the chain. Then for each one of the rectangles that make up the chain I draw a chain circle and a link: [IMG]http://i.minus.com/ibs6HDMK8IzP0R.png[/IMG] [IMG]http://i.minus.com/i7TkReqJcbvxJ.png[/IMG] [IMG]http://i.imgur.com/AxXxcqA.png[/IMG]
My random story generating app, Moist Banana, is nearing completion and is almost ready to be unleashed like a rabid gorilla upon Google Play. I'm currently writing documentation (a whole wiki) for all the features of the development kit, as well as fixing various small bugs with the dev tools and the app itself. I also really need to remake my logo into a version that doesn't look like something MSPaint shat out. Expected release date is around New Year's Day. [IMG]http://i.imgur.com/E8MycqX.png[/IMG] It has a loading screen now too. Yay. Those of you who have seen my previous posts, what features would you like to see? (NFC support will have to wait until I get a better phone.)
Added a basic bridge. Physics is pretty cool. One simple mechanism (chaining things together) gets you many different objects/behaviors! [IMG]http://i.minus.com/iFFZ9aKiADgvi.gif[/IMG]
[QUOTE=adnzzzzZ;43312153]Added a basic bridge. Physics is pretty cool. One simple mechanism (chaining things together) gets you many different objects/behaviors! [IMG]http://i.minus.com/iFFZ9aKiADgvi.gif[/IMG][/QUOTE] That's brilliant. If I may offer a suggestion, collapsible buildings/small structures would be a nice touch. Maybe one could start falling apart while the player is inside it and they would be forced to make a quick escape.
[QUOTE=Berkin;43312184]That's brilliant. If I may offer a suggestion, collapsible buildings/small structures would be a nice touch. Maybe one could start falling apart while the player is inside it and they would be forced to make a quick escape.[/QUOTE] I totally plan on having that eventually. The first thing I'm gonna try around that area is something like this game: [url]http://www.ludumdare.com/compo/ludum-dare-28/?action=preview&uid=21790[/url].
[QUOTE=MatheusMCardoso;43308083]I can't believe how hard it is to install this goddamn plugin for VIM: [url]https://github.com/Valloric/YouCompleteMe[/url] plugins should be drag and drop kind of easy. not: Recompile VIM with python support Compile another plugin manager to manage the built-in plugin manager Set up the other plugin manager Compile clang Compile plugin forget to add some parameters because the documentation is pure shite Compile plugin again Set up plugin on the other plugin manager --i'm here but i still have to figure out what even are the next steps!-- Yes, this is what i'm working on.[/QUOTE] [code] $ cd ~/.vim/bundle/YouCompleteMe $ ./install.sh --clang-completer[/code] that's it [I]"A bad workman blames his tools"[/I]
[QUOTE=MatheusMCardoso;43308083]I can't believe how hard it is to install this goddamn plugin for VIM: [url]https://github.com/Valloric/YouCompleteMe[/url] plugins should be drag and drop kind of easy. not: Recompile VIM with python support Compile another plugin manager to manage the built-in plugin manager Set up the other plugin manager Compile clang Compile plugin forget to add some parameters because the documentation is pure shite Compile plugin again Set up plugin on the other plugin manager --i'm here but i still have to figure out what even are the next steps!-- Yes, this is what i'm working on.[/QUOTE] Use [URL="https://github.com/gmarik/vundle"]vundle[/URL]?
The correct solution is using emacs
[QUOTE=sambooo;43312622]The correct solution is using emacs[/QUOTE] emacs has never been the solution to anything
[QUOTE=WTF Nuke;43307203]You just got me interested, I remember playing on private servers and original servers alike back in ~2005. Any guides/documentation/helpful resources for private servers?[/QUOTE] I miss the days of 2MB client.java files.
Sorry, you need to Log In to post a reply to this thread.