I'm trying to dip my toe into game programming, C# is the language I'm most comfortable with and what I want to use.
I've purchased a book and it's very good with the basic concepts but it's using GDI, bitmaps and sprites. I'm no artist and I'd like to concentrate on game play rather than eye candy, I'm more than happy with 'Dwarf Fortress' style of presentation.
DF doesn't seem to be a Console app (to my untrained eye). My question is can I access this 'graphic mode' from C# and if so how? Any tips links tutorials would be very helpful and appreciated.
Writing a 2D game in C# is actually very simple. Try with XNA. A simple tutorial that got me started with 2D was this...
http://create.msdn.com/en-US/education/tutorial/2dgame/getting_started
It basically covers a simple 2D side scroller but what you get from the tutorial will be useful in your DF like game. It requires you to create some graphics but like you said, those graphics need not be fancy. Drawing simple sprites will be easy enough.
Console games are a great way to enter the game making business or hobby, once you are very comfortable with c#, try to go to xna or unity. Xna is not being developed anymore and I don't find it very pleasant and prefer unity over it, but many people differ from me so please try it out for yourself. Unity is a 2D and 3D game engine wit a free and paid version. It can be complicated at first but very well made. You can develop in c# and many more languages with unity and it is a lot more flexible than xna.
Related
So im trying to develop a game in the XNA 4.0 framework in Visual Studio 2010, and I wanted to create a game that would have some sort of 3D hexagonal map. I've been researching, and i saw this video: https://www.youtube.com/watch?v=XgdraYpT9vU
This guy claims to have made this with just XNA 4.0 in Visual Studio, which is quite stunning(for me). So here is my question. You don't have to explain how to do it in here, as it would probably be WAYYY too long, but does anybody know a guide somewhere which I can reference in order to learn how to make this?
Even though you've tried to make question more specific it's still too broad (or too specific, from another angle).
I doubt there is specific guide how to make similar game using same tools. But it's easy to find information about individual aspects: game architecture, 3D [in XNA], hexagonal maps. For that matter there is very good resourse called Amit’s Game Programming Information. I think it have all information necessary for a start on any game.
I created a Game in C# (Multi-player Tanks Game) using Windows Forms Tools (Panels, shapes, buttons, etc...) but the Animation and Graphics are just so poor, so is there any Type of simple Graphics or Animation to use in C# to make this game a little better, can I use flash in C#, anything?!!!
XNA is great, its a completely different technology to Windows Forms as its based on DirectX.
Another idea is to check out silverlight or WPF depending on how complex your game is. For simple 2D games with not too busy screens it might be a lot easier than XNA.
I found a great example of building a multiplayer game in WPF.
I would recommend having a look at Microsoft XNA.
I'm pretty sure if you want to improve the graphics of your game you're going to have to use design software or hire someone to do it for you. A simple look up on Google will direct you to model development software.
A good place to start is the microsoft XNA framework.
I also recommend using Blender: http://www.blender.org/
It's a completely free open source 3D model creation program.
There are many librarys and ways for game development in C#.
I prefer to use XNA, which is based on DirectX and developed by Microsoft itself.
But there are also many other wrapper like OpenGL wrapper SharpGL, a custom DirectX wrapper SlimDX or using the plain DirectX SDK.
Some time ago I was looking for libraries or frameworks to improve winforms experience with nice animations. My best options were XNA or OpenTK (OpenGL) and SDL.Net.
So it has been a while since I have done any game programming in C#, but I have had a recent bug to get back into it, and I wanted some opinions on what configuration I should use.
I wanted to use C# as that is what I use for work, and have become vary familiar with. I have worked with both DirectX and OpenGL in the past, but mostly in 3D, but now I am interested in writing a 2D game with all vector graphics, something that resembles the look of Geometry Wars or the old Star Wars arcade game.
Key points I am interested in:
• Ease of use/implementation.
• Easy on memory. (I plan on having a lot going on at once)
• Looks good, I don't want curve to look pixelated.
• Maybe some nice effects like glow or particle.
I am open to any and all suggestions, maybe even something I have not thought of...
Thanks in advance!
If you're just starting out again and already have a C# background, why not try XNA? You'll definitely be able to leverage your C# skills here
http://creators.xna.com
http://creators.xna.com/en-US/downloads
I use SlimDX for C# graphics programming and I prefer it to XNA.
http://slimdx.org/
TBH it doesn't really matter what you use. OpenGL, SlimDX, or XNA. They'll all be about as complex (or not as the case may be) as each other.
You might consider using the Axiom engine, which is a C# port of Ogre3D. It's enough higher level that you can have it render your graphics via XNA or OpenGL with little or no change to your code. It can also handle keyboard and mouse input (which are normally separate -- e.g., via DirectInput on Windows or SDL on Linux).
You also might consider using TAO Framework which is OpenGL based and quite nice. But you have to write the 2D Engine all by yourself tho. It also works on Mono!
I create my OpenGL engine with a C# wrapper because I like C# a lot too. Sadly managed languages are very slow when it comes to graphics and that's why I always make my OpenGL part in C++, compile it as a DLL and get it from C# using interop. If you by any chance dislike DirectX than I suggest you stay away from XNA. Everybody I know is very dissapointed about it and switched back to C++(OpenGL) + C#.
Since you already know C# I'd use XNA or Unity. While there are faster languages and middlewares, they're probably plenty fast enough. Both frameworks would have the necessary features you require.
I want to write a simple game like pacman in C# in order to learn
the new language.
However, I don't know how to make a circle move?
Which part of knowledge in C# is needed?
You should check out XNA Game Studio from Microsoft. It's a version of Visual Studio that's targetted especially for writing games. You use C# but get a lot of things for free - graphics, sound, timing...
Here's a tutorial for making a ball move in XNA.
The simplest way would be to move your circle a small bit with every tick of a timer control.
If you want to learn a new language stay away from all fuss and just look into the most essential parts.
Having knowledge about previous programming languages helps a lot, espesially if one of those are Java.
You don't need to look into XNA for this, all you really do need is to Start Visual Studio, create a new Windows Form, drag over an PictureBox and start playing with the KeyEvents.
Your game does not have to be awesome for you to learn the very basics of C# and .NET. And you certainly don't need to dig down in the deep jungle of XNA!
Once you have your form up and running with a PictureBox or two and you have conqured the Event-system, take a look at the other fundamental parts of .NET that makes your life easier. Properties, Generics, Data Sources and much much more.
Well, for a simple single player game like that, some of the most important things you need to know about are data structures and GDI.
Data structures are important because you need to store information such as what does a map look like? Where are the walls? Can you go from one end to the other? How does the map draw itself?
GDI is used in C# to draw. This uses the Graphics context. You'll find lots of examples online, and I'd suggest checking out BobPowell.Net GDI+ FAQ to avoid some of the common mistakes.
You probably want to look into XNA - http://creators.xna.com/
Simply download the studio, install, then run Visual Studio C# (mine is Express Edition).
So when you run, you create a new Windows Game Project and you've created your first game.
Good to read up some books and articles on XNA.
Book: Microsoft XNA Game Studio 2.0: Learn Programming Now! by Rob Miles.
if you mean how to move an object around in a circular movement, then you just need math knowledge:
int circlePosX = centerX + Math.Cos(degrees) * radius;
int circlePosY = centerY + Math.Sin(degrees) * radius;
radius is here how big you want the circle to be, and degrees is the position ion the circle the object is moving.
Here's an answer to a question about a radar-type game that demonstrates generally how to do this in C#/WinForms using GDI+ (with a sample and source code):
What would be the best way to simulate Radar in C#?
I'm making a turn-based top-down game in C#. The graphics requirements are pretty simple: it's entirely 2D, requires drawing some images taken from graphics files (perhaps rotating them first), line drawing to make a hex grid and the ability to place text at any position on the screen.
I'm wondering what the best API is for doing these graphics. Is XNA overkill for this, is there something more appropriate? Thanks (I have zero experience of graphics or game development in .net so don't be afraid to dumb-down any answers).
I'd recommend XNA for this. If you don't want some of the overhead of XNA, I've found SlimDX to be a very nice little framework. They also provide some basic game classes to make this type of thing easy.
Doing your drawing directly in WPF is also fairly easy, but more difficult to extend later. XNA and SlimDX give you access to shaders, very fine grained control of alpha blending, as well as the potential to easily extend portions into 3D later if needed.
I've used the Farseer Physics engine before which was pretty cool and extremely easy to pickup (I am an enterprise developer, not a game developer). It works for Silverlight so you could actually make your game web based. I would suggest silverlight or WPF for 2D.
http://www.codeplex.com/FarseerPhysics
I would recommend WPF. Loading your graphics and moving them around should be fairly easy. Since WPF also is vector based, your line drawing is straight forward.
XNA would be the next step. Great support for sprite graphics and also gives you access to shaders.
If it is as simple as it sounds, and not even real-time, maybe you don't need any of this stuff. Drawing a hex grid and some images should not be hard even without a game engine. Maybe WPF would be good for this.
Given your requirement you could just use plain C# and the GDI (for 2d rastering). However learning XNA is easy enough, and it'll serve you well once you decide to make a realtime game (2d or 3d) down the road. Either way have fun, and if XNA seems to complicated when your starting out, just drop back to GDI. Making games should be as fun as playing them :)
XNA sounds like a good choise (it will better than using DirectX SDK !! and it is quite easy to learn)
You can do this by just using classes inside the System.Drawing namespace. And XNA is certainly overkill for this type of stuff. Also you would introduse many dependencies for your small game which might be an unwanted thing for your gamers.
Check out Unity 3D - it's based on C# and it can be used for 2D. It might be overkill (including price), but for game development it's in general HUGE help.