[QUOTE=Jallen;28094375]Well what would you achieve by doing that? It would run slower and you'd have to bind a huge amount of procedures. Why do you need the ability to write your entire game in Lua?[/QUOTE]
I already bound almost all exported lua functions in C#. Also gmod is heavily made in Lua, only some of it is in C++, I don't see why it shouldn't work actually.
[QUOTE=Chris220;28094692][media]http://www.youtube.com/watch?v=cSL9S6crtVc[/media]
Day 2 of Hadron development.
Sorry it's so long-winded, I'm rather tired (what's new?)
I'll try and keep the others a bit more snappy[/QUOTE]
Because demo's are fun. You didn't sound too convinced. :v:
[QUOTE=commander204;28094695]I already bound almost all exported lua functions in C#. Also gmod is heavily made in Lua, only some of it is in C++, I don't see why it shouldn't work actually.[/QUOTE]
I'm not saying it won't work, I'm questioning your reason behind wanting to do it. Also since niether of us have access to the C++ side of gmod's code it's not for you to say that gmod is mostly lua, you can't possibly know that. I'd guess at C++ outweighing lua tbh but then I don't know either.
[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace Check_Keys
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter some text to encrypt: ");
string mTextToEncrypt = Console.ReadLine();
RSACryptoServiceProvider rsa;
rsa = SetKey(true);
byte[] mCypherText = rsa.Encrypt(Encoding.UTF8.GetBytes(mTextToEncrypt), false);
Console.WriteLine("\nEncrypted Text\n");
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(Convert.ToBase64String(mCypherText));
rsa = SetKey(false);
byte[] mFullCircle = rsa.Decrypt(mCypherText, false);
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("\nDecrypted Text\n");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(Encoding.UTF8.GetString(mFullCircle));
Console.ReadKey();
}
static RSACryptoServiceProvider SetKey(bool Public)
{
StreamReader sw;
RSACryptoServiceProvider RSA_Alg = new RSACryptoServiceProvider();
if (Public)
sw = new StreamReader("$Key/public.xml");
else
sw = new StreamReader("$Key/private.xml");
string mKey = sw.ReadToEnd();
RSA_Alg.FromXmlString(mKey);
return RSA_Alg;
}
}
}
[/code]
Tells me that "Key does not exist" Any ideas why?
Is there any significant difference between:
[cpp]
struct myEnums
{
static const One = 1, Two = 2, Three = 3;
};
[/cpp]
and
[cpp]
enum myEnums
{
One = 1, Two = 2, Three = 3
};
[/cpp]
[QUOTE=Jallen;28095126]I'm not saying it won't work, I'm questioning your reason behind wanting to do it. Also since niether of us have access to the C++ side of gmod's code it's not for you to say that gmod is mostly lua, you can't possibly know that. I'd guess at C++ outweighing lua tbh but then I don't know either.[/QUOTE]
All the rendering is almost definitely in C++, and that is a huge part of it.
As is the networking and sound.
So the three biggest parts are made in C++, then the gameplay is made in Lua
[QUOTE=NorthernGate;28095181]Is there any significant difference between:
[cpp]
struct myEnums
{
static const One = 1, Two = 2, Three = 3;
};
[/cpp]
and
[cpp]
enum myEnums
{
One = 1, Two, Three
};
[/cpp][/QUOTE]
With enums you could have it like that /\
but i dont think theres much of a difference unless you have more stuff in the struct.
Enum is the one you would want to use for this tho
Compiling a SecondLife viewer, to get round a security exploit. The compilation crashes if you dare use multi threaded compiling.
[QUOTE=Richy19;28095239]With enums you could have it like that /\
but i dont think theres much of a difference unless you have more stuff in the struct.
Enum is the one you would want to use for this tho[/QUOTE]
Yeah, I'd always choose enum, but it just popped in my head while I was at school the enums are basically deglorified static structs
Where can i find the openTK zip file? all i see is the windows installer which i cant use as im on linux
[QUOTE=Richy19;28096133]Where can i find the openTK zip file? all i see is the windows installer which i cant use as im on linux[/QUOTE]
somewhere here? [url]http://sourceforge.net/projects/opentk/files/opentk/[/url]
[QUOTE=NorthernGate;28095181]Is there any significant difference between:
[cpp]
struct myEnums
{
static const One = 1, Two = 2, Three = 3;
};
[/cpp]
and
[cpp]
enum myEnums
{
One = 1, Two = 2, Three = 3
};
[/cpp][/QUOTE]
other than one creates a struct and the other creates an enum?
I'm assuming that this is C#, and a struct is an ordered data structure, and enums are named constants. While the syntax is the same (myEnums.One), the way things are compiled and used in the language is crazy different.
If you are using an enum, use the enum. if you are creating a struct with some static members, use a struct with static members.
So I was thinking earlier, about programming languages. What if there was a programming language that was meant to be extended? Like adding entirely new constructs to the language.
[QUOTE=Jawalt;28096995]So I was thinking earlier, about programming languages. What if there was a programming language that was meant to be extended? Like adding entirely new constructs to the language.[/QUOTE]
[url]http://en.wikipedia.org/wiki/Scheme_(programming_language[/url])
Also, I think Ruby has this sort of thing in mind, too, but I've not really used it enough to be sure.
I quite like the graphics I have in my game. Am I insane or do they have a certain charm to them? Probably the former, to be honest. :v:
[img]http://gyazo.com/f4a35c7ca7a4cac9f59badadb63b351e.png[/img]
[img]http://gyazo.com/ff1c002673503bf0865ce007fabbd77a.png[/img]
Green slime
[img]http://gyazo.com/d3c2fd07602432cc558a4fcafee00116.png[/img]
lol land jellyfish
[img]http://gyazo.com/c68fd7f5d0107b7a1e976f532d0b6898.png[/img]
Zombie
[QUOTE=BlkDucky;28097426]I quite like the graphics I have in my game. Am I insane or do they have a certain charm to them? Probably the former, to be honest. :v:
[img_thumb]http://gyazo.com/f4a35c7ca7a4cac9f59badadb63b351e.png[/img_thumb]
[img_thumb]http://gyazo.com/ff1c002673503bf0865ce007fabbd77a.png[/img_thumb]
Green slime
[img_thumb]http://gyazo.com/d3c2fd07602432cc558a4fcafee00116.png[/img_thumb]
lol land jellyfish
[img_thumb]http://gyazo.com/c68fd7f5d0107b7a1e976f532d0b6898.png[/img_thumb]
Zombie[/QUOTE]
They've got the cutesy low-bit charm to them <3
[QUOTE=BlkDucky;28097426]I quite like the graphics I have in my game. Am I insane or do they have a certain charm to them? Probably the former, to be honest. :v:
[/QUOTE]
I like them.
What would be even better though, is if you made the screen size twice as big and scaled everything up.
Intel Appup is giving free developer membership for a year. Is it a useful thing at all?
[QUOTE=redonkulous;28098068]Intel Appup is giving free developer membership for a year. Is it a useful thing at all?[/QUOTE]
How the hell do you join as an individual?
I have no clue. Luckily I have business, so I just used that. Maybe leave everything blank?
[QUOTE=Rocket;28097996]Made an outline for my MMO
[url]http://rogers-cybernetics.com/cpancake/mmo.php[/url]
By not sending binary right, I figured out that sphere was reading it as a string.[/QUOTE]
[quote]money - max 99999999999999999999999999999999999999999999999999[/quote]
You're joking right?
[QUOTE=Rocket;28097996]Made an outline for my MMO
[url]http://rogers-cybernetics.com/cpancake/mmo.php[/url]
By not sending binary right, I figured out that sphere was reading it as a string.[/QUOTE]
Is that an outline of an outline, because there doesn't seem to be much there...?
[editline]17th February 2011[/editline]
[QUOTE=chimitos;28097646]I like them.
What would be even better though, is if you made the screen size twice as big and scaled everything up.[/QUOTE]
That's what I've done, actually. They're 8x8 graphics scaled to 16x16.
[QUOTE=Rocket;28099975]It's an outline of the technical pieces.
[editline]16th February 2011[/editline]
No, there's a limit of 50 chars for money, so thats 50 values of 9, or 99999999999999999999999999999999999999999999999999[/QUOTE]
But you have to convert it to an integer at some point...
[QUOTE=Rocket;28100219]Don't need to.
[php]
<?php
$var = 10;
echo $var+"10";
?>
[/php]
Outputs 20.[/QUOTE]
...
You're fucking kidding me right
[editline]17th February 2011[/editline]
Please tell me you're kidding.
But I'm pretty sure that still converts to int, which has a maximum of 65,365 or something around there.
[QUOTE=Rocket;28100289]Oh wait, I'm using Python instead of PHP.
Nevermind, I just have to do [code]int(putthefuckingvaluehere)[/code][/QUOTE]
int(2147483648) :smug:
I'm writing a server and I need to keep track of allocations and frees (without an external program like Valgrind). How should I keep track of allocations and frees (I'm using the STL for storage)? I'm going to be doing a lot of allocations and frees and a dump on user request / failure.
1: Remove an entry of an allocation when it's free'd.
2: Add a entry to a free'd list and when a dump is requested update the list.
You can fit a 32-bit integer in eight characters, guaranteed, if you use hexadecimal. (0xffffffff is 4294967295.) Even in decimal it never needs more than ten. Fifty is a waste.
It also makes it possible for the file to contain a value that the program can't actually handle properly. (Conversely, there's nothing one can write in 8 digits of valid hex that won't fit in a 32-bit integer.)
[editline]16th February 2011[/editline]
[QUOTE=DevBug;28100636]I'm writing a server and I need to keep track of allocations and frees (without an external program like Valgrind). How should I keep track of allocations and frees (I'm using the STL for storage)? I'm going to be doing a lot of allocations and frees and a dump on user request / failure.[/QUOTE]
STL containers do their own memory management. Are you talking about new and delete? You should use smart pointers (such as boost::shared_ptr aka std::tr1::shared_ptr) to delete things automatically when they're no longer referenced.
Guys he said he's using python. Python supports ridiculously huge numbers. So you're *all wrong in this context*
[code]
>>> x = str(9) * 50
>>> x
'99999999999999999999999999999999999999999999999999'
>>> int(x)
99999999999999999999999999999999999999999999999999L
[/code]
Screw this I'll use a map.
Sorry, you need to Log In to post a reply to this thread.