Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


BeerNutts

Member Since 27 Jun 2001
Offline Last Active Today, 02:06 PM

Posts I've Made

In Topic: How best to represent data required for static and animated sprites?

26 March 2015 - 08:41 AM

Couldn't a static sprite be represented as an animation with a single frame?  With that in mind, create an object that can hold your list of sprites, and the duration each sprite should be shown before moving to the next sprite.  For a static sprite the list would be 1 long, and the duration would be unimportant.

 

Although, I'm not sure that's what you really should send to an view, since you really should just give the view the sprites it needs to display NOW, which would be the proper sprite at it's current animation state, but I can't really say that since I'm not familiar with your framework.

 

Good luck!


In Topic: Card game Class Structure

19 March 2015 - 07:55 PM

Thank you very much for the responses everybody! Since i am quite new to this topic (and to programming in general), what would be the correct terms to Google for an example or maybe even a tutorial in C# for a compositional approach?

I think that's going to be the crux of the issue.  Building objects using components, and properly operating on them isn't as easy to grasp as some other methodologies, and, since you're a beginner, it's going to complicate the issue.

 

I don't know C# very well, but if you google "c# entity component system" you're bound to find a bunch of information to help you along.  Read as much as you can, and try to understand what's going on.

 

I believe it's going to be tough for you.  You might want to start simple, and limit the number of "options" of your cards, and make a simple, but fun, card based game.  Then, as you grow into game programming, you can build.

 

You're going to make mistakes, you're going to do things the wrong way, but you'll learn from it.  Read, program, and repeat, you'll get there.

 

Good luck!


In Topic: Card game Class Structure

17 March 2015 - 02:29 PM

This smells like a good place for using Component Orient Programming.  Build your objects using composition, not inheritance.  Component Based Entity Systems are pretty popular now, but I think, for creating cards, this would be a good place for it.

 

Good luck.


In Topic: Basic level scripting? (for a 2D shmup)

17 March 2015 - 07:15 AM

My 1st real game I made was a Shump, and my levels were scripted just like you mention, based on time.  Back then (~1999), I didn't know about XML, and json might not have been around, so I made my own script files.  You'll basically want to be able to denote in your level files when, what, where, and some other attributes (speed/direction, extra modifiers) for when objects appear on the screen.

 

If I were to do it again, I'd use json instead of rolling my own, but I didn't know any better.

 

You should do the same for all objects i your game, build them with a json script, so you define your enemies, backgrounds, upgrades in json, and, when you create your level script, it just references those tags.

 

Good luck and have fun, I know I did way back when.


In Topic: space invaders barriers implementation

14 March 2015 - 02:34 PM

I adjusted the bounding box's y size to be the difference between current position and last position.

 

Now for the algorithm that you posted earlier, there is a chance that the bullet intersects with the bounding rect, and there is black, but in the next frame, there is green and the bullet misses that part that it should hit, because the intersection test  is tested once... how do I fix that ?

You're going to have to work that out yourself, no more holding your hand.  Problem solving is the crux of programming, and you can do this one yourself, you've got all the hints.

 

Good luck


PARTNERS