Game Development using Unity3d - c#

Pako Game
Hi there, I am just starting game development. Specifically with Unity, Android Studio, and C#. Me and my group planned to make a game for our thesis. The problem is that, our professors want us to make a 3D game if possible. Our proposed game is something like Dr.Driving a car simulation where it involves safety signs, road signs and their regulation. Wherein it should look like in the picture(the pako game)
And my question is that, is it easy to make a 3D game for someone newbie like me? Is there any way where I can just import package assets or API? so that I won't spend much more time in designing the environments and even the car?
Your reply will be appreciated. Thank you very much :)
credits to the picture: Pako Game

Spent some time learning the interface, Unity3D is a game engine and as any other game engine, is just a toolbox that let you do things in multiple ways: https://unity3d.com/fr/learn/tutorials/topics/interface-essentials/interface-overview
Forget about your project and spent some time discovering Unity SDK, make a simple pong or tetris or space invader just to get a habit of how Unity forces you to do things it's way (quite different than common OOP)
Discover the Asset Store to find packages that could help you, at least for the visual and the 3C of a game (Character, Camera, Control)
Then and until then, you can be able to sit down and implement your custom game logic. Good Luck.

is it easy to make a 3D game for someone newbie like me?
There are a lot of flavors of newbie. You will need to:
Have or gain some mastery over the Unity interface.
Have or gain some mastery over programming (I'd say in C#).
Have or gain some mastery over Blender* (or rely on 3rd party assets)
Have or gain some mastery over Audacity* (or rely on 3rd party assets)
Have or gain some mastery over story-telling, project management, etc...
So perhaps the easy answer is, "No."? Ultimately, what is easy for one is not easy for another. Easy or not, there will be a lot of work involved, if you plan to create anything worthwhile. That's how it "works".
Is there any way where I can just import package assets or API? so that I won't spend much more time in designing the environments and even the car?
As mentioned, the Asset Store can help you get quickly from A to B or even X, Y or Z. There are assets that are basically complete mini-games, ready to be branded and rolled-out, and there are assets that are just a model or pack of sound-effects. And of course, everything in-between.
In your case, it sounds like you might also need to have or gain some mastery with a modeling tool, such as Blender. It might be your easiest way to get the specific assets you need in terms of the safety signs, but then again, if you are using generic stop and yield type signs the chances are the assets can be found in either the Asset Store, or a 3rd party site like a Blender model site.
*Note: I mention Audacity and Blender because they are free to use, but of course you can use whatever software you like to create your audio and graphical assets.
For those who find the learning curve of Unity too steep for their time or their project, perhaps something like Game Builder would be a better starting-point.

Related

Cloth digitizer! Making 3d models of real Cloths

I have this project of mine that I'm working on. It's for a clothing store, He need all his clothes to be available as 3d objects on the PC for different purposes later on.
I've been doing some research and I guess the only possible way is to get a model that wear each cloth, she stands on a board that will rotate in one way and a camera will.be taking shots at different angles.
I might be complicating stuffs but I need to know if there exist any other techniques for achieving this.
I don't mind any idea even if it requires electronics. Some hints will be helpful.
I think what you are searching for is a program called reconstructMe
here's the link.
what you need is a Kinect.
some other programs are also possible simple google search
I hope this helps!
edit:
if you want to do thing yourself, you might want to take a look at point-cloud-library here. It does require some C++ coding, I am working on a C# version though, so for more info on the wrapping you can msg me.

C# Robotics platform (i.e. "human sized robot")

Edit: Nominating for reopen as this definitively falls in under FAQ section "matters that are unique to the programming profession".
I want to program robotics in C#. This question is about existing kits/components to do so. I welcome any pointers on where to start. For example: Is Robotics Studio a good platform for this project?
The use will be a hobby project where I program the robot to drive around in my house and perform maintenance (like getting me a glass of water). I want to put my efforts into object recognition and controlling movement (driving, arms, etc). I do not want to spend time building a robot. This is not a robotics project in that sense, it is a software project.
Are there any human sized robots with .Net SDK (or something I can P/Invoke)?
It does not need to be fully adult human sized as long as it can reach stuff on tables and similar. It also doesn't have to look like a human being.
Very large robots are expensive, powerful (and power-hungry), heavy, and in many cases absurdly complex. Hobby-oriented robotics focus on devices that won't result in injury and/or death when things go wrong.
This is a bit like asking where you can buy a remote-control helicopter at 1:1 scale.
But to get you started, I'd recommend learning to work with embedded devices so that when you build your army of killer robots (as you undoubtedly will), you'll know how to control the motors, lights, sensors, etc. C# and .NET programmability in embedded devices is not a common thing, but lucky for you, a new chip was recently announced that does just that.
Check out the Fez Domino. It's largely compatible with the more popular Arduino platform, but you program it with .NET instead of C -- which is why it's twice as expensive. Much of the necessary work for controlling motors, lights, sensors, etc., with such a device has already been done for the Arduino platform, and that should largely translate over to the Fez Domino. Though, of course, you'll have to re-write the code in C#.
Even if you want to control your legion of death-bots via full-power computers, you'll often use a micro-controller like these to handle the IO with external devices, since they're better at that sort of thing, and you can communicate with them with simple computer-friendly protocols, like serial over USB.
Start small! As tylerl suggested, the Fez Domino looks like a great board to do some microprocessor work in C#.
Start out doing some smaller projects (if you haven't already). Perhaps build a line following robot using a Netduino or similar. There are countless kits out there, or you can just build your own pretty easily.
Once you've gotten that going, maybe graduate to doing some basic vision processing with a more powerful board (Fez Cobra, etc) or just strap a laptop to a bigger bot (this has a lot of advantages such as great processing power, being able to use the full blown .NET framework instead of just the Micro framework, you can use off the shelf components like web cams, etc).
If you want to become proficient at any kind of development with robotics, you would benefit from some knowledge of electronics. These small projects can help you build that up.
You can use Bioloid (http://www.robotis-shop-en.com), some robocup teams use them to participate in humanoid soccer league.
It's a very good platform (good materials and is easy to change or add components)
Other platform is NAO (http://www.aldebaran-robotics.com/) is used in Robocup standard platform league. In my opinion is very expensive for a hoby. In a closed platform it means that is very dificult to change/add components.
http://wiki.robocup.org/wiki/Humanoid_League in this humanoid robocup page you could find humanoid TDPs (team description papers), that provide very usefull information.

C# XNA: AI Engine?

I'm developing a game with zombie running around in a swamp. I want AIs to have functionality like "chase this target" or "run away". A major stumbling block is pathfinding. Is there a good pathfinding/AI engine in XNA, or should I roll my own?
Does anyone have any experience with this: http://www.codeplex.com/simpleAI?
you may want to look for A-Star algorithms... here is an article that talks about it in the context of a winform, but mentions XNA.
Roll your own! Seriously.
I take it you're making this game as much for the enjoyment of coding, as you are hoping for fame and riches? Pathfinding is one of the staples of AI, and is a well studied and documented topic. It is an excellent introduction to a field you'll need knowledge of in future game endeavours.
The A* Algorithm (as mentioned by others) is the standard solution to this problem - but try other approaches: line-of-sight, scripted movement, flocking... often you can derive interesting behaviour from combining a few techniques.
For a book on the subject, try AI For Game Developers - not the best in the field, but certainly an accessible introduction for the lay-coder.
Have fun mucking about with the zombies!
http://xnapathfindinglib.codeplex.com/
http://swampthingtom.blogspot.com/2007/07/pathfinding-sample-using.html
To everyone that's suggesting A*: you generally wouldn't put vanilla A* into a game. There are a lot of improvements and extensions for A* including (but not limited to) IDA* and transposition tables, that improve performance with A*-based search.
You might want to use a library to get you started but you may ultimately benefit more from your own custom implementation, using your own data types native to your app, instead of having to marshall data back and forth. But you'll need to profile to be sure.
The XNA Creators club has samples for Chase and Evade and Flocking.
I've just started down the path, but they seem to have some good resources on the creators.xna site.
I'll be using some pathfinding logic in my game, the A* Algorithm seems to be the winner for me.

Game engine development question [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am thinking of making a simple game engine for my course final year project. I want it to be modular and expandable so that I can add new parts if I have time. For example I would make a graphics engine that would be completely independent of the other systems, once that was finished I could add a physics engine etc.
I would also want to make a tool set to go with this engine. For the tools I would like to use C# but I am not sure about the libraries. My question is, if I want a C# GUI program, can I reference a library written in C++? Also would there be any performance problems etc. if I made some of the libraries in C# but wanted to use them from a C++ game.
I would like to avoid C++ as much as possible, my experiences have shown that development time can be a lot higher for a project over that of using C# or Java etc. My graphics development would be in OpenGL, this is all I have been taught. We have only done this in C++ but I have seen that projects such as SharpGL allow for the development with C#. Is there any performance issues with this. I am not looking for a blindingly fast, top graphics game. It will most likely be something simple to show my engine working. My engine probably won't be that great either as I only have a year and am working on my own.
Any advice on this would be appreciated. I am still really in the planning stages so it wouldn't be too much work to completely change what I want to do. I would just like to preempt any major problems I might have.
Thanks
If you can pull this off even under a relaxed set of goals, you're set for a great project. First, you need to get a grasp of scope:
How long do you have to work on the project?
How many people are working on the project?
If you can only create one "piece of the pie" on your own, which one would you pick? Use this to establish a working plan to make sure if you don't get as far as you'd like, you still have enough to make the work show as a great project.
A game engine is a big development task. A game engine with a toolchain is an enormous development task. In a lot of ways, choosing a smaller but more challenging task is preferable because it shows higher-level thinking about problem solving, which is greatly preferred by academics - double that if you are CS and not [Area of] Engineering. Since you are working in managed languages, things you may want to consider are:
Expressing gameplay logic (rules of the game) in a clean manner so as to provide an efficient and reliable path from designer->developer->tester. If you want, this could absolutely include the manner in which you describe the rules (Custom editor? Code API? DSL?)
Game AI has no shortage of extremely challenging problems.
Physics and graphics are interesting and I believe managed languages will eventually be used in these areas, but you may find yourself a bit more limited in your ability to solve these problems. If I were going to work in this area now, I would be trying to answer: "If I could use a managed language for writing [graphics|physics] code without hurting performance, what kinds of [language|runtime] features make the most difference in improving the expressiveness, correctness, maintainability, and reliability of the resulting programs." This goes way past simply having garbage collection and pointer safety.
You should look into XNA. It performs quite well, and from what I've heard, is quite easy to work with.
About referencing C++ code from C#: It's perfectly doable, though it will take some effort from your side to get it right. C++/CLI can work as an intermediate wrapper or you can use P/Invoke. Just remember that C++ is unmanaged and that you will need to do some manual garbage collection, which can be somewhat icky in a managed environment like .Net. Perfomance in the C++ -> C# bridge is okayish, but I'm unsure how it will perform if you need do 100.000 calls to a math-library each second. I guess a small test would be good.. I'll see if I get time to do this later today, though I somewhat doubt it :)
When creating a graphics engine (I'll only really speak about graphics as that is my area of expertise), these are a few of the choices you need to make EARLY in the project:
1) Is it an indoor and/or outdoor engine?
2) What sort of visibility system are you going to use?
3) Forward or deferred renderer?
4) How will you have animation hierarchies?
5) Dynamic or static lighting?
6) How are you going to handle transparency?
7) How will you handle a 2D overlay?
8) What mesh formats will you use? Roll your own?
Bear in mind you need a GOOD solid vector/matrix library and preferably a full maths library that will help with things from eulers to quaternions to axis-aligned bounding boxes.
Do a lot of research as well. Try to find out what the potential problems you are going to face are. Remember things like changing a texture or a shader can have HUGE impacts on your pipelining. You need to minimise these as much as possible.
Bear in mind that getting a rotating bump mapped mesh on the screen is simple by comparison to getting an engine running. Don't let this put you off. It should be no problem to write a fairly simple game rendering engine in a matter of months :)
Also ... find communities specific to this area. You will get a lot of good (though non-OpenGL-centric) information off DirectXDev. There is a fair bit of general game development algorithm information available at GDAlgorithms. There is also an OpenGL specific mailing list here.
Its worth noting that DirectXDev and GDAlgorithms, at least (I don't know so much on the GL mailing list) are populated by some VERY experienced 3D engine and game developers. Don't post up lots of "beginner" questions as this does tend to breed contempt among the members. Though the odd query or 2 at whatever level (beginner to advanced) will get amazing answers.
Good luck! I wish I'd had the chance to do this at University. I might not have gone off and joined the games industry and enjoyed an extra year of sleeping late ;) hehehe
Why do you need any C++ code?
There are already several wrapper libraries exposing OpenGL or DirectX to .NET, such as SlimDX (which, as the name implies, is a much thinner, more light-weight wrapper than something like XNA)
If you're more comfortable with C#, there's no reason why you couldn't write your entire game in that.
Performance generally won't be a problem. In most cases, the performance of C# code is comparable to C++. Sometimes it's faster, sometimes it's slower. But there are few cases where C# isn't fast enough. (However, there is a significant performance cost to interfacing between native and .NET code -- so doing that too often will hurt performance -- so the trick is, if you use native code at all, to have sufficiently big native operations, so the jump to/from .NET isn't done too often)
Apart from that, a word of advice: Don't bother writing an "engine".
You'll be wasting your time producing a big monolithic chunk of code which, ultimately, doesn't work, because it was never tested against the requirements of an actual game, only what you thought your future game would need.
If you want to experiment with game development, make a game. And then, by all means, refactor it and clean it up and try to extract reusable parts of the code. But if the code hasn't already been used in a game, you won't be able to use it to build a game in the future either.
The engines used in commercial games are just this, code extracted from previous games, code which has been tested, and which works.
By contrast, hobbyist engines pretty much always end up taking 2+ years of the developer's time, without ever offering anything usable.
The whole concept of a "game engine" is flawed. In every other field of software development, you'd frown at the idea of one vaguely-defined component doing basically "everything I need to make my product". You'd be especially suspicious of the idea that it is a separate entity that can be developed separate from the actual product it's supposed to support.
Only in game development, which is by and large stuck in 80's methodologies, is it a common approach. Even though it doesn't actually work.
If this is a school project, I'm sure whoever is supposed to grade it will appreciate it if you apply common good software practices to the field. Just because many newcomers to game development don't do that (and prefer to stick to some kind of myth about "engines"), there's no reason why you shouldn't do better.
Make sure your scope is feasible.
As a teenager I went through the build-my-own-engine phase, a few years later I realized I would have gotten a whole lot more done if I had just used pygame and pyopengl and not wasted the effort.
Check out the forums at gamedev.net.
Sounds to me like you have a pretty good plan for your project. (I get your point about XNA in your comment to #Meeh)
You can interop with C++ via P/Invoke directly or COM, you could also I guess come up with some SOA way of doing it, but to be honest as yucky as this sounds I would be inclined to target COM as your API lever of choice...why? because then you open up your API to a lot of common client language's not just C# and VB.NET you will also get Delphi, VBA, Powerbuilder etc.
Performance should not be a problem as the API entry points are just to kick of the work and transport data structures, the real work is done in your library in native code, so don't worry too much about the perf. ATL will be your friend with creating COM Classes that provide entry to your Library.
Whilst it's certainly do-able to bridge between C++ and C# (Via managed C++ is a good way to go if the interface is complex, P/Invoke for a very simple one), for tool<->engine communication I might suggest instead a network based interface. This is ideal for a high-ish level interface, such as you might want for a level editor/model viewer or such. An actual object modeller is not such a good target. What tools do you envision?
If you do it this way you gain the ability to connect to remote instances of the engine, or multiple instances, or even instances running on different hardware platforms. It'll also teach you a bit about sockets if you don't know them already.

OpenGL game with multiple entities on screen at once, what language to use?

Going to create a small game with OpenGL as a side project. Going to be a top down shooter with emphasis on large numbers of enemies (the more the merrier)
Thinking about having the resolution max out at 800x600 (for an old school feel)
What language would you recommend, is C# capable of handling the number of entities I want on screen (60-100) or should I try out C or C++ or even some other language.
Do you have any other suggestions when going for a project like this, special documentation you recommend etc.
C# is easily capable of handling a few hundred objects at once. The real speed issues come from rendering, which will not be in C# space, and possibly any computation you want to be done for each object, such as physics. Ideally you'd be using a library such as Box2D or Chipmunk for that anyway, making C# speed a non-issue there as well.
I'd personally be willing to write a game such as this in even-higher level languages than C#. C# should easily suffice.
On the scripting languages tip, consider the excellent Pygame in python:
http://www.pygame.org/news.html
Or the newer LÖVE in Lua
http://love2d.org/
For a top-down shooter both are probably excellent choices.
Have you considered Haskell, D, or ADA?
C# will definitely be able to handle a paltry 60-100 OpenGL-rendered entities on any reasonable hardware.
Generally, for a project of this scope I would recommend using whatever language you want to learn next.
Your project scope isn't huge, but is meaty enough that it would probably stretch your knowledge of the language you choose a bit. So choose one you want to get better in.
I've only ever dabbled with it but LWJGL will facilitate a Java version. All of the in-house games at puppygames.net are done in Java with LWJGL, for instance, and curiously they too are top-down or side-on blaster style games.

Categories