GAFs Amateur Devs Chronicles

Lathentar said:
Where is base being set to non-null?
Eh, I don't understand your question. It's not base though that is giving the Object Reference error, it's the paddle reference. I'm not completely in tune with the terminology yet though :(
 
The problem is in the paddle class, you have:

Code:
public void Update(GameTime gametime)
        {
            Position.Y = TitleSafe.Bottom - 10;
            Position.X = UpdateMouseX();
            base.Update(gametime);
        }
the base.Update(gametime) line is messing up your program, delete it and it works.
 
Also, don't go OTT with the OOP if you don't really understand inheritance etc. I haven't used inheritance once.

Oh and also, you know that you are using XNA 1.0 rather than the newer 2.0?
 
I just got the same result as The Friendly Monster. He beat me to it. Though you have more errors in there, you'll just have to continue debugging and coding :)

When in doubt, put a break point in your code and use f10 and f11 to step in and step over your code. It's the ultimate for debugging :)
 
So does anyone have any idea on how I might implement pathing? It would be really simple to just create a vector from the enemy towards the player, but that doesn't take into account any walls... I could use something like A* but I have no clue how fast it would calculate a path and if it would slow the game down since there might be like 40 or 50 of these paths being calculated each refresh.
 
xblarcade said:
I am using XNA... thanks for that link :D

edit: the only thing I'm wondering is if I can do just a few paths since many of them will be almost exactly the same, with just a few minor changes since the enemies will be coming in swarms... stuff to work on tonight :lol

edit#2: I can't ever seem to open any one else's projects... Double clicking on the VS solution gives me an error stating the project type is not supported by this installation.
 
Yea it looks like I have the very same error with the spritebatch. Thanks for the help guys!

"don't go OTT with the OOP"
I don't know what either of those acronyms mean. :lol
 
WhatRuOn said:
Yea it looks like I have the very same error with the spritebatch. Thanks for the help guys!

"don't go OTT with the OOP"
I don't know what either of those acronyms mean. :lol
Over the top with the object oriented programming.

As for the spriteBatch error, you need
spriteBatch = new SpriteBatch(GraphicsDevice);

then in the draw
paddlesprite.Draw(this.spriteBatch);
should be
paddlesprite.Draw(spriteBatch);
i think.

then in your sprite class its the texture that hasn't been initialized. I wouldn't bother with that content manager stuff. I doubt you'll have too many resources to just initialize them when you invoke a class.

I'd recommend getting xna 2.0, and starting afresh, keeping things simpler.

Also should sprite be inheriting from Game1? that sounds a bit weird to me.
 
WhatRuOn said:
Yea it looks like I have the very same error with the spritebatch. Thanks for the help guys!

"don't go OTT with the OOP"
I don't know what either of those acronyms mean. :lol

I'm pretty sure it means Over The Top on Object Oriented Programming

Since you've got everything in one class (or so it seems), that's really not somthing your going to have to worry about.
 
Alright I'll download XNA 2.0 on my home office PC and start over. But isn't it good practice to have objects like I did. I probably wasn't doing it correctly, but isn't having a class for sprites, balls, and paddles a good idea?
 
WhatRuOn said:
Alright I'll download XNA 2.0 on my home office PC and start over. But isn't it good practice to have objects like I did. I probably wasn't doing it correctly, but isn't having a class for sprites, balls, and paddles a good idea?
Yeah it's definitely good to have a paddle class and a ball class, I dunno about a sprite class, I haven't anything with a massive number of sprites, but what you had looked pretty weird to me where the paddle class was inheriting from the sprite class and that was inheriting from the Game1 class, there's definitely a lot of ways of doing things though.
 
The Friendly Monster said:
Yeah it's definitely good to have a paddle class and a ball class, I dunno about a sprite class, I haven't anything with a massive number of sprites, but what you had looked pretty weird to me where the paddle class was inheriting from the sprite class and that was inheriting from the Game1 class, there's definitely a lot of ways of doing things though.
Yea I could be doing things wrong. I'm just going off what I learned in one of the books I read and the SpaceWar example that comes with the studio. But i probably have a lot to learn about polymorphism and inheritance still.
 
Does XNA 2.0 work with VS2008? Is there a hack around it? I dont want to have 2 separate version of VS in my computer.
 
The Friendly Monster said:
gcoope at gmail (.com).
That doesn't work.

See: http://www.google.ca/search?hl=en&s...l&hs=WSs&q=gcoope*gmail*com&btnG=Search&meta=

Use the @ sign so they can't pick up your email with a google search.

godhandiscen said:
Does XNA 2.0 work with VS2008? Is there a hack around it? I dont want to have 2 separate version of VS in my computer.
Express/2005 will share resources with the other version, so it won't be all that big on your drive.

2005 is supported.
2008 is not supported.

With a bit of rejigging, you can get it working for Windows games, but not Xbox games.
http://forums.xna.com/thread/51780.aspx
 
Slavik81 said:
That doesn't work.

See: http://www.google.ca/search?hl=en&s...l&hs=WSs&q=gcoope*gmail*com&btnG=Search&meta=



Express will share resources with the other version, so it won't be all that big on your drive.

2005 is supported.
2008 is not supported.

With a bit of rejigging, you can get it working for Windows games, but not Xbox games.
http://forums.xna.com/thread/51780.aspx
I am installing the XNA 3.0 CTP now, hopefully that will work. I dont really mind the drive space, is just the whole process of installing VS2005 that bothers me.
 
While this thread is relatively busy there's a favour I'd like to ask. Is the music in time with the beat for you on this game?

http://gcoope.googlepages.com/Plus_0_1.zip

The buttons are wsad and updownleftright and return.

Basically the first beat of each bar should come when the ticker crosses the bottom line, also the middle block thing should pulse.

It works fine on my two computers, but last week at my mates house it seemed all messed up, the only problem is I tried it when I was pissed, so I don't know how much of it was that.
 
The Friendly Monster said:
While this thread is relatively busy there's a favour I'd like to ask. Is the music in time with the beat for you on this game?

http://gcoope.googlepages.com/Plus_0_1.zip

The buttons are wsad and updownleftright and return.

Basically the first beat of each bar should come when the ticker crosses the bottom line, also the middle block thing should pulse.

It works fine on my two computers, but last week at my mates house it seemed all messed up, the only problem is I tried it when I was pissed, so I don't know how much of it was that.
gtg to school already, but i'll check it like at 1:00AM (when I get off my job).


arrghhh gotta install VS2005 since XNA3.0 doesnt support 360 projects yet.
 
Going to uninstall everything and get rid of VS2k8 and see if just an install of VC#2005 and XNA and see if that fixes the problems of not being to open any other peoples programs ever :(

Also, are there any differences between installing XNA 1.0, 2.0 and whatever other versions there are?
 
godhandiscen said:
I am installing the XNA 3.0 CTP now, hopefully that will work. I dont really mind the drive space, is just the whole process of installing VS2005 that bothers me.
Didn't know there was an xna 3.0 you could download yet. Unfortunately looking at the changelog they haven't fixed anything I cared about or added anything I'm interested in, besides vs2008 support.
 
The Friendly Monster said:
While this thread is relatively busy there's a favour I'd like to ask. Is the music in time with the beat for you on this game?

http://gcoope.googlepages.com/Plus_0_1.zip

The buttons are wsad and updownleftright and return.

Basically the first beat of each bar should come when the ticker crosses the bottom line, also the middle block thing should pulse.

It works fine on my two computers, but last week at my mates house it seemed all messed up, the only problem is I tried it when I was pissed, so I don't know how much of it was that.
Would be cool if someone could help me out with this.
 
The Friendly Monster said:
Would be cool if someone could help me out with this.

I can't seem to open the .exe. Sorry, I know you've probably already covered this, but how can I open a .exe file like that? When I do it on my project it crashes too!
 
The Friendly Monster said:
Are you extracting the whole folder rather than running from inside the zip file? If so then try running http://xnamatrix.com/xnareq.php

I thought you were using XNA to program?

I am using XNA to program, but I've been able to just hit "run" in VS2005 C# to test my projects. When I say I haven't been frigging around with XNA bullshit, I mean just that ;D

Let me see if this downloader helps!
 
JasoNsider said:
I am using XNA to program, but I've been able to just hit "run" in VS2005 C# to test my projects. When I say I haven't been frigging around with XNA bullshit, I mean just that ;D

Let me see if this downloader helps!
That's what I do too, it sounds peculiar that the exe won't run if you have XNA installed, if you navigate to the bin->x86->debug folder and run the exe for your game in there, does that work?
 
The Friendly Monster said:
That's what I do too, it sounds peculiar that the exe won't run if you have XNA installed, if you navigate to the bin->x86->debug folder and run the exe for your game in there, does that work?

Ok, after running that install I was able to run your demo and can confirm that the beats definitely line up :) Well done! This is nice!

I have a question about resolution. I just sort of made up a resolution in widescreen for my game demo so far, but what resolution should I be using?
 
JasoNsider said:
Ok, after running that install I was able to run your demo and can confirm that the beats definitely line up :) Well done! This is nice!

I have a question about resolution. I just sort of made up a resolution in widescreen for my game demo so far, but what resolution should I be using?
If you want it on 360, 1280 * 720, if not it's up to you. It depends on whether you want the game played fullscreen or not, and whether you are fussy about having your sprites scaled etc. In a window you can have whatever resolution you like, fullscreen these are among the most common resolutions people use:

4:3

640*480
800*600
1024*768
1280*960
1600*1200


16:9

640*360
1024*576


16:10

1280*800

also see http://en.wikipedia.org/wiki/List_of_common_resolutions.


Thanks for testing the demo.
 
The Friendly Monster said:
If you want it on 360, 1280 * 720, if not it's up to you. It depends on whether you want the game played fullscreen or not, and whether you are fussy about having your sprites scaled etc. In a window you can have whatever resolution you like, fullscreen these are among the most common resolutions people use:

4:3

640*480
800*600
1024*768
1280*960
1600*1200


16:9

640*360
1024*576


16:10

1280*800

also see http://en.wikipedia.org/wiki/List_of_common_resolutions.


Thanks for testing the demo.


Yeah, we definitely want to run it on the 360 eventually, so that helps a lot. Thanks for the help :)
 
Ok while writing I've gone back and changed a couple of levels in pizzicati.

pizzicati 0.2.4

http://gcoope.googlepages.com/pizzicati_0_2_4.zip

- got rid of two levels, 7 and 20 in the last build. I thought these were both pretty weak.
- added 3 new levels, 5, 11, 20
- changed level 6 (previously 5) significantly, to make it easier, 14 cosmetically.

feedback on the new levels would be much appreciated, on how good they are, how easy and how out of place difficulty wise.

thanks a lot.
 
The Friendly Monster said:
Ok while writing I've gone back and changed a couple of levels in pizzicati.

pizzicati 0.2.4

http://gcoope.googlepages.com/pizzicati_0_2_4.zip

- got rid of two levels, 7 and 20 in the last build. I thought these were both pretty weak.
- added 3 new levels, 5, 11, 20
- changed level 6 (previously 5) significantly, to make it easier, 14 cosmetically.

feedback on the new levels would be much appreciated, on how good they are, how easy and how out of place difficulty wise.

thanks a lot.

I got around to finally playing the game and was taking some notes for you.

Great work! This is an awesome game. I really like what you've done here and appreciated many of the little things that are hard work but very often get glossed over.

5, 11, and 20 are all great levels. Level 11, though obvious in what you have to do, still requires quick thinking and timing. All in all

The way you handle the physics in this game is impeccable. It really just feels right. The ball reacts according the surroundings in the exact way that you expect it to. I noted a couple of trouble spots for myself though. Level 17 has been really, really tough. It probably has something to do with the exact timing necessary to get the ball into the goal-hoop on the last shot. I can get it to that shot very often, but making that final one is really more difficult than it should be.

On another note, the game also makes use of a key on the keyboard (right now) that I wish I didn't have to use so much! Level 22 especially. It's probably just that space bar is too big of a button and the keyboard on the laptop just doesn't feel like it has a spacebar that can handle this game for a long-ish time :P

The sounds were excellent and it jived well with the visuals. The color motif (blacks and whites with a splash of color) works well for this project. nice work! The sound coding must have been a bitch :P

Speaking of coding, I'm probably going to have to take some pointers from you because your physics are great! How did you do rolling and collision handling? The way I did the slopes in my game was really primitive. Without going over the huge details, basically I just "moved" the player to the hypotenuse of the triangle based on where they are on the X plane. You know? But you have full-on rolling down hill, and what's more, you have rolling over objects. That really impressed me. The ball can roll over a plunger object even if it's not perfectly flat and react accordingly. Any pointers you can give?

Again, great work!
 
JasoNsider said:
I got around to finally playing the game and was taking some notes for you.

Great work! This is an awesome game. I really like what you've done here and appreciated many of the little things that are hard work but very often get glossed over.

5, 11, and 20 are all great levels. Level 11, though obvious in what you have to do, still requires quick thinking and timing. All in all
Thanks a lot. 11 is there to kind of cement the idea of using a piston multiple times to get higher, not only when going vertically, in the player's mind.

The way you handle the physics in this game is impeccable. It really just feels right. The ball reacts according the surroundings in the exact way that you expect it to. I noted a couple of trouble spots for myself though.
Level 17 has been really, really tough. It probably has something to do with the exact timing necessary to get the ball into the goal-hoop on the last shot. I can get it to that shot very often, but making that final one is really more difficult than it should be.
I've tried to replicate this but I seem to get it in every time, is the ball hitting the little blob that keeps it in place at first? If so then I think you might be doing it slightly wrong, I'll have a look to see if I can make this more obvious.

On another note, the game also makes use of a key on the keyboard (right now) that I wish I didn't have to use so much! Level 22 especially. It's probably just that space bar is too big of a button and the keyboard on the laptop just doesn't feel like it has a spacebar that can handle this game for a long-ish time :P
Which button do you think would be better? I tried it with a mouse click but didn't really like it. Maybe try switching between using your fingers and your thumbs? (whichever you don't use now).

The sounds were excellent and it jived well with the visuals. The color motif (blacks and whites with a splash of color) works well for this project. nice work! The sound coding must have been a bitch :P
The coding was actually quite simple once I knew what I wanted to do, it's all about using irrklang rather than XACT (the microsoft engine). I'm a maths and classical music geek. Now synchronizing music with my other game was a bitch.

Speaking of coding, I'm probably going to have to take some pointers from you because your physics are great! How did you do rolling and collision handling? The way I did the slopes in my game was really primitive. Without going over the huge details, basically I just "moved" the player to the hypotenuse of the triangle based on where they are on the X plane. You know? But you have full-on rolling down hill, and what's more, you have rolling over objects. That really impressed me. The ball can roll over a plunger object even if it's not perfectly flat and react accordingly. Any pointers you can give?
Totally, I'd be glad to help, I'm pretty active in this topic too for whenever you have a question.

The key to making the physics look right is to use real physics. There's no distinction between the big collisions when the ball bounces and the hundreds of tiny ones when it is stationary, they both use the same formula. Using a ball makes things a lot easier (no corners, can do collision detection very cheaply), but my engine is not flexible. Also the fact that you don't actually move the ball directly makes the motion more realistic. It's a lot more difficult with a character though, my advice is to try and use generalizations when you can, e.g. think of flat surfaces as just a subset of the set of slopes.

Again, great work!
Cheers, thanks for the feedback.
 
Here's a little hint of the next game I should be working on. This took about 10 minutes to make in XNA but I thought it'd be fun to share, shows you what you can do when you make a flexible engine. I know rotating levels have been done before but I don't think it's been done right yet. Obviously I'll be starting from scratch on a platformer engine.

[ and ] control the rotation of the levels, aside from that it's exactly the same as before.

http://gcoope.googlepages.com/pizzicatirotation.zip
 
Top Bottom