Sign in to follow this  

Visual Studio C# 2D Game Programming Help

This topic is 1112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I am a noob programmer as you may have noticed. I understand basic C# concepts, but do not know how to go about creating my own projects, which lead me to post here. I would like you guys to help me write the code, while also explaining it, if possible. This is meant to be a practice project to lead me through the development process, so I can work independently.

 

Here's a basic overview of my game:

 

Aquifex

Basic Objective:

You use different kinds of Aquifex to take over the bases of other colors and those of the neutral color. Aquifex can also be used to defend your own base. To create Aquifex, you need Sucrose. Sucrose can be accessed by taking over Cyano. Each base spawns with one Cyano. To upgrade your Aquifex, you must attack enemies and gain xp. The neutral bases do not attack, they merely defend. The other colored bases, however, attack neutral bases and your bases. Your objective is to get all the bases on the map to become your color.

Kinds of Aquifex:

Drone: The basic Aquifex. Basic stats, no specializations.

Worker: Collects sucrose. Basic stats. Cannot attack.

Tank: An Aquifex with a huge amount of health, but very slow.

Support: An Aquifex capable of healing other Aquifex. Very fast, but weak.

Ranged: A powerful Aquifex with high damage and a long range. Fast, but relatively weak.

Berserker: A very powerful Aquifex that has high health. Normal speed, high damage.

 

Aquifex Upgrades:

Drone:

On death explodes

Shots have additional damage over time

Shots have 10% chance of slowing enemy

 

Worker:

Has 5% chance for double Sucrose

Mines faster

Generates electric shield that damages enemies.

 

Tank:

Generates aggro to become a target for enemies.

On death spawns mini tanks.

On death temporarily stuns enemies.

Support:

Heals more bots at once.

Adds shield to friendly troops when they are at full health and being healed. Decays over time.

Slight healing effect on robots around it.

 

Ranged:

Longer range.

Shots home in on target.

Shots explode and damage nearby enemies.

 

Berserker:

Destroying enemies gives health.

Extra damage for killing an enemy within 5 seconds of another’s death.

Friendlies near you get a slight damage increase.

 

 

 

So I basically need help implementing all of this in Visual Studio. I don't have any art right now, and want to use cubes as a temporary substitute. The cubes could possible have labels of what unit they are. Please explain to me exactly how to code it and what it means/does. If you're curious, Aquifex is the genus of a species of extremophile. Cyano is the beginning of the name of a bacteria which produces sugar, aka sucrose. I really appreciate the time you take to read this, and the time you take to post. Thanks.

Share this post


Link to post
Share on other sites

To expand on Josh Petrie's question, you should probably tell us what kind of other programs you have finished coding, regardless of how big they are. Have you made any simpler games before? Also, how long ago did you start using C#? It would give us a better understanding at what programming concepts and data structures you have applied. It sounds to me like you're making a huge jump in scope, especially your game description sounds like a 4X game. 

 

When you feel out of your depth when starting a larger project, it is a good idea to dumb down your idea greatly so you can get something basic working, even if it starts with controlling one unit on a screen.

Share this post


Link to post
Share on other sites

To expand on Josh Petrie's question, you should probably tell us what kind of other programs you have finished coding, regardless of how big they are. Have you made any simpler games before? Also, how long ago did you start using C#? It would give us a better understanding at what programming concepts and data structures you have applied. It sounds to me like you're making a huge jump in scope, especially your game description sounds like a 4X game. 

 

When you feel out of your depth when starting a larger project, it is a good idea to dumb down your idea greatly so you can get something basic working, even if it starts with controlling one unit on a screen.

I've been advised to make simpler games. I'm working on a snake game as of now, and will try more advanced stuff later. Out of curiosity, what Visual Studio template would you go about using to make a project like this?

Share this post


Link to post
Share on other sites

 

To expand on Josh Petrie's question, you should probably tell us what kind of other programs you have finished coding, regardless of how big they are. Have you made any simpler games before? Also, how long ago did you start using C#? It would give us a better understanding at what programming concepts and data structures you have applied. It sounds to me like you're making a huge jump in scope, especially your game description sounds like a 4X game. 

 

When you feel out of your depth when starting a larger project, it is a good idea to dumb down your idea greatly so you can get something basic working, even if it starts with controlling one unit on a screen.

I've been advised to make simpler games. I'm working on a snake game as of now, and will try more advanced stuff later. Out of curiosity, what Visual Studio template would you go about using to make a project like this?

 

 

That really depends on what API's or frameworks you're using, if any. If you're making a purely text-based console game, use the Console Application template. Some frameworks such as MonoGame and XNA come with their own project templates for making games with them.

Share this post


Link to post
Share on other sites

 

 

To expand on Josh Petrie's question, you should probably tell us what kind of other programs you have finished coding, regardless of how big they are. Have you made any simpler games before? Also, how long ago did you start using C#? It would give us a better understanding at what programming concepts and data structures you have applied. It sounds to me like you're making a huge jump in scope, especially your game description sounds like a 4X game. 

 

When you feel out of your depth when starting a larger project, it is a good idea to dumb down your idea greatly so you can get something basic working, even if it starts with controlling one unit on a screen.

I've been advised to make simpler games. I'm working on a snake game as of now, and will try more advanced stuff later. Out of curiosity, what Visual Studio template would you go about using to make a project like this?

 

 

That really depends on what API's or frameworks you're using, if any. If you're making a purely text-based console game, use the Console Application template. Some frameworks such as MonoGame and XNA come with their own project templates for making games with them.

 

Can you explain what an API and framework are? And can you also recommend some good ones? I would like them to be alive, so they still receive updates, not dead like XNA. Thanks.

 

EDIT:

I am planning to make a 2D game, but do not have enough experience yet. For future reference, what's the best 2D framework I can get (Free or not too expensive). Also a 3D framework?

Edited by Ovicior

Share this post


Link to post
Share on other sites

Ok for starters, forget about 3D.  If you can't even build a 2D game then 3D is impossible for you at the moment, as it is infinitely more complex.

 

I recommend using XNA as it's also a Microsoft standard like C#.  It will also give you a good base for learning C++ if you intend on going into actual game development. (This is the direction I took and I'm now developing MMOs....)  XNA is not dead, lots of game developers who build in C# still use it over other ones.  The thing you have to understand is software works in levels, High vs. Low level context.  A High level context means most things are already programmed for you, where as Low level context means you have to build up to higher level yourself.  XNA is more of a Low level context, where as most people today are lazy and use APIs that have a higher level context that makes things easy.  If your interested in becoming a software programmer I recommend you shy away from APIs that make things too easy, or you wont really learn anything.  (Incidentally, C# is a high-level programming language meaning that most of the complicated stuff under the hood is taken care of automatically by the language and compiler, where as C++ is a low level language meaning you have to do it all yourself, which isn't a bad thing, it means you have a greater degree of control smile.png )

 

GOOGLE IS YOUR BEST FRIEND!!!  Youtube has a TON of tutorials on pretty much any language, don't ever just look for one tutorial over another, watch them all.  Even if they repeat information, each one has clues here and there about things the other doesn't and repetition will help you to remember what to do later.

 

An API is an Application Program Interface (Wiki: In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications.)  Basically it's a set of pre-built code, that helps make coding complex programs much easier on other programmers.

 

A Framework is similar to an API, the major difference is that an API is a set of functions that help to make complex code simpler to build, where as a Framework is complex code that makes building programs easier, by having all of the base code built for you.  You simply put in your basic code or information and vuala... instant program.  Another translation of Framework is the base code that allows for the complete functionality of a program, you can pick how you want to take that, kind of a versatile term.

Edited by MakaiKingCross

Share this post


Link to post
Share on other sites

Ok for starters, forget about 3D.  If you can't even build a 2D game then 3D is impossible for you at the moment, as it is infinitely more complex.

 

I recommend using XNA as it's also a Microsoft standard like C#.  It will also give you a good base for learning C++ if you intend on going into actual game development. (This is the direction I took and I'm now developing MMOs....)  XNA is not dead, lots of game developers who build in C# still use it over other ones.  The thing you have to understand is software works in levels, High vs. Low level context.  A High level context means most things are already programmed for you, where as Low level context means you have to build up to higher level yourself.  XNA is more of a Low level context, where as most people today are lazy and use APIs that have a higher level context that makes things easy.  If your interested in becoming a software programmer I recommend you shy away from APIs that make things too easy, or you wont really learn anything.  (Incidentally, C# is a high-level programming language meaning that most of the complicated stuff under the hood is taken care of automatically by the language and compiler, where as C++ is a low level language meaning you have to do it all yourself, which isn't a bad thing, it means you have a greater degree of control smile.png )

 

GOOGLE IS YOUR BEST FRIEND!!!  Youtube has a TON of tutorials on pretty much any language, don't ever just look for one tutorial over another, watch them all.  Even if they repeat information, each one has clues here and there about things the other doesn't and repetition will help you to remember what to do later.

 

An API is an Application Program Interface (Wiki: In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications.)  Basically it's a set of pre-built code, that helps make coding complex programs much easier on other programmers.

 

A Framework is similar to an API, the major difference is that an API is a set of functions that help to make complex code simpler to build, where as a Framework is complex code that makes building programs easier, by having all of the base code built for you.  You simply put in your basic code or information and vuala... instant program.  Another translation of Framework is the base code that allows for the complete functionality of a program, you can pick how you want to take that, kind of a versatile term.

Thank you. I am working on a text game as of now, for practice, and will go on to more complicated things later. I am considering using MonoGame, but don't know how it compares to XNA. which would you recommend?

Share this post


Link to post
Share on other sites

This topic is 1112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this