• What Are You Working On? V13
    5,003 replies, posted
Got try catches done. Wasn't as painful as I thought. [code]try { 0: br 14 1: brfalse 5 2: br 16 3: brfalse 5 4: br 18 5: br 20 6: br 22 7: br 24 8: br 26 9: br 28 10: br 30 11: call Void .ctor(Styx.BotBase, Styx.BotBase) 12: call Void a(BotChangedEventArgs) 13: nop 14: call Styx.BotBase get_Current() 15: br 1 16: call Boolean get_IsRunning() 17: br 3 18: call Void Stop() 19: br 5 20: call Styx.BotBase get_Current() 21: br 6 22: stloc 0 23: br 7 24: nop 25: br 8 26: call Void a(Styx.BotBase) 27: br 9 28: ldloc 0 29: br 10 30: nop 31: br 11 } catch (System.Exception) { 32: ldloc 0 33: ldarg.0 34: nop 35: call Void CreateException3(System.Exception, System.Object, System.Object, System.Object) 36: nop } 37: ret[/code]
[QUOTE=Darwin226;26079455]I personally find writing an engine a lot more fun than writing a game.[/QUOTE] I don't. But I still really enjoy writing engines for some reason.
[QUOTE=Darwin226;26079455]I personally find writing an engine a lot more fun than writing a game.[/QUOTE] Same, only if I write an engine test for it at the same time too though.
[QUOTE=Samuka97;26058967]Decided to try something easier for my first graphical C++ project. but now I don't know how I can do something like [cpp]score = "Player 1 Score: " + player1_score[/cpp][/QUOTE] in C you can do: [code] sprintf(score, "Player 1 Score: %i", player1_score ); [/code] Why not use a class for the player? :O and call Player.Score() instead of player1_score
[QUOTE=Darwin226;26079455]I personally find writing an engine a lot more fun than writing a game.[/QUOTE] Masochist
Suddenly avatar change. [editline]15th November 2010[/editline] I really should continue actually doing some programming and, y'know, contribute again.
[QUOTE=high;26079121]Ugh, fuck resharper. I am getting sick of it fucking with my code. I am spending more time fixing shit it does wrong.[/QUOTE] I think you'll find that Resharper has an options menu filled with choices for you to take.
Just when I thought I got this matrix stuff all figured out... Can someone show me how a matrix that devides the X and Y with Z would look like? I know I could do something like 1/Z, 0, 0, 0 0, 1/Z, 0, 0 0, 0, 1, 0 0, 0, 0, 1 But is there a way of doing it without changing the matrix for each vertex? (since the Z in that equation would change)
Maybe it's a definitional thing, but I can't conceive of writing anything but the most trivial of games without also writing an engine. Eventually the project will become so big that you're going to have to re-factor and make far-sighted decisions that mean front-loading of expected work; making extensible code. Otherwise you are going to waste vast quantities of time re-writing every time you're game has new needs, and the temptation will be to fudge on the quality of the code, which in turn will most probably lead to you up giving up as the tedium and confusion comes to a mind-bending crescendo of inefficiency. In addition, abstracting your work is the smart decision for not wasting time on future projects. [editline]15th November 2010[/editline] Note that I do not mean you should write an engine that handles tasks specifically for future games, or any feature that is unlikely to be needed in the current project.
[QUOTE=Richy19;26079142]Good news for me, we are using C# and XNA in our games development class not Java :v:[/QUOTE] Honestly I don't like either of them :v: C++ 4 lyfe If I had to pick though I'd go with Java. [editline]15th November 2010[/editline] [QUOTE=Richy19;26079275]TBH I wouldn't of mind using C# and direct X for it. Its just I couldn't use LWJGL as [B]the computers don have openGL[/B] and a Java game without LWJGL would suck.[/QUOTE] How can this be...
Really? I can barely stand java, C# seems like a language that doesn't actively try to stop me from being creative in my programmming. Although I would agree that I would prefer neither. Right now I'm loving Python, and of course C++, my first language.
[QUOTE=gparent;26079995]I think you'll find that Resharper has an options menu filled with choices for you to take.[/QUOTE] I can't be bothered to try and decipher all their options. Also some I am sure are bugs. Like new Holder() typing in new Exception( results in new Holder(new Exception)(
But doesn't Java run in a VM? By which I mean, it can run on practically any platform with little modification to the code?
Is Java actually slow or is it just shit programmers? In my experience, Java programs always seem to run really slowly.
[QUOTE=BlkDucky;26080303]But doesn't Java run in a VM? By which I mean, it can run on practically any platform with little modification to the code?[/QUOTE] Flash runs in a VM :downs:
[QUOTE=CarlBooth;26080401]Is Java actually slow or is it just shit programmers? In my experience, Java programs always seem to run really slowly.[/QUOTE] More than likely shit programmers (or programmers who don't program in a java friendly way), although I have seen some compelling articles about java's slowness in some areas.
[QUOTE=CarlBooth;26080401]Is Java actually slow or is it just shit programmers? In my experience, Java programs always seem to run really slowly.[/QUOTE] That could be a number of things that have nothing to do with programmers or the speed of java. In any case having a discussion on the speed of java is sure to cause an argument, even if we really try not to.
[QUOTE=BlkDucky;26080303]But doesn't Java run in a VM? By which I mean, it can run on practically any platform with little modification to the code?[/QUOTE] C# normally runs in a VM also. And C++ can easily be made to be run on LLVM, too.
[QUOTE=CarlBooth;26080401]Is Java actually slow or is it just shit programmers? In my experience, Java programs always seem to run really slowly.[/QUOTE] It's about the same speed as C#.
[QUOTE=Robber;26080881]It's about the same speed as C#.[/QUOTE] Actually, it isn't. C# has been proven faster before. Depending on the platform used, of course.
[QUOTE=Jallen;26080130] How can this be...[/QUOTE] Microsoft dropped openGL support in vista and haven't added it back in. Usually you get openGL back simply by installing your graphics card drivers but our IT support guys are shit and have just left the windows drivers on the computers
[QUOTE=geel9;26080432]Flash runs in a VM :downs:[/QUOTE] And that's related to his post... how?
Woo scoring [media]http://www.youtube.com/watch?v=Qa4XjYZTsJI[/media] If you collide with the actual enemy (i.e. die) the only penalty at the moment is turning the enemy red (maybe he's angry) [editline]15th November 2010[/editline] [IMG]http://i54.tinypic.com/2ebvn2b.png[/IMG]
[QUOTE=Richy19;26081065]Microsoft dropped openGL support in vista and haven't added it back in. Usually you get openGL back simply by installing your graphics card drivers but our IT support guys are shit and have just left the windows drivers on the computers[/QUOTE] Wait, what?
Microsoft dicided everyone should use DirectX so they screwed up OpenGL on vista
[QUOTE=Tobba;26081494]Microsoft dicided everyone should use DirectX so they screwed up OpenGL on vista[/QUOTE] Quite a silly thing to do, I guess. Aren't more 3D applications written in OpenGL than DirectX anyway? Edit: Actually, it seems not.
Not now a days. When Microsoft announced that it was scrapping openGL loads of developers switched to directX and therefore most things are written in directX. openGL is starting to pick up thoght.
But OpenGL is the way to go, though, right? [editline]15th November 2010[/editline] [url]http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX[/url] Hmm.
[QUOTE=Richy19;26081705]When Microsoft announced that it was scrapping openGL loads of developers switched to directX and therefore most things are written in directX.[/QUOTE] Yeah, and then the faggots didn't scrap OpenGL after all. [QUOTE=BlkDucky;26081769]But OpenGL is the way to go, though, right? [editline]15th November 2010[/editline] [url]http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX[/url] Hmm.[/QUOTE] In my opinion, yes it is.
CSharp scripted quests! [csharp]namespace Scripts.Quests { public class FetchQuest : NPCQuest { private ushort myDungeonID; private DungeonPlot myTargetDungeon; private LootItem myQuestItem; protected override void SaveInternal( System.IO.BinaryWriter stream ) { base.SaveInternal( stream ); stream.Write( myDungeonID ); } protected override void Load( System.IO.BinaryReader stream ) { base.Load( stream ); myDungeonID = stream.ReadUInt16(); } protected override void OnClaim( NPC questGiver ) { base.OnClaim( questGiver ); myDungeonID = ( ushort )( World.Rand.Gen() * QuestGiver.Chunk.Dungeons.Length ); myTargetDungeon = QuestGiver.Chunk.Dungeons[ myDungeonID ]; myStages = new QuestStage[] { new QuestStage { ID = 1, Goal = "Go to the marked Dungeon", HasMapMarker = true, MarkedEntity = myTargetDungeon.Door, Map = World.Overworld, NextStages = new ushort[]{ 2 } }, new QuestStage { ID = 2, Goal = "Find the item", HasMapMarker = true, NextStages = new ushort[]{ 3 } }, new QuestStage { ID = 3, Goal = "Return the item", HasMapMarker = true, MarkedEntity = QuestGiver, Map = QuestGiver.Tile.Map, NextStages = new ushort[]{ 4 } }, new QuestStage { ID = 4, Complete = true } }; } public override void OnPlayerEnterInterior( Interior interior ) { base.OnPlayerEnterInterior( interior ); if( StageID == 1 && interior == myTargetDungeon.Interior ) Advance(); else return; myQuestItem = LootItem.GetRandom( World.Rand ); myQuestItem.MarkAsQuestItem( this ); List<Chest> chests = new List<Chest>(); foreach( Entity ent in interior.Entities ) if( ent is Chest ) chests.Add( ent as Chest ); Chest chosenChest = chests[ ( int )( World.Rand.Gen() * chests.Count ) ]; myStages[ 1 ].MarkedEntity = chosenChest; myStages[ 1 ].Map = interior; chosenChest.Inventory.AddItem( myQuestItem ); } public override void OnPlayerItemPickup( InventoryItem ent ) { base.OnPlayerItemPickup( ent ); if( StageID == 2 && ent == myQuestItem ) Advance(); } public override bool OnPlayerSpeakToQuestGiver() { UITextBox textBox = new UITextBox(); textBox.Width = Main.ScreenWidth - 16; textBox.Height = 32; textBox.Centre(); textBox.Move( 0, 64 ); switch( StageID ) { case 1: textBox.SetText( "Please go to the Dungeon and find my Generic Loot Item!", "large", Color.White ); break; case 3: if( World.Player.Inventory.Contains( myQuestItem )) { textBox.SetText( "Thank you so much! Have money!", "large", Color.White ); World.Player.Inventory.RemoveItem( myQuestItem ); World.Player.GiveMoney( 250 ); Advance(); } else goto default; break; default: textBox.SetText( "Did you find it in the Dungeon? Try looking again.", "large", Color.White ); break; } GameFrame.Frame.Child = textBox; return false; } } }[/csharp] I'll record a video of the quest in action soon, it has map navigation arrows and everything!
Sorry, you need to Log In to post a reply to this thread.