Best structure for xna Arcade Game - xna-4.0

I need to design an arcade game using XNA.
This will has 9 different game where the player can select one of them.
I want to do it the best clear and separated as possible. For easy maintenance.
These game will share a common credit.
Is possible to do it as DLL each game and call them from a main Project?
Thank you.

The best way to manage multiple things (screens, levels) is to make a GameComponent. You can attach them to your base game (Probably Game1?) and then you can toggle their visibility and active states. Microsoft has some good info on it.
Good luck! :)
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gamecomponent.aspx

Related

Transforming Kinect coordinates to character model

I have the latest Kinect SDK, XNA 4.0, and a model with a skeleton and I'm looking into working with the kinect to create some simple games. I heard that various engines, such as the DigitalRune engine provide an easy way to map the skeleton generated from the Kinect sensor to the skeleton of the model.
Which engine is the best for this task and why? I'd prefer if you could list both the best free engine and the one you have to pay for, as well as any additional suggestion, should you have them.
I really need help with this. While I did manage to find about five engines that might suit my needs (Ploobs, Engine Nine, DigitalRune, Hilva, Xen, XNA Final Engine) I have no way of telling which is better than the other, as there is very little activity in the related forums and I really don't have the time (or, more importantly, the knowledge) to test all these engines.
I think XNA is better, because it gives more transparency when it comes to game programming, there is no doubt it is the most used for game programming and as a plus point you will have tons of tutorials. xna framework will be best even you can have e-books too.

What's a good structure for making games?

I'm starting game development, but I really want to avoid hacking together a step-by-step game. I'm thinking, what's a good system for handling all that goes on?
For example, I thought of making a menu class, that contains an array of objects for buttons in the menu, and then every game loop call update() on the menu, which in turn calls update() on all the buttons, passing user input and such along the way. Is this a good way to do it?
I'm trying to find structural techniques past the game loop, any advice would be appreciated. Thanks!
(BTW I'm using c++)
This question is not that trivial, but let me try to give you a really simple answer. You need at minimum a core architecture where you can register several engines. Take a deep look into state machines and several software patterns. There have been really greate game dev books like the Game Programming Gems. Start reading an older book from André LaMothe. Read source code ie. from Half Life 2 that could be downloaded at some places.
It sure depends on the environment, C++ is best and could be the fastest way to write games but would you like to use DirectX or OpenGL, do you need Audio and advanced input? Do you want to start with the older WinApi? Nevertheless it always starts in a single point, the main loop. There your state machine should be initialized and all resource managers need to be set up. For graphical objects you need to think about a low level init, update, draw, release and destroy cycle. UI is built up on Graphics, Input and other parts. Don't start writing your own UI or you need to spend the next 2 years with it. You need a relational game model that describes the world you want to create.
To be honest, read a lot about patterns (like mvc), state machines, gpu pipelines and framework design. Read a lot of code from very talented people that open sourced it for us:)
By the way, what is a step by step game?

game programmer portfolio [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
i want to work as a programmer in a game modification team. Most teams require a portfolio to show.
I haven't any previous experience with game programming and I would like to know what I should program and include in the portfolio
Thank you
I'd seriously consider writing one or more small, simple games yourself before embarking on joining an established team. You'll learn a lot about yourself and the technologies involved in games development, and you'll be putting together your own portfolio as you progress. You may find that you'll be in over your head if you join the mod team directly, especially if you have no experience at all. If the team is modding a particular game like Half Life or Unreal, then I'd use the time to get familiar with those tools - using the assets which are already there will give you a useful jump start.
Your games needn't be complex or graphically rich. Concentrate on ideas and simple execution. It's too easy to get bogged down with detail, especially if you're trying to impress. How about a simple puzzle game? Or tacking on flight simulator style controls to cruise around an FPS level? :)
Best of luck!
A portfolio should present what you consider to be your best work in various categories. For a programming portfolio, you don't necessarily need to put exclusively games in it, even if you're looking to join a game development team.
For a portfolio that you want to present to a game development group, my suggestion would be to break down the different aspects of what makes up a game and include completed and polished programs that highlight certain aspects.
Suppose you break down the game development pipeline and come up with the following list which shows the skills you want to highlight:
3D Graphics
Physics
Human Interaction (Gameplay and UI)
Artificial Intelligence
Take a project for each category and make that aspect shine! Make each one interesting for the end user. Having different programs highlighting different skills shows that you are multidimensional - you're not just a one-trick pony.
Now, there's one more thing a portfolio should do, and that's highlight you! The small projects highlight your skills, but usually it's good to include one major project that shows many skills and, more importantly, your personality. This should be something you're proud of making, and something that you're excited and passionate talking about. Passion is contagious! When you show passion about something, people can't help but take interest.
Hope this helps.
Program anything you think you could do well. A portfolio is not as much about quantity as it's about quality.
It's been a few years since I interviewed with game companies so some things could have changed, but here are some notes from my experience:
If you are in college, try to get into summer internships with game companies. Microsoft, Blizzard, Epic, etc all have summer programs that will help you build your portfolio. Most of the time, they will have you work on tools for their full time developers to use, but that is how you get your foot in the door.
If you are coming out of college (or, as was my case, have been developing non-game applications for several years) and don't have titles you can put your name on, you'll have an uphill battle. The best way to approach it in this case is to do one of the following:
a) Develop your own custom game engine and make some simple games with it. This will show knowledge of the basic fundamentals the game companies are looking for.
b) Develop a mod of a popular game. A good example of this is DotA (custom scenario for Warcraft III), or various Unreal Tournament mods.
c) Develop some games with an opensource, or somewhat inexpensive game engine (e.g. OGRE, Torque3D, etc.)
Despite having 5+ years of application development (with shrink-wrapped software used directly by customers), I'd get to the 2nd, 3rd, or even 4th interview only to get the response, "You have a very strong background in application development, but you don't have much of a game portfolio. Please work on that and apply again in the future. Thanks."
Good Luck!
All of the suggestions made so far are wise, I'll also add this.
Games in the idea stage are pretty dangerous. You'll keep thinking of things you want to add, technologies you want to use, and so on. Get out of that as quickly as possible for every project.
Start by thinking of a core idea for a game, ideally this should be a short, one or two sentence description. Even better would be a two word description: "Asteroids RPG!". Then come up with a bullet point list of the features it should have.
Once you've got that list, absolutely never change it and never stray from it while you are coding. If you have new ideas and you just have to explore them, start a new list for another game.
Hopefully you'll have something you can actually play by the time you've completed one to three of those bullet points; you can make the character move on the screen, or enemies do their thing, something you can interact with. At this stage, although the game isn't very deep, it should already be fun. Just moving your guy around in an interesting way should feel a bit stimulating and make you actually want to play the rest of the game.
If it doesn't, figure out why not and fix it. If you can't figure out why it's not fun by this stage, or you can't figure out what would have to change for it to be fun, drop it immediately. If the core gameplay mechanic, the first thing you needed to make the game a game, isn't fun now, it won't ever be fun.
You need it to be fun if you want to use it in your portfolio. If it's not fun the interviewer won't play it much. You don't want it to be too much fun, of course, you really want the interviewer to be interested in it and then move on to the source code or the next game. You want to show them a variety of ideas you can explore, and a variety of techniques you can use.
Include the best programming examples that you have.
C++ is used in the development of a lot of games so try to use that language.
You can use other languages as well through if they show off your programing experience a certain topic.
If you have any well polish projects that involve computer graphics, AI, physics, or multithreading include those since are topics that are used very often in game development.
Another good idea is to go through these projects and provide comments if you haven't already. Include a description of the project and the goals somewhere easy to find in the project.
Overall you should try to use examples that feature the above areas and that show that you know how to structure a large programming project. Game development is alot smoother when you have a good project layout.
To quote an old professor: The first time you program a project you do it the wrong way. The second time you do it in a way that works but is not effective (difficult to modify, not efficent). The third time you program the project it's acceptable.

When should I break into GUI/game development?

I am a hobbyist console C++ developer. I have worked with pointers, arrays, std::vectors, std::strings, classes, and several data structures, including stacks and binary trees. I have some experience in linear algebra and geometry, and know the basics of physics. I do NOT have experience with win32, QT, openGL, DX9, OGRE, etc. I am still learning about the more valuable parts of OOP, like polymorphism.
I started C++ as a first language, and do not have experience with other languages. I could probably work with C, but I'd need to get used to manipulating char*'s and regular arrays (and not initing variables).
My question is, with my experience, when should I break into the development of GUI applications/game applications? Do I need to ground myself more firmly in certain areas of math, become comfortable with win32, get used to SDK?
If this question is too subjective for you to comfortably give advice, then when did you break into GUI/game development, and what steps did you take to make yourself comfortable with it?
Editing this so it will get bumped. Does anyone else have any opinions?
Caveat: I am a very "learn-by-doing" type of person, so take this with a grain of salt.
Sounds like you know enough programming basics to jump into something more realistic, and have enough background to justify that realistic project being a game.
I'd recommend downloading Visual C# Express and Microsoft's XNA Game Studio 3.0.
XNA is a game framework that has a lot of stuff done for you (sound, sprites, 3D support, etc.) built on a professional-quality C# platform and it would be a good starting point. Create a new XNA project and play around. Get some stuff to appear on the screen, then learn to manipulate it with user input. If you are interested in 3D, make a 3D shape such as a triangle. Then, make it spin. Then, make it spin based on user input. Then, add other objects and collisions.
Surely, there will be things in the framework that you don't understand. Tackle them as they come - use Google and ask questions here until you do understand them. Take it one step at a time and you should be just fine.
I'd personally recommend you to start out with Win32; try creating a basic window & move on from that point. Try making a simple 2D game engine in which you are able to make a game like chess or so. This could also serve as project for which you could write an AI; which is another part of Game Development!
After you finish that, the next step should be 3D. You could use the engine you wrote before and modify it from 2D to 3D. Pick a 3D API; OpenGL or DirectX. Once you have a basic engine, start writing a game. Need extra functionality? Then add it to the engine!
Math-wise you should know what matrices are. Trigonometry can come in handy as well.
I wouldn't waste my time with Xna, it's just a hype. :P
It seems you already have gained the basic knowledge of a programming language to start game programming. I'm with you in building on what you have already gained, such as learning OOP, and practicing more with pointers. I recommend you move on and don't turn to learning another tool "programming language" to achieve your goals.
So if you are interested in game programming, I recommend you pick a C++ framework and work on it, you'll definitely learn more advanced programming by just using it.
I recommend Gosu. It's not full of advanced features, which can be an advantage, but it has a very clean design and uses C++ in an elegant and modern way. Which makes it very friendly especially for beginners.
Also HGE is another good 2D engine.
To sum up, dive into programming more by actually "doing it" with what you have now. That's how you'll progress, and you'll be amazed with the results. And when "doing it" don't get disturbed with other languages and tools you already know something similar to it, and at the same time when learning a tool that helps you to build on your current knowledge, in your case I mean the C++ engine, don't choose very complicated ones (IMO, like OpenGL, DirectX, Win32...etc) because you'll end up spending time on learning the tool not using it and there is a great chance you'll get frustrated. You can always learn the low level things later, and it will make a lot more sense then.
as this question is kind of subjective, because every programmer has a favourite library to start with, I will recommend SDL as it is simple, well structured, and very complete, there are a lot of tutorials out there to guide you step-by-step from making a simple window to complex 3D manipulation. Everything can be implemented with ease.
As a side note, if you want to start programming games, I would recommend, also, that you read some tuts or books about a Game basics (initialization, game loop, update cycles), so that you know how to put your knowledge to the good work.

What is a good game involving coding?

I remember the days of Shadowrun that got me excited about hacking. There is CodeWar and LightBot which are both fun (though CoreWar is a little dated). What other games are there involving coding that are fun and challenging that can be used to get someone excited about coding or flex their chops or even learn the basics?
How about RoboCode
You code your tank in Java and let it loose in the 'ring' with other coded tanks. People got pretty into coding strategy, targeting, etc. IBM sponsored it and came up with some nice introductory programming tutorials to get you started.
Here's a great article to get the feel for it:
Rock 'em, sock 'em Robocode!
(source: sourceforge.net)
Uplink isn't so much a coding game, but it is a great game that makes you feel like a hacker.
There's a whole bunch of "drag-and-drop" coding games, where you make a little thing (usually a robot) solve some puzzle by giving it a list of instructions. They're only vaguely similar to actual coding, but they are still pretty fun.
RoboZZle
The Codex of Alchemical Engineering
light-Bot
Not sure if it's considered a "game", but the TopCoder Competitions are fun, and come in various sizes and commitment levels. You can also work on puzzles from the archives for some good programming practice.
The Python Challenge is like those "look at the html source" riddles, but requires a bit of programming to get the answers.
When I was a kid I played "Rocky's Boots", where you had to hook up logic gates to solve puzzles. That had a big impact on my thinking.
Core Wars.
Here's something that allows you to make games and animations: Alice
If you're looking for a board game, you might want to have a look at Robo Rally. In this game 2-8 people are trying to maneuver their robots over the board as quickly as possible, dodging deadly obstacles and trying to shove other people robots into obstacles on the way.
Each game round all players have to "code" the program the robot is going to execute in the next round and then the robots just follow their program. The programs are just five instructions long, but still creating an optimal program can be quite tricky. There usually is very little luck involved, which is why I really like this game.
Similar to Uplink is HackWars. Instead of point and click hacking though, it's multiplayer and you can write your own attack scripts. There's actually an included runtime for writing 2d/3d games and there's a bunch of different places to hook in scripts (for defense, banking, in game website, etc).
Scripting language looks similar to Java.
How about Ai-Board
You play it on your phone/tablet.
It's IDE is built into the game.
It has a built-in node-based visual programming language, whose code-behind is a python-like language.
You write the code, that drives the Ai, that moves the pawns, that plays the game, all still on your mobile device.
YouTube Video: Visual Programming Time-lapse on a mobile device
It comes with quite a few tutorials that introduce the player to programming, genetic algorithms etc, and you get a step-by-step walk-through of all these methods.
It also comes with ready-made scripts that work right out of the box, and are ready for you to copy into your free 'Dev' & 'Test' envs,...
...so that you can tweak them to your heart's content, knowing that you can always revert to the original at any time.
The in-built machine learning engine allows you to
train your AiBot to play the board-game,
play your AiBot against their in-built Ai
play against your own AiBot
breed your AiBot (Genetic Algorithm)
fine-tune your AiBot (Back-Propagation)
...debug your AiBot, and so on.
YouTube Video: Machine Learning is mobile!
Its currently in BETA testing, but soon to be released, and everything described comes for free.
In addition, there are single and multi-player modes as well, but it is primarily a game about coding, coming complete "...with batteries included!"
Project Euler

Resources