[QUOTE=thomasfn;25288678]It would be better if I removed the <Material></Material> tags and the version though, but that's down to the implementation of XML reader I'm using.[/QUOTE]
If you're going to obliterate the XML spec, why bother using it anyway?
[editline]06:14PM[/editline]
[QUOTE=DevBug;25300838][img_thumb]http://anyhub.net/file/29capture.png[/img_thumb]
Nothing special, I'm rolling my own so I can throw it into my engine.[/QUOTE]
That's cool. Are you parsing it into an AST or a list of tokens at all?
[QUOTE=looped;25292907]Started writing a Skype Bot for me and my friends. I call it OverLord. It currently has votekick and chat logging features.
There's nothing much I can screencap for content, but I'll see what I can do.
Ideas for commands and features welcome.[/QUOTE]
I'd love to have some features from old IRC bots such as blackjack, trivia, and other silly games like that
Had to have a go at a developer console after seeing that game.
It's not much, but it is a good addition to my library, and again, works entirely as an XNA game component.
[img]http://dl.dropbox.com/u/286964/XNA/DevConsole.png[/img]
:love: Delegates
[QUOTE=Tezzanator92;25304319]Had to have a go at a developer console after seeing that game.
It's not much, but it is a good addition to my library, and again, works entirely as an XNA game component.
[img_thumb]http://dl.dropbox.com/u/286964/XNA/DevConsole.png[/img_thumb]
:love: Delegates[/QUOTE]
[cpp]
// define this somewhere
public class ConCommand : Attribute
{
public string Description {get;private set;}
public ConCommand(string descr)
{
Description = descr;
}
}
// mark your command methods like this:
[ConCommand("short sentence describing what i do")]
public static void TestFn(string args) { }
// now add this method to where you're setting up your commands and call it
void BootstrapCommands()
{
var methods = typeof(BuiltinCommands).GetMethods(BindingFlags.Public | BindingFlags.Static);
foreach(var m in methods)
{
var attr = m.GetCustomAttributes().Where(a => a is ConCommand).SingleOrDefault();
if(attr == null)
continue;
AddCommand(m.Name, ((ConCommand)attr).Description, (Action<string>)Delegate.CreateDelegate(typeof(Action<string>), m));
}
}
[/cpp]
That should work, obviously you'll need to change the type of delegate I used there if you're using another type. :smile:
:love: reflection.
[editline]11:01PM[/editline]
After looking at your screenshots, you'll want Func<DeveloperConsole, string[], string>
Wow, That looks a far better way.
I think some further reading is in order!
Thanks.
It'll be slower than your current way (only when initializing the console though), but in my opinion, it's a fair tradeoff for cleaner code.
[editline]11:11PM[/editline]
And at least you're not using else if's :v:
Hmm I use System.Windows.Forms.MethodInvoker to do my con commands, is this bad?
IIRC MethodInvoker is a delegate with the type signature void(void).
It makes no difference, but I prefer using the Func, Action, and Predicate set. As I said, it doesn't make the slightest difference, so use what you want.
(that said, I'd warn against defining your own delegate types unless you have a [b]very[/b] good reason. It makes interop a PITA, especially if your [URL=http://stackoverflow.com/questions/3589999/dynamically-casting-one-type-of-delegate-to-another]delegates are private types[/URL])
[QUOTE=turb__;25304450][cpp]
[/cpp]
That should work, obviously you'll need to change the type of delegate I used there if you're using another type. :smile:
:love: reflection.
[editline]11:01PM[/editline]
After looking at your screenshots, you'll want Func<DeveloperConsole, string[], string>[/QUOTE]
Thankyou for posting this and teaching me about custom attributes.
[QUOTE=CarlBooth;25297209]Xerios how is your RTS coming along?[/QUOTE]
Heh, I wanted post an update but facepunch was down
Anyways, not sure if I already said this but :
My game has an official name !
[IMG]http://www.factioncommand.com/factioncommand.png[/IMG]
And a website ! [url]http://www.factioncommand.com[/url]
There isn't much to see cause most of the stuff were done
internally, like engine rewrite and gameplay changes.
Also, I'm currently trying to build up a solid team =)
Have a screenshot with a crappy map I made using the Map editor :haw:
[IMG]http://imgur.com/a6D0s.jpg[/IMG]
[QUOTE=Vampired;25305780]Thankyou for posting this and teaching me about custom attributes.[/QUOTE]
Yes that is a really helpful snippet. As a C++ programmer who has turned a liking to C#, it's nice to see the better "C# way" of doing things which I wouldn't have thought about. (I did the basic function call with a callback method for my console, but will be changing it to use attributes now.)
[QUOTE=yngndrw;25305921]Yes that is a really helpful snippet. As a C++ programmer who has turned a liking to C#, it's nice to see the better "C# way" of doing things which I wouldn't have thought about. (I did the basic function call with a callback method for my console, but will be changing it to use attributes now.)[/QUOTE]
Yes I agree 100%. These kind of nifty things make me prefer C#
[media]http://www.youtube.com/watch?v=DlEQd_bfBm0[/media]
Don't know what to expect to recieve when xerios is posting such awesome content. :sigh:
Did some tree visualization while FP was down:
[img]http://i53.tinypic.com/2j2da14.png[/img]
[QUOTE=noctune9;25306510]Did some tree visualization while FP was down:
[img_thumb]http://i53.tinypic.com/2j2da14.png[/img_thumb][/QUOTE]
Looks like it could be a nice decal imo. If textured, of course.
I have to make a game for my Computer Science course with a few friends. It has to be in JAVA and have full graphics and crap.
We are thinking about making it online multiplayer for massive bonus points which means coding the server and everything. Is that particularly hard to do in JAVA? I have done a bit with socket servers in C++ but never in JAVA.
Any suggestions on what we could do? I thought some poker or battleship would be easy but I don't know.
[img]http://www.fortfn.co.uk/images/ue2/ue2_14.png[/img]
Terrain streamed from the server. Has a bit of a way to go before it's stable, though. I need to look into the weird texture filters too.
[QUOTE=Xerios3;25305871]Heh, I wanted post an update but facepunch was down
Anyways, not sure if I already said this but :
My game has an official name !
[IMG]http://www.factioncommand.com/factioncommand.png[/IMG]
And a website ! [url]http://www.factioncommand.com[/url]
There isn't much to see cause most of the stuff were done
internally, like engine rewrite and gameplay changes.
Also, I'm currently trying to build up a solid team =)
Have a screenshot with a crappy map I made using the Map editor :haw:
[IMG_thumb]http://imgur.com/a6D0s.jpg[/IMG_thumb][/QUOTE]
Holy shit, that looks awesome
[QUOTE=redonkulous;25306839]We are thinking about making it online multiplayer for massive bonus points which means coding the server and everything. Is that particularly hard to do in JAVA? I have done a bit with socket servers in C++ but never in JAVA.[/QUOTE]
The fact that Java (yeah, it's not "JAVA") won't let you touch low-level ways of dealing with data is probably going to be frustrating if you try to translate that C++ experience into Java. You should probably find a good networking tutorial specifically for Java and go from there instead.
Probably not the most useful advice ever, but whatever :smile:
I dunno about you guys but my productivity spikes when FP goes down :v:
[url=http://itunes.apple.com/us/app/anyhub/id372958406?mt=8]AnyHub 1.4 is out, if any of you guys didn't already know/care.[/url]
If you crash, please send me the logs at [email]i300@i3software.org[/email]
[QUOTE=i300;25308300][url=http://itunes.apple.com/us/app/anyhub/id372958406?mt=8]AnyHub 1.4 is out, if any of you guys didn't already know/care.[/url]
If you crash, please send me the logs at [email]i300@i3software.org[/email][/QUOTE]
Please stop spamming this.
I've spent the past 24 hours or so trying to get LLVM 2.8 to work with something other than C++ on windows. The good news is that LLVM and clang compiled perfectly. (Clang even works with the MSVC linker, so you can now technically have C99 in MSVC :D)
The bad news is that I can't use Python bindings for it on windows. So I have two choices right now to eventually get my language working on windows.
1) Write my language's implementation in C++ (:ohdear:)
2) Write some C++/CLI bindings for .NET, and then .NET <-> Python wrapper for IronPython (C++ -> .NET -> IronPython -> My compiler :black101:)
Either way, this is going to eventually end in tears :frown:
[QUOTE=turb__;25302581]That's cool. Are you parsing it into an AST or a list of tokens at all?[/QUOTE]
No AST, I'm just using a list of tokens -- quite badly too.
[QUOTE=thomasfn;25306897][img]http://www.fortfn.co.uk/images/ue2/ue2_14.png[/img]
Terrain streamed from the server. Has a bit of a way to go before it's stable, though. I need to look into the weird texture filters too.[/QUOTE]
That engine is coming along nicely.
[QUOTE=Chandler;25308400]I've spent the past 24 hours or so trying to get LLVM 2.8 to work with something other than C++ on windows. The good news is that LLVM and clang compiled perfectly. (Clang even works with the MSVC linker, so you can now technically have C99 in MSVC :D)
The bad news is that I can't use Python bindings for it on windows. So I have two choices right now to eventually get my language working on windows.
1) Write my language's implementation in C++ (:ohdear:)
2) Write some C++/CLI bindings for .NET, and then .NET <-> Python wrapper for IronPython (C++ -> .NET -> IronPython -> My compiler :black101:)
Either way, this is going to eventually end in tears :frown:[/QUOTE]
Do it in C++
[QUOTE=blankthemuffin;25308998][url]http://tibleiz.net/asm-xml/index.html[/url]
lol[/QUOTE]
[url]http://tibleiz.net/asm-xml/faq.html[/url]
[quote]Assembly is simple.[/quote]
LOL
edit:
[quote]use an OO approach[/quote]
LOL OO assembly
[QUOTE=shill le 2nd;25309660][url]http://tibleiz.net/asm-xml/faq.html[/url]
LOL
edit:
LOL OO assembly[/QUOTE]
Hi troll.
[code]
; object layout
myobj:
dw 0 ; some short member
dw 123 ; another short member
dw 0xcafe ; near pointer to method
mov bx, myobj
mov ax, [bx+2] ; member access
push 1
push 2
push bx ; 'this' pointer
call [bx+4] ; method call
[/code]
Turns out my trig ain't so bad after all:
[img]http://ahb.me/CAA[/img]
To what use is a small line that could have been done in a lot less space, you are not really showing anything unless we have some background on how it works.
[QUOTE=turb_;25312132]Turns out my trig ain't so bad after all:
[img]http://ahb.me/CAA[/img][/QUOTE]
O fuck those parameters hurt my eyes.
Sorry, you need to Log In to post a reply to this thread.