New answers tagged

0

I need somehow to delay an initialization of other level's entities Why not add an init() and a terminate() methods to your Level class that does just that? init() populates your level when you're ready to play it, and terminate() cleans everything up when you're done with it. You might want to consider changing your architecture to have Level created ...


0

Based on @felsir's answer, yes it looks like Spine is probably the answer. A graphical modelling tool, it includes exports to a number of game engines. Relevant technologies it includes, which gives me the bibliography I was searching for, are: Free-form deformation so a model defined in a mesh can be distorted, combined with Weights (aka Skinning) to ...


2

You can do something like this. It looks monumentally stupid (Unity has an awesome editor, why not use it?), but just in case you do have a good reason: You can't create scenes programmatically, but you can have an empty scene and add whatever you need programmatically. Using prefabs is probably not the best idea: prefabs are usually loaded only when ...


0

If you have an android or apple device, there's a program called chordbot which I use to compose my music http://www.chordbot.com/ Using it will help you understand music theory by introducing it to you in a far more real-time environment than other composition software and it can output musical score so you can put that keyboard of yours to use :D If ...


0

You have several options: Create a variable public GameObject TreeGroup in your DisableTrees behavior. The variable will now appear as a field in the inspector of DisableTrees. You can then drag the TreeGroup game object to it. Use GameObject.Find to find the tree group by its name. But keep in mind that this method is very slow on larger scene graphs. Add ...


2

Since you're referring to s 2D sprite based game, I would use sprite segments to create the tentacle. Each section inherits the rotation angle from the parent and adds a bit of angle of it's own. Each section n is calculated as section[n].position.X=section[n-1].position.X+cos(section[n-1].angle)*sectionlength; ...


0

It seems that Soft Body Physics comes close, particularly as seen in Skeel Lee's work with goal and surface springs and Pressurized Soft Body with Local Deformation. Note I found the above following the answers on Dynamic body implementation


0

See Do I really need to use a graphics API? Sure, you can ask for a buffer, set some bits in it and write it to the screen. That was essentially the only way to do graphics programming on the PC until the availability of graphics accelerators in the mid-90s from 3DFX. Even in Windows, DirectX was developed to give direct access to video memory. But on ...


2

The above answers are excellent, but none really goes over the most important reason as to why OpenGL and such are preferred. The main reason is to make use of dedicated hardware designed especially to work with things like rendering millions of pixels on a screen, the GPU. With software rendering, using the CPU, the renderer will be looping, one by one, ...


6

While the answers from others are more correct than any answer I could give, I want to point out the fundamental misunderstanding about how software development works that I think underlies your question. While it's always possible to do things "by yourself" without a framework, and there's often great educational benefit from doing so, the reality is that's ...


37

It's not just about speed of execution, but also about simplicity. Although the software rendering used in this example would be a lot slower than using hardware acceleration (i.e. a GPU), drawing a few bitmaps on screen is such a trivial task that you would not notice the performance drop. However, low-level activity like triangle rasterisation, depth sort ...


11

What he does is called software rendering, what OpenGL does is called GPU rendering What's the difference between them? Speed and memory. Rasterization (filling out triangles on screen) takes some time. If you do it on the CPU, you essentially take that time away from game logic, especially if it's not optimized well. And doesn't matter, how small the ...


24

My question is: why even bother using something like open gl, sfml, sdl when all you have to do is simply allocate some buffer, pass a bitmap and draw it to the screen? Short: Because its fast (OpenGL, DirectX). Long: You may think you can do this all yourself. Draw pixels to a screen. You might write a small library to draw shapes, like quads or ...


3

Engines do much more that just draw a picture to the screen. They handle lighting, shadows, input , collision detection. Even just the rendering part is way more complex than just pushing a buffer onto the screen. For 3d scenes especially you need to do a lot of calculations on far more complex data than a bitmap. Let me give you a analogy with a car: What ...


0

If you're willing to restrict yourself to drivers which expose Bindless Textures you can make all the textures you want resident, put their handles in an uniform or structured buffer as sampler2D values and use those transparently in your shader. If not, you could have a series of texture arrays, one for each size and in your shader code branch to select ...


2

What user1118321 says is true -- all the textures need to be the same size. But that doesn't mean you need to USE all the space. For a small set of standalone textures, it's not a big deal to waste some space. You can simply store the U/V coordinates of where a smaller texture ends and use that. When creating the array, just set a max size and make ...


1

I'm not sure what you mean by "so I only make one glBindTexture call throughout a scene." What advantage does that get you? 2D texture arrays require the textures to be the same size. I don't know of any way around that. One other option you have is to use a texture atlas. You can make a single texture that contains all of your assets and simply pass the ...


2

Unity can be used for your simple text based game, which you should not have any difficulty making with its new UI features. Though the people who have mentioned that the a feature rich engine such as unity is not required to make a simple game like that. I would say that there is no harm in using it. It also makes deployment to platforms relatively easier ...



Top 50 recent answers are included