I was getting 9-12 FPS on my XNA game and tried optimising what I thought was a bit sloppy and it didn't help.
Turns out though, Running my game from the "Start debug" command in Visual studio kills the FPS, Running the release copy, standalone, gets 32-35FPS.
Still not great, though.
[QUOTE=esalaka;25071835]:raise:[/QUOTE]
so that*
I mean that I doubt that MS would add something bad, botching C#/CLI resulting in devs not wanting to upgrade to that version.
[QUOTE=ZeekyHBomb;25072407]so that*
I mean that I doubt that MS would add something bad, botching C#/CLI resulting in devs not wanting to upgrade to that version.[/QUOTE]
Even so, you could still use C# 2.0 with CLI 4.0 and vice versa.
[QUOTE=Tezzanator92;25072088]I was getting 9-12 FPS on my XNA game and tried optimising what I thought was a bit sloppy and it didn't help.
Turns out though, Running my game from the "Start debug" command in Visual studio kills the FPS, Running the release copy, standalone, gets 32-35FPS.
Still not great, though.[/QUOTE]
2D or 3D?
Invertebrate Combat runs at 55-60 and there is quite a lot going on with the map/particles/worms/UI.
2D.
The Profiler in VS is saying the spritebatch constructor in my Grid-Drawing Draw call is accounting for 43% of the load :S
[cpp]
public void Draw(GameTime gametime)
{
SpriteBatch spritebatch = new SpriteBatch(game.GraphicsDevice);
spritebatch.Begin();
[/cpp]
I knew creating a spritebatch was slow, but it can't be THAT slow can it? - I do limit when I create a batch.
I'm wondering if I just over estimate my laptop, What FPS do you get on this? (Assuming you have a way to show the FPS and it even runs!)
[url]http://dl.dropbox.com/u/286964/OpenST1.zip[/url]
[QUOTE=Tezzanator92;25074376]2D.
The Profiler in VS is saying the spritebatch constructor in my Grid-Drawing Draw call is accounting for 43% of the load :S
[cpp]
public void Draw(GameTime gametime)
{
SpriteBatch spritebatch = new SpriteBatch(game.GraphicsDevice);
spritebatch.Begin();
[/cpp]
I new creating a spritebatch was slow, but it can't be THAT slow can it? - I do limit when I create a batch.
I'm wondering if I just over estimate my laptop, What FPS do you get on this? (Assuming you have a way to show the FPS and it even runs!)
[url]http://dl.dropbox.com/u/286964/OpenST1.zip[/url][/QUOTE]
60 Solid.
Also, don't make a new spritebatch every draw(), make one and re-use it.
That would explain it, I was somehow lead to believe you needed to instantiate them inside a draw call.
I'll see how this helps!
[b]Edit:[/b]
Up to 49 FPS :D
[QUOTE=Tezzanator92;25074556]That would explain it, I was somehow lead to believe you needed to instantiate them inside a draw call (Or a create a new one each time).
I'll see how this helps![/QUOTE]
If you want to be really anal you could set one up at the GameComponent level and re-use it in all the sub-classes.
Just learning directx programming and happy i have a working fps camera that can jump :)
[url]http://www.youtube.com/watch?v=75kBE91-6A8[/url]
[QUOTE=polkm;25071267].NET is backed by Microsoft and Microsoft isn't a company that drops a lot of project.[/QUOTE]
Okay, .NET isn't as scary as people think it is, but that's no reason to say things like this that clearly aren't true.
Microsoft does their fair share of project dropping, and they spend an extraordinary amount of time buying out entire teams/companies to incorporate them in Microsoft Research where no one hears about it ever again unless the project is really, really really good.
[QUOTE=gparent;25075637]Okay, .NET isn't as scary as people think it is, but that's no reason to say things like this that clearly aren't true.
Microsoft does their fair share of project dropping, and they spend an extraordinary amount of time buying out entire teams/companies to incorporate them in Microsoft Research where no one hears about it ever again unless the project is really, really really good.[/QUOTE]
For example PhotoSynth. The Photo Tourism project could've been really good.
[QUOTE=gparent;25075637]Okay, .NET isn't as scary as people think it is, but that's no reason to say things like this that clearly aren't true.
Microsoft does their fair share of project dropping, and they spend an extraordinary amount of time buying out entire teams/companies to incorporate them in Microsoft Research where no one hears about it ever again unless the project is really, really really good.[/QUOTE]
Exactly, 'their fair share' what I wish to point out that just because it is microsoft, there is no reason to avoid the library, Also they are much less likely to drop something that is currently out there, and popular.
[QUOTE=looped;25067573]How did you do your line numbering?[/QUOTE]
I'm using Scintilla.NET
Turb I know you're all good with Reflection, and well, I need help with reflection.
I'm trying to have my engine load my client through reflection and it doesn't seem to know that I'm deriving my class from IPlugin. So
[code]IPlugin ip = (IPlugin)Activator.CreateInstance(t);[/code]
throws a casting error (Additional information: Unable to cast object of type 'Plugin.Client' to type 'Plugins.IPlugin'.).
By the way, [code]typeof(IPlugin).IsAssignableFrom(t))[/code] returns false.
I've been working on a new game mode for Zombie Outrage 2. It's survival.
Survival is exactly what it is. You have to survive. It's currently an alpha state, but it's pretty fun. For me at least :P
So what make's it challenging?
As with any game, the thing that makes it fun, is giving a fun challenge, but step the player up gradually. That's where I used the lighting system to my advantage. As each horde is released, the world gets darker. It's not shown in the video (down below), but when the world gets as dark as it can get, the next horde reset's it to light again. This allows the player to take a good break from the darkness and try to get back in the zone. I don't want to completely torment the player forever. :P
So here's the video. Thanks for watching, and enjoy. : )
[media]http://www.youtube.com/watch?v=yqevp2997yU[/media]
You've made some impressive progress with the code base, I think it has quite bit of potential. However, I do think that many improvements could be made to the actual implementation, specifically I think that you need an actual map rather than a infinite plain. The light effects are great but aren't used to alter the game rules at all, I think you should make it so the game starts out full dark, which would mean slowing the zombies down to give the player some time to think.
Also removing the extra zombies is sorta strange, I'd say you should find a better way to avoid massive groups of zombies and just stop spawning them when you reach a certain amount.
Of course it's your game and my advice is a little generic; I encourage you to come up with creative solutions to the problems I've pointed out.
[QUOTE=RyanDv3;25079195]You've made some impressive progress with the code base, I think it has quite bit of potential. However, I do think that many improvements could be made to the actual implementation, specifically I think that you need an actual map rather than a infinite plain. The light effects are great but aren't used to alter the game rules at all, I think you should make it so the game starts out full dark, which would mean slowing the zombies down to give the player some time to think.
Also removing the extra zombies is sorta strange, I'd say you should find a better way to avoid massive groups of zombies and just stop spawning them when you reach a certain amount.
Of course it's your game and my advice is a little generic; I encourage you to come up with creative solutions to the problems I've pointed out.[/QUOTE]
Will do Ryan, will do. And thanks for the advice, I really do use it. Before the lights were just circles, but some recommended to make them better so now they're dynamic.
But I will try to come up with creative ideas. Thanks for the support. :)
[QUOTE=DevBug;25078048]Turb I know you're all good with Reflection, and well, I need help with reflection.
I'm trying to have my engine load my client through reflection and it doesn't seem to know that I'm deriving my class from IPlugin. So
[code]IPlugin ip = (IPlugin)Activator.CreateInstance(t);[/code]
throws a casting error (Additional information: Unable to cast object of type 'Plugin.Client' to type 'Plugins.IPlugin'.).
By the way, [code]typeof(IPlugin).IsAssignableFrom(t))[/code] returns false.[/QUOTE]
Is IPlugin declared in your host assembly, and does the plugin reference the host assembly?
I had a similar problem where they were each referencing a different copy of the same assembly. Output the paths and make sure they're the same.
[QUOTE=turb_;25079508]Is IPlugin declared in your host assembly, and does the plugin reference the host assembly?[/QUOTE]
IPlugin is declared in both.
[QUOTE=turb_;25079508]Does the plugin reference the host assembly?[/QUOTE] Saying that I should us IPlugin from the host? Never though of that :P (Facepalm worthy)
They both need to be talking about the same type.
[editline]12:38PM[/editline]
IPlugin in one assembly =/= IPlugin in another.
[QUOTE=turb_;25080020]They both need to be talking about the same type.
[editline]12:38PM[/editline]
IPlugin in one assembly =/= IPlugin in another.[/QUOTE]
Thanks Turb & Ortzinator
Derp
this post sucked
Game Maker in Programming?
:ohdear:
[QUOTE=esalaka;25083082]Game Maker in Programming?
:ohdear:[/QUOTE]
I suck too much for anything else at this moment. :smithicide:
Well, i guess i could pull out the ol' Visual Studio. Maybe if i grapple a while something'll click, but all i know how to do in any of the languages VS covers is make some text boxes and buttons what don't actually do anything...
Is there a "Visual Basic for lobotomized children with severe brain damage" out there?
Marshalling of static type members (including enums):
[img]http://ahb.me/wYw[/img]
[editline]03:52PM[/editline]
Properties:
[img]http://ahb.me/wYy[/img]
[editline]03:54PM[/editline]
And calling .NET methods with user values (Kari wrappers for objects that can't be sensibly marshalled to some sort of Kari value)
[img]http://ahb.me/wYF[/img]
[editline]03:58PM[/editline]
oh god what have i done
[img]http://ahb.me/wYI[/img]
Just finished up my NXC/NQC(C based language for Lego Mindstorm robots) code. We just recently started programming (but I have some experience, not saying I'm any good or so. I just understand the basics pretty well).
My code makes the NXT robot I built follow a black tape. I can draw out a course and it will make it. Unfortunately it can't do 2 inverted 90-degrees turns.
For those who are interested, here is the code:
[code]
int taskCount;
int Adjust = -5;
int MotorPwr = 50;
int MotorPwrT = 30;
int TapeLight = 40;
long time = 0;
int maxTime = 20000;
int dir;
task tape5()
{
if (taskCount == 5) { ClearScreen(); }
while (true)
{
if (taskCount == 5)
{
TextOut(0, LCD_LINE2, "Could not find the tape, stopping robot!");
Off(OUT_BC);
taskCount = 0;
}
}
}
task tape4()
{
while (true)
{
if (taskCount == 4)
{
if (Sensor(IN_3) < TapeLight)
{
OnFwd(OUT_BC, MotorPwr);
time = CurrentTick();
dir = 0;
taskCount = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time >= 3200)
{
OnFwd(OUT_B, MotorPwrT);
OnRev(OUT_C, MotorPwrT);
dir = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time <= 6400)
{
OnRev(OUT_B, MotorPwrT);
OnFwd(OUT_C, MotorPwrT);
dir = -1;
}
else
{
taskCount = 5;
}
}
}
}
task tape3()
{
while (true)
{
if (taskCount == 3)
{
if (Sensor(IN_3) < TapeLight)
{
OnFwd(OUT_BC, MotorPwr);
time = CurrentTick();
dir = 0;
taskCount = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time >= 1600)
{
OnFwd(OUT_B, MotorPwrT);
OnRev(OUT_C, MotorPwrT);
dir = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time <= 3200)
{
OnRev(OUT_B, MotorPwrT);
OnFwd(OUT_C, MotorPwrT);
dir = -1;
}
else
{
taskCount = 4;
}
}
}
}
task tape2()
{
while (true)
{
if (taskCount == 2)
{
if (Sensor(IN_3) < TapeLight)
{
OnFwd(OUT_BC, MotorPwr);
time = CurrentTick();
dir = 0;
taskCount = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time >= 800)
{
OnFwd(OUT_B, MotorPwrT);
OnRev(OUT_C, MotorPwrT);
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time <= 1600)
{
OnRev(OUT_B, MotorPwrT);
OnFwd(OUT_C, MotorPwrT);
}
else
{
taskCount = 3;
}
}
}
}
task tape()
{
while (true)
{
if (taskCount == 1)
{
if (Sensor(IN_3) < TapeLight)
{
OnFwd(OUT_BC, MotorPwr);
time = CurrentTick();
dir = 0;
taskCount = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time <= 400)
{
OnFwd(OUT_B, MotorPwrT);
OnRev(OUT_C, MotorPwrT);
dir = 1;
}
else if (Sensor(IN_3) > TapeLight+Adjust && CurrentTick() - time <= 800)
{
OnRev(OUT_B, MotorPwrT);
OnFwd(OUT_C, MotorPwrT);
dir = -1;
}
else
{
taskCount = 2;
}
}
}
}
task debugger()
{
//string TaskS = NumToStr(taskCount);
//string timeS = NumToStr(time);
//string LightS = NumToStr(Sensor(IN_3));
while (true)
{
string TaskS = NumToStr(taskCount);
string timeS = NumToStr(time);
string LightS = NumToStr(Sensor(IN_3));
TextOut(0, LCD_LINE2, "Task Count:" + " " + TaskS);
TextOut(0, LCD_LINE3, "Time:" + " " + timeS);
TextOut(0, LCD_LINE4, "Light:" + " " + LightS);
}
}
task main()
{
Precedes(tape,tape2,tape3,tape4,tape5,debugger);
taskCount = 1;
SetSensorLight(IN_3);
//RotateMotor(OUT_BC, MotorPwr, 360);
}
[/code]
This might not be the best solution. But it works pretty well, for those who wants a deeper explanation just PM me and I'll explain for you. NXC, Not eXactly C is a very simple language, even easier if you know C. As I know a little bit since I started with it. If you search on it, you can find really good documentation about it and everything you need.
I used Brixc Command Center for my editor. Works really well, but the complier ain't the best. But if you have experience in C, it will be easy as cake.
There is loads of other programs/languages you can use to code your NXT/Mindstorm robot, but of those I tried, the one I felt the most comfortable with was NXC.
Makes me want to dig out my Mindstorms 1.5 set (Complete with old style RCX and serial IR tower hehe).
Finally decided how the interface should work for adding "Bugs":
[img_thumb]http://dl.dropbox.com/u/286964/Yaymixer.jpg[/img_thumb]
[QUOTE=RyanDv3;25079195]You've made some impressive progress with the code base, I think it has quite bit of potential. However, I do think that many improvements could be made to the actual implementation, specifically I think that you need an actual map rather than a infinite plain. The light effects are great but aren't used to alter the game rules at all, I think you should make it so the game starts out full dark, which would mean slowing the zombies down to give the player some time to think.
Also removing the extra zombies is sorta strange, I'd say you should find a better way to avoid massive groups of zombies and just stop spawning them when you reach a certain amount.
Of course it's your game and my advice is a little generic; I encourage you to come up with creative solutions to the problems I've pointed out.[/QUOTE]
Give zombies a sort of "hunger". The hungrier they are the faster they are but when they are hungry their health drains. So all the zombies in the middle would move quite fast but easily die of starvation.