• What are you working on? v15
    5,001 replies, posted
[QUOTE=geel9;27676982]Wait you use gamemaker?[/QUOTE] Apparently according to everyone on the last page. Of course anyone that has bothered to ask would know im using XNA
[media]http://www.youtube.com/watch?v=p9tapVQ8TO4[/media]
Why can't you move there? :frown: Also a roguelike just like that was the first thing you could call a game I created.
Let's make fun of Richy because he's a positive contributor to the thread and wants to learn from people! And you guys protect your source as if it's going to make you a million dollars, if we should be making fun of you guys, not Richy.
The "can't move there" message is a placeholder until I can make the multiple-map functionality work. The thing in the top right corner is supposed to be an over-world map, but I need to redo the whole map code... I got it to work in an older version, but I wasn't using ncurses. Once I get it working, the player will be allowed to move from map to map by moving "off" the edge of one map and onto another.
[QUOTE=Jawalt;27677442]Let's make fun of Richy because he's a positive contributor to the thread and wants to learn from people! And you guys protect your source as if it's going to make you a million dollars, if we should be making fun of you guys, not Richy.[/QUOTE] I usually don't release my source to people because I'm so ashamed of some of the half-arsed work arounds I do to make things function.
[QUOTE=Jawalt;27677442]Let's make fun of Richy because he's a positive contributor to the thread and wants to learn from people! And you guys protect your source as if it's going to make you a million dollars, if we should be making fun of you guys, not Richy.[/QUOTE] Nobody was seriously making fun of him, he just didn't take it very well. Well, except that Rohans guy but he's obviously an idiot. Also since I use Löve I can't not release the source code.
I don't release my code so often because it's embarrassing =3
[QUOTE=Maurice;27677551]Nobody was seriously making fun of him, he just didn't take it very well.[/QUOTE] Hmm i thought i took it quite well :/ Then again today hasnt been a very good day for me
[QUOTE=Jawalt;27677442]Let's make fun of Richy because he's a positive contributor to the thread and wants to learn from people! And you guys protect your source as if it's going to make you a million dollars, if we should be making fun of you guys, not Richy.[/QUOTE] Or you could just save time and arm all humiliation cannons at geel again. I can understand people trying to protect their source code. But if you aren't selling something or making something for the fun of it, why bother being so protective?
My reason is that someone might try and learn from it when they're not at that stage yet, it's a silly way to learn. I'd rather release a specific piece of code that someone needs.
[QUOTE=layla;27677838]My reason is that someone might try and learn from it when they're not at that stage yet, it's a silly way to learn. I'd rather release a specific piece of code that someone needs.[/QUOTE] That is understandable. The few times I've wanted to figure something out ahead of my skill level I have regretted it.
BTW now that were on the subject id like to say that i only asked for th code as i was going through a phase, that as layla says, i though i could learn verything from someones code :v: Now adays i just ask the person how they do the specific thing or google it
[QUOTE=Maurice;27677551]Also since I use Löve I can't not release the source code.[/QUOTE] Is there no way around this? I wonder because Löve is free to use commercially, but you presumably have to release the code...
Maybe you could put the resulting löve.exe into some other exe that extracts it when running or something.
[QUOTE=BlkDucky;27678055]Is there no way around this? I wonder because Löve is free to use commercially, but you presumably have to release the code...[/QUOTE] So? Just include a scary looking DONT TOUCH THIS OR I WILL SUE YOU TO DEATH.txt file in the source code.
If you can use LOVE as a library just compile the Lua code to Lua C API code and then compile that?
[QUOTE=BlkDucky;27678055]Is there no way around this? I wonder because Löve is free to use commercially, but you presumably have to release the code...[/QUOTE] It isn't perfect, but you could always convert all of the code to Lua bytecode, and run it from there. It still wouldn't be secure, but if you really wanted to make an attempt at protecting your source code it'd probably be your best bet. Personally, I'd just leave everything open: even in a commercial project. You could use string.dump and loadstring to do all of the work, but remember, it won't stop anyone who knows what they are doing from still accessing your code. Edit: As thelinx pointed out, this will break your code's ability to be cross-platform.
Hey, Well, I transfered everything onto the server successfully. Now the only issue is that using ssh it runs fine, whereas using PHP's shell_exec() doesn't do anything at all :bang: (safe_mode is off) Here's my code so far :raise: [php] $img = sha1(time()).'.png'; $pwd = shell_exec('pwd'); shell_exec('cd /home/website/apps'); $str = escapeshellcmd("/opt/mono/bin/mono cas3.exe expr='$expression' file=$img"); shell_exec($str); shell_exec('cd '.$pwd); [/php]
[QUOTE=Shanethe13;27678456]It isn't perfect, but you could always convert all of the code to Lua bytecode, and run it from there. It still wouldn't be secure, but if you really wanted to make an attempt at protecting your source code it'd probably be your best bet. Personally, I'd just leave everything open: even in a commercial project. You could use string.dump and loadstring to do all of the work, but remember, it won't stop anyone who knows what they are doing from still accessing your code.[/QUOTE] Lua bytecode is platform (and architecture) specific, which completely ruins the point of LÖVE.
[QUOTE=thelinx;27678661]Lua bytecode is platform (and architecture) specific, which completely ruins the point of LÖVE.[/QUOTE] Oh, I agree completely. But obfuscation is already a waste of time, and if he really wants to go through with it, he can always release multiple platform specific versions.
[QUOTE=Jawalt;27676568]turb_/1 of your 100 alts, what exactly do you use for parsing in C#?[/QUOTE] For Fructose, he's using [url=https://github.com/charliesome/Fructose/blob/master/Fructose/Parser.cs#L31]IronRuby's parser[/url] to generate an Abstract Syntax Tree. For everything else, [url=https://github.com/charliesome/Kari/blob/master/kari/Token.cs]he rolls his own[/url].
[QUOTE=limitofinf;27678637]Hey, Well, I transfered everything onto the server successfully. Now the only issue is that using ssh it runs fine, whereas using PHP's shell_exec() doesn't do anything at all :bang: (safe_mode is off) Here's my code so far :raise: [php] $img = sha1(time()).'.png'; $pwd = shell_exec('pwd'); shell_exec('cd /home/website/apps'); $str = escapeshellcmd("/opt/mono/bin/mono cas3.exe expr='$expression' file=$img"); shell_exec($str); shell_exec('cd '.$pwd); [/php][/QUOTE] You might like to try web development for help on this, but surely as you're using a library/application written in mono, it would be better to develop your application as a mono application? What are you planning to do with this by way? I think a maths pastebin which accepts standard ascii entered maths and outputs it nicely would be really useful -- there is currently one which accepts LaTeX, but LaTeX's really too verbose if you're just trying to give a friend maths help over the net.
I'm working on learning C++. It is annoying. I am now learning if statements and cin input commands. I wanna learn how to make a text RPG or something.
[QUOTE=LieutenantLeo;27679966]I'm working on learning C++. It is annoying. I am now learning if statements and cin input commands. I wanna learn how to make a text RPG or something.[/QUOTE] Don't worry, it's almost always annoying and frustrating at first start. But eventually you'll get the hang of it and code what you want fluently. : )
[QUOTE=limitofinf;27678637][php] $img = sha1(time()).'.png'; $pwd = shell_exec('pwd'); shell_exec('cd /home/website/apps'); $str = escapeshellcmd("/opt/mono/bin/mono cas3.exe expr='$expression' file=$img"); shell_exec($str); shell_exec('cd '.$pwd); [/php][/QUOTE] What would happen if I typed this into the expression box: [code] '; rm -rf * # [/code] Or maybe: [code] '; perl -e 'fork while fork' # [/code]
[QUOTE=Venice Queen;27680010]What would happen if I typed this into the expression box: [code] '; rm -rf * # [/code] Or maybe: [code] '; perl -e 'fork while fork' # [/code][/QUOTE] Why does it matter? I daresay he knows how to do escaping and stuff, but it's rather academic if he can't get that to run in the first place.
[QUOTE=limitofinf;27678637]Now the only issue is that using ssh it runs fine, whereas using PHP's shell_exec() doesn't do anything at all :bang: (safe_mode is off)[/QUOTE] Putting "cd" commands in a shell_exec() like that won't work. The current directory is per-process, and shell_exec() runs a shell in a separate process to execute commands, so you're just changing the current directory of the temporary shell process (which exits immediately afterward), not the process that's running the PHP interpreter. To change the directory of the PHP process itself, use PHP's chdir() function. Alternatively, you could do a single shell_exec() with a list of commands that begins with a directory change, e.g. "cd /wherever && mono myprog.exe". That way both commands run in the same shell, so the directory change carries over to the mono invocation. No need to change back to the starting directory afterward because that process is about to terminate anyway. BTW, if you're using any user-supplied input as part of the mono command, be very careful about [url=http://en.wikipedia.org/wiki/Code_injection#Shell_injection]shell injection[/url] vulnerabilities.
Hey, [QUOTE=TheBoff;27679953]library/application written in mono, it would be better to develop your application as a mono application?[/quote] What do you mean? My server mostly uses PHP; the only reason I'm using Mono is because I didn't want to port cas3 to C++ or something. [quote] What are you planning to do with this by way? I think a maths pastebin which accepts standard ascii entered maths and outputs it nicely would be really useful -- there is currently one which accepts LaTeX, but LaTeX's really too verbose if you're just trying to give a friend maths help over the net.[/QUOTE] This will be one use. [editline]27th January 2011[/editline] [QUOTE=Venice Queen;27680010]What would happen if I typed this into the expression box: [code] '; rm -rf * # [/code] Or maybe: [code] '; perl -e 'fork while fork' # [/code][/QUOTE] escapeshellarg() will sanitize it and cas3.exe will be annoyed by your non-mathematical input. (I got rid of the escapeshellcmd() call) [QUOTE=Wyzard;27680095]Putting "cd" commands in a shell_exec() like that won't work. The current directory is per-process, and shell_exec() runs a shell in a separate process to execute commands, so you're just changing the current directory of the temporary shell process (which exits immediately afterward), not the process that's running the PHP interpreter. To change the directory of the PHP process itself, use PHP's chdir() function. Alternatively, you could do a single shell_exec() with a list of commands that begins with a directory change, e.g. "cd /wherever && mono myprog.exe". That way both commands run in the same shell, so the directory change carries over to the mono invocation. No need to change back to the starting directory afterward because that process is about to terminate anyway. BTW, if you're using any user-supplied input as part of the mono command, be very careful about [url=http://en.wikipedia.org/wiki/Code_injection#Shell_injection]shell injection[/url] vulnerabilities.[/QUOTE] Thanks for the information :smile:, I'll try it out.
I need some help with this C++ code. I am attempting to make some sort of Username system that identifies who you are by saying something about you or printing anything depending on what you type for the username. This doesn't work. It just closes after you enter your username and press enter. [code]#include <iostream> using namespace std; int main() { int username; cout << "Register a new Username \n \n "; cin >> username; cin.ignore(); cout << "Userfile " << username ; cin.get(); [/code]
Sorry, you need to Log In to post a reply to this thread.