Jump to content
  • Advertisement

traxix

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

143 Neutral

About traxix

  • Rank
    Newbie
  1. Boy, it would have to be SOME game if you need to use C++ for performance reasons.
  2. Hey Nemox! I had problems with events too, but after seeing a short example and just looking at it an inspecting it, I understood how they work. Here's the code:   class Button // Button.cs { public event Action Clicked; //An event taking in a type delegate Action. public void OnClick() //The way we will initiate ALL the subscribers of the event Clicked. { if (Clicked != null) //We check if any action is subscribed to our event. You must always do this. { Clicked(); //We initiate ALL actions subscribed to this event. } } } class Program //Program.cs { public void Main() { Button button = new Button(); //We create an object called button, from the Button class button.Clicked+= HandleClick; //We subscribe the function HandleClick to the event. button.OnClick(); //We initiate all the subscribed functions to the event. Console.WriteLine(); //ignore this, it's just so it adds a line between both calls. button.Clicked+= AnotherClick; //We can subscribe as many functions as we want. button.OnClick(); Console.Readkey(); } private void HandleClick() //This is the action we subscribed to the event. { Console.WriteLine("The Button's Click event was fired"); } private void AnotherClick() //This is the action we subscribed to the event. { Console.WriteLine("The Button's Click event was fired AGAIN!"); } } Of course we are not actually clicking here, I've just used it as an example. So the output of this program would be. The Button's Click event was fired The Button's Click event was fired The Button's Click event was fired AGAIN!  I encourage you to just look and inspect this code, and event's will be cleared up for you in no time. Feel free to ask anything about the program you don't understand.   Also, you can unsubscribe actions from the events too. So you would basically say:   button.Clicked -= HandleClick; This will remove the function HandleClick() from firing when the OnClick() event is triggered. Unsubscribing is an essential part of using events. Sometimes when you have an event subscribed you unsubscribe It right after its used. So it can be triggered again next time. That way you can use one event handler like OnClick(), and check if different events have been subscribed to and fire them when they do.   Cheers!
  3. Yeah, I totally know what you're saying, I forgot to mention in my post that you should practice after following tutorials. But yeah, copying code won't get you anywhere, after doing a tutorial, one should always try to make something from scratch.
  4. So just wanted to put an update on this thread, if any beginners are reading. I've set up a step by step guide, for how to progress through game programming with C# and XNA.   EDIT: If you don't know C# but are looking to start. There are a lot of resources you can find. I personally find RB Whitaker stuff to be excellent for beginners. http://rbwhitaker.wikidot.com/c-sharp-tutorials   To begin with XNA, the first thing you should do is follow this tutorial. It will set the fundamentals of 2D game programming for you. Try to add features to the game, and to modify it. You should then search for more resources until you feel comfortable with 2D game programming. http://xbox.create.msdn.com/en-US/education/tutorial/2dgame/getting_started   XNA adventures from SixOfEleven is also a great place to learn 2D game programming. He has a series of XNA tutorials for making a whole RPG! http://xnagpa.net/xna4tutorials.php   After learning 2D game programming, and when you think you're ready to move on to 3D. Here are some essential things you should read. http://blogs.msdn.com/b/davrous/archive/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript.aspx In the prerequisites section, there are great links which will explain how 3D space works, and how 3D programming is done, and if you want you can follow along with the tutorials.   Next, you should definitely check out RB Whitaker's site. It will help you build up your 2D programming knowledge, you'll learn how to make a particle engine, and how to expand the content pipeline!, and it has great tutorials about implementing a 3D model and animating it. And it also has great tutorials for HLSL, when you think you're ready for them. http://rbwhitaker.wikidot.com/xna-tutorials   What I'm currently doing, is learning 3D graphics programming on BBeck's site. Which set's the fundamentals of 3D game programming. These tutorials for me, are like the first 2D tutorials I did, and is making me greatly understand how 3D games work. http://virtuallyprogramming.com Check out the fundamentals section, and after that head straight to the Tutorials section, do the Holodeck tutorial and experiment with it as you did with your 2D games. You'll learn A LOT from these tutorials, and you'll start understanding how the 3D system works. Afterwards continue with the rest of the tutorials.   That's how far I am, and I'm learning more every day, until I feel confident and ready to use Unity as a game engine.   Have fun in your game development adventures!
  5. You should never use low level programming for making games, if you actually want to MAKE and FINISH games! The lowest level you should go is C++, which is what everyone does. And depends on the game you want to make you should only go higher level. The only reason people use C++ is because the code runs faster than say, C#. But this is for crazy games like Crysis, Battlefield, Skyrim etc, who really need that performance. If you want to make games and finish your games, and you can achieve the result you want without writing in C++, I have no idea why you wouldn't use C#, which will save you thousands of lines of code, and XNA is a great platform.
  6. Thanks, my main direction in school was math, so I've got that pretty much covered. However I really need a list of subjects for game programming and graphic programming that I need to learn. Maybe with a list accompanied with tutorials and resources too. :)   As you're telling me all the stuff that I know, but I don't know where to start. Cheers!
  7. Well, I meant more in the line of, a list of topics that you need to have learned, before getting into a game engine. I know it's kind of a bad idea to get into a game engine, without any previous knowledge of some required topics that you absolutely have to know, otherwise you'd be lost. And as a beginner and newbie in game programming, I really feel that finding the answers for a list of topics you have to know and a good list of tutorials and resources, has been daunting so far. But I'm finally getting around to it. Cheers!
  8. Hey guys, I'm new here :) So I was thinking about game programming and using a game engine. And everyone's been saying that you should first do some game programming and graphics programming before you actually use a game engine, so you know how things work on the programming side of things.   So my question is: Basically, what is everything you need to learn in game programming before using a game engine (like Unity)? I personally have been learning C# and XNA and I'm pretty new at it, and C# is used in Unity as a scripting language, and I always intended on transferring to Unity after learning everything I needed to know. So I really need to know everything I need to learn before going to Unity. Meanwhile I'll be learning that in XNA or SharpDX. Feel free to post about general knowledge you need to have before using a game engine that's not language specific. Cheers!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!