binary zoo
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 23, 2018, 05:26:33 PM

Login with username, password and session length
Search:     Advanced search
30179 Posts in 1158 Topics by 195 Members
Latest Member: dianeanderson
* Home Help Search Login Register
+  binary zoo
|-+  Binary Zoo
| |-+  Diary of a Game
| | |-+  The Binary Zoo Bog
Pages: 1 ... 13 14 [15] 16 17 ... 165 Go Down Print
Author Topic: The Binary Zoo Bog  (Read 607237 times)
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #210 on: March 31, 2008, 11:47:33 AM »

But I am curious however, why BunnyMonkey ?
It's just an in-joke.  Clue: BunnyMonkey!

Also, does this mean that once you get most of the behind the scenes you can start the real work, since luckily for you, most of your media is already there, unless you decide to increase it in resoloution to make it more HD friendly Cheesy.
That all depends on what I decide to write.  Increasing the resolution of the existing images is pretty unnecessary though as the resolution change isn't that big and at the current image res they will just appear slightly smaller meaning I can have more of them on screen.....possibly.

As far as books are concerned I have a friend...I say friend a really high ranking person in Microsoft/Lecturer at my local university who has written a handy little book for XNA and game creation. His name is Rob Miles www.robmiles.com check it out, he also runs a blog which he updates regularly.
lol.  That's the one XNA book I have so far.  I got it a week or two ago and read all of it before writing a single line of code.  It's a great book if you're coming at XNA knowing very little like me, but I already need something slightly more advanced.  Recommended for total noobs though. Smiley


Hold on, I don't think we are talking about the same thing here.....or rather we are but we are calling them by different names. ;P

When I say timer based code I'm not talking about timer based loops.  I mean calculating everything based on how much time has elapsed regardless of how many loops there have been.  So if an object moves 100 pixels in a second then I use the timer to calculate how far it should have travelled based on elapsed time since the last function/method/whatever call.

That way it doesn't really matter how often XNA calls the various Update & Draw loops, everything should look relatively smooth......which I think is what you meant. Smiley

Nah, we are talking about different things (I think).  The key is the 100 pixels per second.  My code has no concept of 'per second'.

I'm guessing you have code that does this sort of thing...

position += velocity * time since the last function/method/whatever.

Whereas my movement code is simply...

position += velocity.

What happens if drawing takes longer than 16.7 milliseconds (60 fps)?  I simply run through the update process again.  Now obviously this could result in cases where there are a different number of update calls called between draw calls so my movement would look jerky.  To stop this I have to do...

this.currentState = this.prevousState;
this.currentState = get new current state (movement, rotation, scalling, etc)
this.renderState = interpolate between previous and current states using the amount of 'left over frame time'


Here's the Flipcode artilce from way back that I based my loop on...
http://www.flipcode.com/archives/Main_Loop_with_Fixed_Time_Steps.shtml
Ah right. Well we end up with similar results but with very different methods.  I'm not sure that method would work for everything that I need though.  It's not just movement and rotation that I have timer based, it's everything from basic AI to the colour cycling of the text (yeah totally unnecessary but...) , and keeping track of that using currentState/previousState would be almost impossible IMO....or at least result in a load of extra code.

As with most things though, this is just the method I've developed over the years and I'm not going to recommend it to anyone else, especially when I know so little about XNA, but it works for me so far.

You seem to be taking to this XNA malarky like a duck to water. Nice one Smiley
Well I'm getting stuff done but god knows if I'm doing it the right way Smiley

Tip of the day!  Ensure you set compression to on in your XACT audio project - I went from 33 megs to 4! on the XBox and 8 on Windows doing this Smiley
http://blogs.msdn.com/mitchw/archive/2007/04/27/audio-compression-using-xact.aspx
Ah cool.  Audio will be the next think I tackle I think as I need to get sound into a project as soon as possible....and the one thing I am concerned about with XNA is the download size so anything that helps reduce that is great. Cheers Smiley

Logged

PaulCunningham
Playtester
200 XP
*
Offline Offline

Posts: 436



View Profile WWW
« Reply #211 on: March 31, 2008, 12:20:03 PM »

Ah right. Well we end up with similar results but with very different methods.  I'm not sure that method would work for everything that I need though.  It's not just movement and rotation that I have timer based, it's everything from basic AI to the colour cycling of the text (yeah totally unnecessary but...) , and keeping track of that using currentState/previousState would be almost impossible IMO....or at least result in a load of extra code.

The colour cycling (for me at least) doesn't affect my game objects so that just goes in the non deterministic part of my update loop that gets called as and when. 

I simply use a base class that stores common physical properties that affect gameplay.  So the code to keep track of previous state, lerping, etc is just in one place.  I do have to do a bit more coding and I'm not 100% happy with my current implementation but it works well enough in practice.

As with most things though, this is just the method I've developed over the years and I'm not going to recommend it to anyone else, especially when I know so little about XNA, but it works for me so far.
Oh yeah definitely, I'm not advocating you change your engine to be like mine - hehe.
Logged

Cheers,
Paul Cunningham
Pumpkin Games
JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #212 on: March 31, 2008, 01:21:31 PM »

I get the BunnyMonkey, but why do you refer your adventures to be the same as BunnyMonkey's adventures ? Thats what seriously puzzles me, and heck, what is a Bunny Monkey ? In real life Huh

Small world, eh ? The one book I recommend is the one book you have, the chances of that are rather unlikely, If I were to make a bet on you having that book, I would've lost because I presumed you didn't have it. Little did you know, that guy in real life is nearly 7 foot tall ! Whoa. Lol.

So sound will be your next big obstacle ? Good good.

Also if things are smaller and you do decide to throw more stuff around on screen, that'll be crazy ! But decidedly fun.

Another thing I was wondering is... where are you finding all of this new found time to program ? I'm not complaining but...you never have time to program, ever ! Let alone learn a new language then crush other XNA members into the ground ! No offense Paul  BunnyMonkey!
Logged
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #213 on: March 31, 2008, 09:08:23 PM »

The colour cycling (for me at least) doesn't affect my game objects so that just goes in the non deterministic part of my update loop that gets called as and when. 
Well saying my colour cycling was linked to the timer was a bit of a red herring.  It is, but only because it uses one of the counters that I use for a number of things ( I have a SIN+, SIN-, COS+ & COS- counters that I use for anything that has to "cycle") Again that's probably OTT but it makes things a lot easier for me.

eg (pseudo):
Color.r = SIN+ * 255
Color.g = SIN- * 255
Color.b = COS+ * 255

I'm doing most things the way I always have done though so as I become more comfortable with OOP and familiar with XNA I'll go back and change things.

All my timer based stuff is done using one method....

eg (pseudo):
Position = Position + TimerValue( distance )

...so if I find this is unnecessary the for a quick fix I can just have that TimerValue method return the same value that's passed into it.

I know this is all basic stuff but it actually helps me to confirm my reasoning behind certain decisions if I write it all down. Smiley

I get the BunnyMonkey, but why do you refer your adventures to be the same as BunnyMonkey's adventures ? Thats what seriously puzzles me, and heck, what is a Bunny Monkey ? In real life Huh
I wish I hadn't mentioned BunnyMonkey now Tongue  You weren't supposed to understand it, that's why I said it was an in-joke with las6 being possibly the only other person that would understand it.

There is no such thing as a Bunny Monkey obviously, but my graphics were so bad that las6 thought my little monkey was really a bunny and named the original file accordingly.  That's the strange thing about the internet.  There are a load of really weird and unexplained things on it and mostly people just accept them for what they are....like some peoples strange usernames for example  Smiley

Another thing I was wondering is... where are you finding all of this new found time to program ? I'm not complaining but...you never have time to program, ever ! Let alone learn a new language then crush other XNA members into the ground ! No offense Paul  BunnyMonkey!
I didn't have much time when I was working but now I'm on the sick I need to be doing something constructive when I can otherwise I'll go raving mad.  There's only so much daytime TV a man can watch.

Let alone learn a new language then crush other XNA members into the ground ! No offense Paul  BunnyMonkey!
Hardly.  I wouldn't be doing this without Paul's encouragement and he'll no doubt be helping me a lot on the more advanced areas of XNA (shhh though because he doesn't know that yet Wink )



RIP BunnyMonkey - Day 4
No progress to report today as I've been out, but in response to the earlier confusion he caused, BunnyMonkey has been taken out back and shot.  Smiley
« Last Edit: March 31, 2008, 09:09:58 PM by fog » Logged

JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #214 on: March 31, 2008, 09:23:47 PM »

Funny stuff, I now fully understand BunnyMonkey, he can return if you so wish ! Great to hear that you are progressing... I'll continue to post my commentations on each of your blog updates too !

Incase you were wondering where my username originated, i'll tell you.
J is the first initial in my name, i.e my first names initial.
D is my second names initial
og finishes Dog nicely.
053, well 53 is my house number !
Logged
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #215 on: April 01, 2008, 02:26:28 PM »

Incase you were wondering where my username originated, i'll tell you.
J is the first initial in my name, i.e my first names initial.
D is my second names initial
og finishes Dog nicely.
053, well 53 is my house number !
Good job you calrified that or I may have mistaken you for the JDog at No.52  BunnyMonkey!
Logged

JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #216 on: April 01, 2008, 06:57:15 PM »

Incase you were wondering where my username originated, i'll tell you.
J is the first initial in my name, i.e my first names initial.
D is my second names initial
og finishes Dog nicely.
053, well 53 is my house number !
Good job you calrified that or I may have mistaken you for the JDog at No.52  BunnyMonkey!

Lol now that got me laughing ! Also just JDog on its own is already taken.

So how goes BunnyMonkey's adventure on day 5 ?   BunnyMonkey!
Logged
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #217 on: April 02, 2008, 07:48:28 PM »

Let There Be Sound - Day 5

Well on first hearing about it, I thought the idea of having to use XACT to handle sound in XNA was an unnecessary complication.  As it happens on further investigation it turns out it works in almost exactly the same way as the sound scripts and engine I'd previously written in DBPro with a lot of the same options built in.  Not only does that mean it was easy to get to grips with, but it also means I don't have to port my old audio code to recreate the system I had been using.....it's mostly already there for me. Smiley

After a little while messing about with the XACT software itself, I had a sound library I could load into XNA, and a quick class and a couple of extra variables and methods later and we have sound.  Awesome.

The only thing I couldn't quite get working was adjusting the sound balance.  Setting the variable in XNA that I thought would handle this seems to result in all the sound coming out of one speaker or the other and not slowly fading between the two.  No doubt I'm doing something stupid but I can't complain as I've made satisfying progress without needing much code.

I'm really liking this so far.  Due to the sheer size of XNA, finding the necessary classes and methods sometimes requires a bit of investigation work but once you find what you're looking for they appear to have covered everything you could possibly need.
Logged

JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #218 on: April 02, 2008, 07:54:07 PM »

Good to hear ! So other than solve the sound problem you are having at the moment,

what do you plan to continue onto next ? i.e what'll you be coding next ?
Logged
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #219 on: April 03, 2008, 11:45:11 AM »

So other than solve the sound problem you are having at the moment...
I was adjusting sound panning in Tension, but I hadn't used it in any other games so I can easily work without it for now.  Any sensible person would fix it but I don't want to get held up by any minor problems just now.

what do you plan to continue onto next ? i.e what'll you be coding next ?
I doubt I'll be able to do anything today, but I might try and get an image on screen next.  I hear images are quite important when writing games.  BunnyMonkey!
Logged

JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #220 on: April 03, 2008, 09:45:02 PM »

How did the image on screen go today Fog ?

Also Fog, I do hope XNA goes well, then you publish a hyper successful game through XNA and big bucks, because its what you and the Binary Zoo team deserve ! Freeware to LLC would be great ! My fear is that you see this as a hobby and you wouldn't like to make the jump and live off of your hobby ?
Logged
fog
Zookeeper
1000 XP
*
Offline Offline

Posts: 13185



View Profile WWW Email
« Reply #221 on: April 03, 2008, 10:11:59 PM »

How did the image on screen go today Fog ?
It didn't, as I suggested earlier Smiley  Too tired and coding while tired isn't a good idea.

Also Fog, I do hope XNA goes well, then you publish a hyper successful game through XNA and big bucks, because its what you and the Binary Zoo team deserve ! Freeware to LLC would be great ! My fear is that you see this as a hobby and you wouldn't like to make the jump and live off of your hobby ?
Woah slow down.  I'm just evaluating XNA here and a long way off releasing anything on PC or 360....and there's every chance that if I do it will be freeware anyway.  We certainly don't have any plans for anything different ATM.
Logged

JDog053
Playtester
1000 XP
*
Offline Offline

Posts: 2422


View Profile
« Reply #222 on: April 03, 2008, 10:54:54 PM »

Lol I did get a bit carried away...i'll cool it for a few days. I should really get back to working on some of my flash titles really.

Its also not good to code when you are tired, very right indeed. Basically enjoy and use each day as it comes. I do also hope that whatever illness it is you have, you get better from it and are made physically stronger and mentally smarter as a result.
Logged
PaulCunningham
Playtester
200 XP
*
Offline Offline

Posts: 436



View Profile WWW
« Reply #223 on: April 04, 2008, 12:15:22 AM »

Bloody hell, if I didn't code when tired I'd never do any.  I've been permanently shattered for about 2 1/2 years now.  Little people keep waking me up at night Smiley
Logged

Cheers,
Paul Cunningham
Pumpkin Games
SiN
Escaped from The Zoo
500 XP
*
Offline Offline

Posts: 683


Caffeine Monster Software


View Profile WWW
« Reply #224 on: April 04, 2008, 12:59:55 AM »

Bloody hell, if I didn't code when tired I'd never do any.  I've been permanently shattered for about 2 1/2 years now.  Little people keep waking me up at night Smiley
QFT. Smiley

I go to work, code for 8 hours, then come home, and code for another couple of hours. I have no idea how I actually pull this off. Smiley


Mo
Logged

binary zoo mobile developer | 32x32 . duotrix . geomex . smiley's shooty adventure . by caffeine monster software | my blog
Pages: 1 ... 13 14 [15] 16 17 ... 165 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!