Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Beginning game programming course  (Read 63482 times)

0 Members and 1 Guest are viewing this topic.

lordnacho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 509
  • Last login:January 21, 2023, 07:38:14 pm
Re: Beginning game programming course
« Reply #320 on: March 23, 2015, 10:38:35 pm »
Everybody still in?
Started assignment 4, works on the first collection, but after he misses and goes off screen.  Will look at it later in the week.

Anybody want to give me an example of the GetProjectileType?
Did you ever figure this out?  I skipped the project increment

shponglefan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1600
  • Last login:December 15, 2022, 07:22:35 am
  • Correct horse battery staple
Re: Beginning game programming course
« Reply #321 on: March 23, 2015, 11:07:47 pm »
Everybody still in?
Started assignment 4, works on the first collection, but after he misses and goes off screen.  Will look at it later in the week.

I'm still in, just haven't gotten to the course stuff yet this week.  I'm interested to learn about the gamepad stuff though.

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:March 03, 2025, 10:29:54 am
  • I want to build my own arcade controls!
Re: Beginning game programming course
« Reply #322 on: March 24, 2015, 01:51:32 am »
Everybody still in?
Started assignment 4, works on the first collection, but after he misses and goes off screen.  Will look at it later in the week.

That one is probably due to the integer rounding in this step :

Code: [Select]
            // STUDENTS: update location based on velocity if teddy is collecting
            // You should update the location vector (which is at the center of
            // the teddy) first using the velocity vector and the elapsed game time,


            // then update the draw rectangle properties so the teddy is drawn
            // centered on the location vector
            // This gives us accurate movement toward the target so we don't miss
            // the target due to rounding error

You have to be sure to do this in the 2 steps ( 1st step I bolded, 2nd step left without Bolding) - (EDIT : seems Bolding doesn't work in a code box so separated with a couple blank lines )and only cast to (int) for the update of the drawRectangle portion in the second step -- so leave the first step without a cast to (int) and don't update the drawRectangle in the same step as the location update since that requires the (int) typecast and causes rounding errors that make teddy miss the pickups.
I've included the code I used in the Spoiler below if you want to look at it.




            if (Collecting)
            {
               location.X += (velocity.X * gameTime.ElapsedGameTime.Milliseconds);
                location.Y += (velocity.Y * gameTime.ElapsedGameTime.Milliseconds);
                drawRectangle.X = (int)location.X - halfDrawRectangleWidth;
                drawRectangle.Y = (int)location.Y - halfDrawRectangleHeight;
            }
« Last Edit: March 24, 2015, 01:54:45 am by JDFan »

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:March 03, 2025, 10:29:54 am
  • I want to build my own arcade controls!
Re: Beginning game programming course
« Reply #323 on: March 24, 2015, 02:31:16 am »
Anybody want to give me an example of the GetProjectileType?

Do you mean the code for creating a frenchFries Projectile ??

IF so here is what I used going off of the pdf file notes :


 Projectile frenchFries = new Projectile(ProjectileType.FrenchFries,
                 Game1.GetProjectileSprite(ProjectileType.FrenchFries),
                 drawRectangle.X + GameConstants.FRENCH_FRIES_PROJECTILE_OFFSET,
                 drawRectangle.Y + GameConstants.FRENCH_FRIES_PROJECTILE_OFFSET,
                 GameConstants.FRENCH_FRIES_PROJECTILE_SPEED);


And a quick Video (haven't worked on adding the explosions and other collision resolutions yet - so only frenchFries hitting Teddies and deactivating both is working so far :



« Last Edit: March 24, 2015, 02:42:12 am by JDFan »

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:June 13, 2025, 11:04:26 am
  • Rock and Roll!
Re: Beginning game programming course
« Reply #324 on: March 24, 2015, 09:51:03 am »
I'm still in. I submitted my Increment 1 a few hours before the deadline.

lordnacho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 509
  • Last login:January 21, 2023, 07:38:14 pm
Re: Beginning game programming course
« Reply #325 on: March 24, 2015, 07:21:41 pm »
Yep was the int/float thing.  Thanks

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #326 on: March 25, 2015, 07:52:12 am »
I'm still in. Shocked by how I completely forget how to draw an object in the centre of the screen - I forget EVERY week... Still maybe it'll sink in sometime..

lordnacho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 509
  • Last login:January 21, 2023, 07:38:14 pm
Re: Beginning game programming course
« Reply #327 on: March 25, 2015, 09:22:38 am »
I'm still in. Shocked by how I completely forget how to draw an object in the centre of the screen - I forget EVERY week... Still maybe it'll sink in sometime..
Yeah I just keep the previous assignment open and copy and paste stuff in, probably not the best way to learn it.

Vigo

  • the Scourage of Carpathia
  • Global Moderator
  • Trade Count: (+24)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6417
  • Last login:June 05, 2025, 05:38:45 pm
Re: Beginning game programming course
« Reply #328 on: March 25, 2015, 10:43:54 am »
My method is to print out the code on my assignments and labs, write notes of what each section of code accomplishes, and highlight them. That way I am at least forcing myself to find the answer and type it in again.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #329 on: March 25, 2015, 09:41:00 pm »
Programming assignment 4 is done and handed in.
I may go thru it some more to double check Coding Standards.

(Tried to post my video here, but this site wont let me, not sure why.)

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:June 13, 2025, 11:04:26 am
  • Rock and Roll!
Re: Beginning game programming course
« Reply #330 on: March 25, 2015, 09:47:52 pm »
Is anyone working on any "extra cirricular" projects? I see the Space Shooter is forging ahead. I wrapped up Ramp and Roll, and started 3d modelling for 2 other games, one arcade basketball sim and one lawn darts thing.





EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #331 on: March 26, 2015, 12:27:09 pm »
Well behind this week! I'm not even onto the "new" stuff yet and can't get my Teddy in the center of the screen!

I have this in Game1.cs.LoadContent:

            // STUDENTS: create teddy object centered in window
            Vector2 location = new Vector2(WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2);
            teddy = new Teddy(teddySprite, location);

and this in Teddy.cs:
           // STUDENTS: set draw rectangle so teddy is centered on location
            drawRectangle = new Rectangle((int)location.X - sprite.Width / 2, (int)location.Y - sprite.Height / 2, sprite.Width, sprite.Height);

Yet my Teddy seems to be centered X (width) but NOT Y (height) where it seems to be nearer the bottom!


What am I doing wrong/stupid? I've had so many variations of the above (all essentially the same code) and my X/Y seem right if I trace it but it's just not putting the damn Teddy in the middle!!

EDIT: Typical! You post a question and instantly the next thing I read on the course forums (and I've been looking at for hours) helped me! I'd not yet done the following - the instructions hadn't yet asked for it and in all honesty I don't really know what this does (mentioned in passing during week 1 ) but mine was all wrong I assume as the resolution was the factor as it's now bang in the center!

            // STUDENTS: set resolution and make mouse visible
            graphics.PreferredBackBufferWidth = WINDOW_WIDTH;
            graphics.PreferredBackBufferHeight = WINDOW_HEIGHT;
« Last Edit: March 26, 2015, 12:31:59 pm by EssexMame »

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #332 on: March 26, 2015, 09:40:08 pm »
Did you figure out the make mouse visible?
Ismouse.visible = true;

Also be sure you set your WINDOW_WIDTH and WINDOW_HEIGHT

 GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        const int WINDOW_WIDTH = 800;
        const int WINDOW_HEIGHT = 600;

(Im sure you already did this.)

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #333 on: March 27, 2015, 06:44:20 am »
Thanks, I got the mouseVisible part - I think I stumbled across that in the forums actually whilst looking for help with my problem :-)

The const were set by Dr. T but it was the resolution part I'd not got. Like I say, we did cover that, but it was almost in passing in an early part of the course and I think that particular code has been done for us subsequently (until now).

Anyway - infuriating though it was - it's now solved and I don't expect I'll forget that again :-)

Oddly, the newer stuff - Lists and mouse etc are coming along well - I suppose that is fresher in my mind from the recent videos. It's a more fun/rewarding assignment this one - an actual game of sorts - and some of the repeated stuff (drawing/moving teddies etc) is slowly sinking in.
Hopefully it will stick when it's other objects or all my future "World Famous" and multi-million pound/dollar making games that I develop will feature teddies, burgers, rocks and odd looking "pickup" men.... :-)
« Last Edit: March 27, 2015, 07:14:49 am by EssexMame »

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #334 on: March 27, 2015, 08:17:06 am »
Phew! Done. That's taken a long time this week. Still, I think it was a more rewarding assignment and I think I'm even finally starting to remember what a vector is :-)

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #335 on: March 27, 2015, 08:21:49 pm »
Anybody want to give me an example of the GetProjectileType?
Did you ever figure this out?  I skipped the project increment

Not yet, although i plan to checkout the hint that JDFan posted. Ive been directing all my energy towards the week 5 assignment (assignment 4). I have that done so now I can concentrate on project increment 2.
Its due next week.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #336 on: March 27, 2015, 08:23:33 pm »
Phew! Done. That's taken a long time this week. Still, I think it was a more rewarding assignment and I think I'm even finally starting to remember what a vector is :-)

Agreed. It was very trying, making me think, which also made my head hurt.  :dizzy:

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #337 on: March 27, 2015, 08:27:00 pm »
On a side note: The lectures about xbox 360 controllers made me wonder how hard it would be to hack one to turn your monitor or switch the joystick from 8 to 4 way??
(REF: The force feedback lecture)

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #338 on: March 30, 2015, 12:02:23 pm »
Everyone still in on this?
Im up to date.
Have Project Incr. 2 done, haven't submitted it yet. (Got till next Sunday).

Vigo

  • the Scourage of Carpathia
  • Global Moderator
  • Trade Count: (+24)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6417
  • Last login:June 05, 2025, 05:38:45 pm
Re: Beginning game programming course
« Reply #339 on: March 30, 2015, 12:40:29 pm »
Yeah, I am in it, although I am am not gonna lie. Without massive help from people like JD (Thank, man!) on the course forums. I would have been sunk long ago. I think this is just not my style of learning. I feel like the gaps between the lecture and the assignments are pretty severe, and using the book and google to fill them only gives me information that is hard for me to use in a repeated sense. I would prefer to have more labs that pull the concepts together before that leap to the assignment.

I'm gonna need to do some more substantial supplemental training soon.

I'm probably gonna start with some of the official tutorials -

http://xbox.create.msdn.com/en-US/education/tutorial/2dgame/getting_started

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #340 on: March 30, 2015, 01:16:01 pm »
Vigo, I totally agree.
They said this is for anyone who had no programming experience at all, but I honestly feel like it is not.
I have never programmed with XNA or C#, but I have done some in VB and C++, and I still feel lost and have to search the forum and fall back on JD too.
I keep hoping a light will turn on and all will fall in place.
If I didn't have others to help out, I would have given up a while back too.
I didn't buy the book, is it really that much help?

Edit: Just checked out that link you posted. Looks interesting, I may have to try it.
« Last Edit: March 30, 2015, 01:19:24 pm by DaOld Man »

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:June 13, 2025, 11:04:26 am
  • Rock and Roll!
Re: Beginning game programming course
« Reply #341 on: March 30, 2015, 01:51:37 pm »
I have been programming for over a year in C# and before that it was basic 2 on my commodore 64, like 20 years ago. I am finding this course absolutely ridiculous in terms of difficulty jumps from one week to the next. I am learning, but the way he goes about things and makes assumptions... he isn't a good teacher. I am going to stick with it to the end, because I am learning some stuff. I find that the code works but he hasn't really gone out of his way to explain how or why it works, and I feel without that knowledge, I am just typing gibberish that isn't going to stick in my mind.

I am using that random range thing a lot in this other game I'm working on right now though to add subtle variation in pitch to randomly selected sound samples to add some variety to basketball sounds.

Vigo

  • the Scourage of Carpathia
  • Global Moderator
  • Trade Count: (+24)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6417
  • Last login:June 05, 2025, 05:38:45 pm
Re: Beginning game programming course
« Reply #342 on: March 30, 2015, 05:24:09 pm »
I have been programming for over a year in C# and before that it was basic 2 on my commodore 64, like 20 years ago.

Not that I was great with BASIC, but that is my jump as well. Also some VBA for the work I do in excel. I know it is outdated programming, but I just miss GOTO commands.  :D

I didn't buy the book, is it really that much help?

Yes and no. I think it holds most information needed, but everything is in a conversational format, so it isn't a matter of just locating the extra pieces that he didn't cover in his videos, you have to dig into the story of the book. Using the course forums are just easier. So far, every pitfall I have run into has been done by someone else.

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #343 on: March 31, 2015, 04:38:39 am »
Glad it's not just me :-) I understand and follow all the video lectures and each week think I'll just be putting that into practice in the assignment. I understand a little extra learning as part of it in this type of course but it seems like the assignments are totally different to the lectures. I mean, this week, we learnt all about the mouse and buttons etc but then in the assignment that was already done for us and we are back to vectors :-)

I'm from an IT/programming background but this just isn't sinking in, at all. I'm getting through each week but it never feels like I've done it, and more like I've finally found the answers on the forums or here!

arquillos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 49
  • Last login:June 18, 2025, 07:03:59 am
Re: Beginning game programming course
« Reply #344 on: March 31, 2015, 05:00:27 pm »
I´m still in.
I got increment 2 done but doubting about Teddy´s projectile starting location.
I really can´t get a nice projectile Y starting point using the OFFSET.
The "best way" to get the Teddy projectile it´s not using the offset and just releasing the projectile from the bottom of the Teddy bear but I think that this is not going to be a "correct" solution :(:(:(

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #345 on: April 02, 2015, 10:12:11 am »
Interesting to note the email of encouragement from Dr. T to stick with it. Like DaOldMan said, it's not for beginners. Not to total programming beginners anyway. How you'd cope struggling with the basics like IF statements alongside all the new XNA stuff and vectors I've no idea.

By way of encouragement to those still on it and haven't yet tackled Project Increment 2 it seemed easier to me - more logical step-by-step and I was starting to remember some stuff (or at least where to look it up in the other projects). I'm not done yet but Steps 1-4 have gone fairly smoothly. It helps too as its moving a burger around and shooting with the mouse (like Centipede and a trackball) and it's starting to look like a game.

Vigo

  • the Scourage of Carpathia
  • Global Moderator
  • Trade Count: (+24)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6417
  • Last login:June 05, 2025, 05:38:45 pm
Re: Beginning game programming course
« Reply #346 on: April 02, 2015, 11:05:21 am »
That is good to know. I will probably be tackling it tonight, so I hope I find it a bit more logical as well.

shponglefan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1600
  • Last login:December 15, 2022, 07:22:35 am
  • Correct horse battery staple
Re: Beginning game programming course
« Reply #347 on: April 02, 2015, 11:27:27 am »
Interesting to note the email of encouragement from Dr. T to stick with it. Like DaOldMan said, it's not for beginners. Not to total programming beginners anyway. How you'd cope struggling with the basics like IF statements alongside all the new XNA stuff and vectors I've no idea.

Ya, I'm really surprised he didn't teach all the logical stuff first, before getting into XNA-specific graphics and input.  The way the course is structured seems a bit backwards.

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #348 on: April 02, 2015, 11:44:00 am »
Only took a few hours Vigo - not too strenuous this one. Fun too - it's moving a sprite and firing so is certainly game programming this one!

I'm all done, which means I've completed week 6 and am half way there.. Phew!

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:March 03, 2025, 10:29:54 am
  • I want to build my own arcade controls!
Re: Beginning game programming course
« Reply #349 on: April 03, 2015, 10:46:16 am »
JUst a quick reminder for those that may have been finished for awhile -- be sure that you submit your Project increment 2 ( I just checked and had not pressed submit yet and it had been uploaded so long ago I'm glad I went back and checked !!) Figure there might be a few others that had done the same so figured a reminder here wouldn't hurt.

lordnacho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 509
  • Last login:January 21, 2023, 07:38:14 pm
Re: Beginning game programming course
« Reply #350 on: April 04, 2015, 09:39:51 pm »
Hate to be the buzzkill, but I'm giving up on the projects entirely now.  Will watch the videos, but I refuse to work on his dumb teddy bear projects.  I get 0 gratification from finishing these. 
Although this new assignment seems somewhat of a breath of fresh air in that you aren't forced into his path of doing things, ie filling out snippets where he says to.  He should have at least said use whatever sprites you want.

I agree his methods of teaching coding are pretty bizarre.  For loops after controller vibrations, wtf.

What I'd really like is a course that goes into game design, more on the art side of it.  Game mechanics are done and can be googled for, but it's the art, level design, etc that I'm struggling with.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #351 on: April 11, 2015, 03:20:22 am »
Programming assignment 5 done and submitted.
Looks like some interesting stuff coming up in the next couple weeks.
Who all is still in?

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Beginning game programming course
« Reply #352 on: April 11, 2015, 05:25:04 am »
Game mechanics are done and can be googled for, but it's the art, level design, etc that I'm struggling with.

Check out gamedev.net

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #353 on: April 12, 2015, 12:30:24 pm »
Yep, still in. Hoping to get ahead this week with Week 9 also released this week.

shponglefan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1600
  • Last login:December 15, 2022, 07:22:35 am
  • Correct horse battery staple
Re: Beginning game programming course
« Reply #354 on: April 13, 2015, 09:39:44 pm »
I tried to get into the most recent assignments over the weekend, but I'm just not feeling it anymore.

What I really want to learn at this point is more about structuring a program, not merely writing algorithms.  To a certain extent, the blackjack assignment goes into that with its usage of game states.  But even then, it's a pretty compact assignment even taking into account adding additional classes and expanding the program scope.

I've been reading Game Programming Patterns lately as well as studying larger C#/XNA projects (this one for example).  I'm finding it more useful in trying to learn how to properly build a C# game.

I'm still going to keep an eye on the course and see what material is available, but for now I think most of what I want to learn is to be found elsewhere.
« Last Edit: April 13, 2015, 09:41:31 pm by shponglefan »

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:June 13, 2025, 11:04:26 am
  • Rock and Roll!
Re: Beginning game programming course
« Reply #355 on: April 14, 2015, 12:58:37 pm »
I tried to get into the most recent assignments over the weekend, but I'm just not feeling it anymore.

That's how I am at this point. In fact, I am learning more relevant things by working on my own projects, hitting a roadblock, then asking google. I think that unless there is a feature I need for an existing game engine that cannot be built for one reason or another, maybe I am better off using Unity. Don't get me wrong, I would be a better programmer if I had to write everything by code, but that would be taking up way more of my time. And the result are slow... in Unity, I can think of something, and have it implemented pretty quickly.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #356 on: April 14, 2015, 06:44:22 pm »
Ok, Im done with project increment 3, but haven't submitted it yet.
How do you guys interpret the part about respawning the bears.
Some folks on the discussion forum at Coursera think you should shoot all the bears and thats it.
Others think the bears should re spawn after one is shot, keeping number of bears at MAX_BEARS (5).
And still others think you should clear all the bears then 5 more appear.
I think the instructions are a bit vague.



 

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: Beginning game programming course
« Reply #357 on: April 16, 2015, 05:38:24 am »
I interpreted it as start with 5 bears (MAX_BEARS) and then, once they are all shot that's it. For now at least. I expect a later increment would respawn, or move onto level 2 etc.

I interpreted it as such as the foreach loop to spawn the MAX_BEARS is added in LoadContent (from his PDF steps) and therefore there was no request/detail/steps on adding further bears as and when the first 5 are shot. i.e. There was no request to spawn further bears in the Game1.Update method in his instructions.

Even if this is misinterpreting what he imagined we would do, the 5 criteria we are evaluated on for this are as follows, all of which are fulfilled by the "spawn 5 (MAX_BEARS), shoot them, no more are spawned" interpretation I had.
1. Explosion plays at collision location when a teddy bear and fries collide
2. Teddy bear and fries from collision removed from game (you'll need to check the source code to confirm this)
3. Explosions that are done playing are removed from game (you'll need to check the source code to confirm this)
4. Game has GameConstants MAX_BEARS teddy bears when it starts
5. Teddy bears bounce off each other
« Last Edit: April 16, 2015, 05:41:26 am by EssexMame »

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Beginning game programming course
« Reply #358 on: April 16, 2015, 10:58:04 am »
I went with the "no re-spawn" scenario.
Working on the programming assignment 6 now.
Got my cards printing and the hit & stand buttons.
Trying to figure out the switch methods he wants us to use to step through the game.

Here is my project increment 3 video:



JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:March 03, 2025, 10:29:54 am
  • I want to build my own arcade controls!
Re: Beginning game programming course
« Reply #359 on: April 16, 2015, 11:34:35 am »
I went with the "no re-spawn" scenario.
Working on the programming assignment 6 now.
Got my cards printing and the hit & stand buttons.
Trying to figure out the switch methods he wants us to use to step through the game.

Here is my project increment 3 video:



Looking Good !!  :cheers:

I've finished up assignment 6 and been playing with adding a few extras -- Getting the layout to look correct takes some playing with as his constants are set to only show about 4 cards on screen with his small card deck so had to play with it  a bit to fit larger cards and have room for 8 cards per player. If you run into problems send a PM and I'll try to help. The switch is actually pretty easy once you figure it out.