How to make a Unity3D game just using C# [closed] - c#

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 7 years ago.
Improve this question
And is that possible for Unity3D to do the same thing like Opengl to draw the vertices on the screen?
What I want to do is to migrate a XNA project to Unity environment in order to make it cross different platforms.

Maybe using Meshes will do the work for you :)
You can render meshes consisted of vertices & normals & uvs & indices.
Click here for the documentation

If you must have custom rendering there are GL and Graphics classes you can use. Render to texture is possible too. In Unity, code is usually written in class that inherits MonoBehaviour and it has Start, Update (once per frame), FixedUpdate (physics) and other callbacks for you to use.

Related

player changing the reference in-game [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 months ago.
Improve this question
friends, when I wrote a script for a circle to rotate at a certain speed, we can normally change the speed from within unity, but I also want the player to change the speed just like we change the speed in unity, I searched and couldn't find it, can anyone help?
You will need to add a UI element such as a button, slider or inputfield, then connect the event to a method in your script to change the speed.
https://docs.unity3d.com/ScriptReference/UIElements.Slider.html
Video tutorial: https://www.youtube.com/watch?v=k2vOeTK0z2g

Realtime mesh deformation of soft objects [closed]

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 3 years ago.
Improve this question
My problem is simulation of soft object deformation on user interaction, like when you touch ball with sand inside it deformes its edges in spots you press on ball. How can I achieve it in Unity3D?
Soft body dynamics is a very complex topic, which is why most physics engines constrain themselves to rigid body dynamics. I am pretty sure that no one on StackOverflow is going to code this for you. There are some commercial solutions for Unity though, Obi Softbody and Truss Physics to list a couple.
Here is a cheaper but probably less feature complete option:
https://assetstore.unity.com/packages/tools/physics/b-soft-body-deformation-53378
There are many different ways for simulating soft body physics, one common way is to map the vertices to a lattice of points (with some weight), and then simulate spring contraints between the lattice points. These types of lattices are probably best simulated with verlet integration.
Here is a research paper on lattice shape matching.
Here is another paper on pressure models.

Finding bar code from an image file [closed]

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 do have a set of image files. Some of the files contains a bar code and I want to separate those from others. In c# how to find the presence of a bar code in an image file??
You have to apply some computer vision algorithms. You can develop them using OpenCV (via P/Invoke in C#), or EmguCV (http://www.emgu.com/wiki/index.php/Main_Page) which is .NET wrapper for OpenCV. There are also libraries made specific for barcode detection - ZXing comes to my mind.
If the bar codes are located at fixed positions, you can simply save these areas from the images to separate images and process them. If you need to locate the barcodes in the first place, you can use EmguCV for pattern recognition.

2d-bin-packing Algorithm to place a rectangle in x,y location? [closed]

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 am implementing 2d-bin-packing algorithm in canvas. My task is to place rectangles as optimal as it can be on a canvas.
the following shows how to do it:
http://incise.org/2d-bin-packing-with-javascript-and-canvas.html
BUT, it starts with the origin. I would like to tell the algorithm where to put a rectangle and that the next one not to be on top of him.
What should be changed in the code?
Is there another algorithm to use for it?
I know a better algorithm(in terms of compactness, not speed) than the one you linked to is called MaxRects.
This was my implementation of it in C++. While not fast, it was very effective at packing compactly.
This is a pdf discussing and comparing all sorts of algorithms in terms of both time and compactness.
EDIT:
I threw together an example of an image packed using MaxRects .

How can I make a GUI for my C# XNA game? [closed]

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 1 year ago.
Improve this question
My game has basic functionality and is playable with a command line, but I would like to put a GUI on top of it.
It is a platformer type game written in C# with the XNA framework.
I have googled and found a few libraries, but they all seem very gum and duct tape. Is there a mature or standard way of making a GUI for my situation?
The standard answer is: look at the Gamestate management tutorial in Education Catalog.
This doesn't give you very nice widgets, but rather shows a way of managing the game flow and some menus (including pause menu).
NEOForce Controls
Full featured, open source GUI library for XNA 4.

Categories