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 5 years ago.
Improve this question
I've learnt just a few basic programs in C# but that much of knowledge might not be enough to program with unity. Can I jump directly to graphics in C#, learn more about control structures, data types, functions, and looping or is there more I need to learn about in order to make my own basic game in Unity 3d? What kinda concepts do I basically need to know in C# to program in Unity? My current knowledge in C# is simply too basic.
For Unity, you user either C# or UnityScript (A sort of JavaScript variant) for programming game logic, and Cg (Very similar to HLSL) for shaders. If you want to spend some money, though, you can also get node based programming tools (Sort of like Unreal Engine 4's Blueprints) from the Unity Asset Store for both.
As for actual concepts, knowing most of the general use aspects of C# is a must (The different loops, Lists and Dictionaries etc), but you also need to learn that Unity has added some things of it's own like coroutines, as well as the fact that Unity is a game engine and how game engine flow works (ie, don't put a loop in the Update method that runs for a long time or the entire game will lag, etc). Reading up on component based architectures is also important, as instead of just having one class per game object, you can have multiple components. This way, you can say add a behaviour (Unity's name for a component) that gives something the ability to pathfind, and another that gives that same object the ability to shoot at the player, etc.
Finally, have a look at Unity's documentation on serialization. Serialization is extremely important in many aspects of Unity, including recompiling your code without restarting the editor, as well as saving/loading and networking if you want to get into such things. It's handy to know how this works though to make sure what you're doing is both efficient and that the engine is treating your data how you expect it to do.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a game in C# and XNA and will be porting it using MonoGame. I would like to know which is a better option for performance.
Should I write and type out my maps in the code of the game itself, or should I create an XML file and store it in their?
By map I mean the layout of the tile-map. It looks like this if I type it in the code:
map.Generate(new int[,]{
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
}, 64);
I am new as a programmer and any advice should help?
Thanks, BlazeCrate
There will be neglagable performance difference between the two as no matter which you use they both will end up being stored as some kind of in memory object. The only potential difference in "performance" is how long it will take to make that in memory object once at the start of the level loading (for something that simple it would only take a few ms extra to load, likely unnoticeable)
Do whatever is easier for you to implement and develop for.
Doing it in XML would allow you to design an editor, so that you can use your own GUI to design your content, allowing you to more easily generate much more complex content. It also allows you to modify your content without recompiling your game.
That said, it depends on the scale of your project, and your goals. You should choose the simpler approach if possible, if you want to eventually release it. If you choose the more complex yet more scalable approach, you run the risk of making the project too complex to finish. If your goal is to eventually release, then stay as simple as possible, but if your goal is more along the lines of learning to be a good software engineer, then choosing the more complex approach could be the way to go.
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 9 years ago.
Improve this question
For a small-sized company I'm going over all possible network solutions to see which one would be best for our Unity games to come. So far I've seen come across the following options:
Unity networking
Photon Cloud
TNet
UnityPark Suite (uLink)
SmartFoxServer
I would like to hear everybody's experience with the products above:
Was it easy to implement?
How was the support?
How well is it documented?
How well is it maintained?
Were there any issues with the connectivity?
What are the general pros and cons?
For what kind of games did you use it?
I know the best solution often depends on the concerned project. However as a company, going with one network solution for all games can save a lot of time on the learning of new products.
While I haven't used any networking libraries with unity3d or games, I've used Lidgren for a project, which (from what I've read) is used for game networking, and can be used with unity3d. I found it quite easy to use and customize to suit my needs, and haven't come up with any serious connectivity issues with it. Of course this being an open source library it may not be what you're looking for, but I just thought I'd point it out.
I've used the Photon Cloud and Network Unity ...
Implementation of the two is very similar and easy to use.
Is well documented, the two.
I'm using them, both for FPS style games.
The style of play is heavy, 3D models, many particles.
Photon Cloud: In game FPS style have lag, however, only used the free version, perhaps with the paid version is better.
Link: http://doc.exitgames.com/photon-cloud/PUNOverview/#cat-tutorials
Unity Network: I did not use external servers, and worked well, but with a few players ... with many for quite some lag.
Link: http://docs.unity3d.com/Documentation/Manual/NetworkedMultiplayer.html
I recommend these two, but depending on the complexity of the game may need to invest money on servers or paid plans.
If you have server external, I recommend Network Unity, otherwise I recommend Photon Clound.
But I think for less complex games free version will serve well.
Hope this helps!
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm looking to create a bot like program and I'm looking to use a screen-scraper to retrieve data such as health which is numerical.
I have no idea how to accomplish this as most screen-scrapers are programmed in c++ as directx is most popular within that.
Is it possible to create a well working c# screen scraper for a directx program?
Thanks.
Outside of kernel mode, anything that can be done in C++ can be done in C#.
With that disclaimer out of the way please know that client-side bots don't work by actually screen-scraping and performing OCR. Instead they hook into DirectX's functions and record copies of the string text sent to DrawText, for example, or the vertices in the current world view graph and then work from there.
I've never really gotten into this area of programming so I can't give you any more specific advice, but I can tell you that you're in for an uphill struggle.
The alternative is just to use common Trainer/debugger techniques and map the memory of your target process. I assume you're targeting a game of some description, however said games often feature very heavy cheat-detection and prevention techniques and trying things out on a public server can get you banned for life (e.g. Steam's VAC).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm a student, I'm doing my final year project. It's for deaf students.
How can I create 3D human character?
How can I control that human characters movements via a vb or c# program
such as when I'm type in a text box "Right hand" The 3D model shod raise his/her right hand.
Are there any suitable libs for my need?
To my knowledge there are no libraries working on an abstraction level so high as you are describing.
I think you should look into some 3D game engines/libraries. I know that XNA is quite popular for C#. It is not as simple as importing a 3D model and telling it to raise its right hand though.
i would look into XNA
start off with 2d then move onto 3D
there are some excellent videos here
http://www.XNATutorial.com
you should be able to skip most of the theory lessons
you may also want to check out the first tutorial here as well
http://create.msdn.com/en-us/education/gamedevelopment
whilst its not technically a game you are developing the theory is the same
WPF is definetly the wrong approach for that because it has only a low performance if you use too complex models. It is also complicated to build 3D models in WPF.
As Yakyb and andvin said XNA would be a good choice.
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 5 years ago.
Improve this question
I want to write simple application with some 3D objects for Windows OS.
The application is very simple, like a gallery where we can move and see some pictures. When users go to the some picture and click on it a window will open and show picture with some information.
Which is the best framework for this task WPF, XNA, or something else? Application will be written in C#.
I can not say which is best, but I have done a while ago some things with the WPF 3D API and I liked it.
It was IMO very simple to use and the rendering seemed to be relatively fast. A really nice thing I found, was that it has an object-model that contains high-level-events such as mouse-down and click. Therefore you don't have to do much math. However, maybe provide also other APIs such high-level services, I don't know.
I would not try to create an action-game with it, but for a small app as you have described, I think it is worth a try.
Unity has been used for similar stuff. It can work on browsers (via a plug-in) or as a program, has a lot of documentation and most of the work involved in creating a 3D environment and interface is already done. Code can be written in Mono (open source C# implementation), JavaScript or a Boo, a modified Python scripting language.
It works in Windows, MacOS, iPhone, iPad and Android. And it is free in the standard version, or really cheap.
XNA is a little lower level, so it will require more work to get things started. It supports Windows, WP7 and Xbox 360.
See this discussion : WPF VS XNA