|
crm posted:Are there any tutorials for Unity 4 yet? Like the other replies, not specifically 4.0, but UnityCookie has some fantastic tutorials. Free to watch the videos and read whatever text accompanies, $10 a month if you want to download the videos and get access to their assets (also gives you access to the other sites they run, like BlenderCookie if you're a Blender user). http://cgcookie.com/unity/ 3DBuzz also has some good Unity tutorials, including a pretty long Tomb Raider style platformer setup, but their website is total garbage for finding anything in a timely fashion.
|
# ? Dec 16, 2012 19:09 |
|
|
# ? Jun 3, 2024 10:58 |
|
Gordon Cole posted:I've been doing a little research on C++ engines and frameworks because I'm planning on using C++ for my next game project. I haven't tried it yet beyond building the demo, but Angel2D looks really nice, and it has built-in LUA hooks so you can tweak variables, run scripts or whatever at run time. Jewel posted:I might quickly ask Garry what he uses via tumblr. I'll get back to the thread when/if he answers. I got onto Garry about what library he uses to bind/hook lua onto C++ for GMod, and uh, weird response. Garry posted:I don’t use a library.. I don’t think you really need one. I just made a few macros and a class factory. That seems like it would be hilariously obtuse to work with, but since I've never played with lua myself yet I can't be sure Edit: Keep in mind lua plays a HUGE part in gmod, in the sense that every gamemode, weapon, entity, npc, and tool, are all coded in lua and bound onto the source engine.
|
# ? Dec 17, 2012 13:48 |
|
One of the coders for a mod I worked on used luabind and I believe it worked pretty well. E: but luabind seems deprecated by now.
|
# ? Dec 17, 2012 13:56 |
|
KaneTW posted:One of the coders for a mod I worked on used luabind and I believe it worked pretty well. That seems like what I'd want, yeah. No idea why Garry's hand rolling his own but I mean, it works..??
|
# ? Dec 17, 2012 13:58 |
|
Jewel posted:That seems like it would be hilariously obtuse to work with, but since I've never played with lua myself yet I can't be sure luabind is pretty good though, I think a fair few games make use of it.
|
# ? Dec 17, 2012 15:39 |
|
Jewel posted:That seems like what I'd want, yeah. No idea why Garry's hand rolling his own but I mean, it works..?? I dig luabind, myself. Shalinor fucked around with this message at 17:12 on Dec 17, 2012 |
# ? Dec 17, 2012 17:10 |
|
Suspicious Dish posted:Sounds painful. Is this a joke that I'm not getting or do you not like pyglet and why?
|
# ? Dec 17, 2012 17:14 |
|
'derping around'
|
# ? Dec 17, 2012 18:01 |
|
So before I went to bed I finally actually read a bit more about lua rather than asking the thread about it, and somehow didn't know lua already came with lua.h and lualib.h, so I feel like a real dummy!! After reading up a little (Will do more tonight) on using it from the book Programming in Lua, I'm totally understand how Garry would have done it now, yeah, but also I'm a little confused as to why someone would use luabind? From what I looked at the documentations of that, as of now it doesn't seem any less complicated than using the headers that come with lua
|
# ? Dec 17, 2012 21:41 |
|
KaneTW posted:One of the coders for a mod I worked on used luabind and I believe it worked pretty well. There are also some nasty interactions between luabind and the rest of boost - specifically shared_ptr and weak_ptr and the way object construction works - that make it tough to integrate with a larger game engine. Luabind's appeal - i.e. why would you use it - is roughly the same as boost.python's. When it works, it automatically figures out things like argument types and can marshal things onto/off of the Lua stack for you. Great in theory, especially if you want to have a codebase that mixes C++/Lua without hand-writing and maintaining tons of Lua glue. On the other hand if you are already a Lua expert, I bet you could probably use luabind to save yourself a bunch of time when building something huge, just because they did a bunch of the work for you already. It'd probably be trivial for an expert to go in there and sand down the rough edges.
|
# ? Dec 17, 2012 22:26 |
|
Kaelan Zero posted:Don't use luabind for anything you plan to keep. It's kind of a nice place to start if you just want to mess around - and if you've used boost.python it'll feel familiar - but it's incredibly buggy and has lots of rough edges. It also has some really subtle performance issues that make it a no-go if you're planning to use it in games. For example, when I used it I discovered that it called strcmp() for every table access on every object you exposed to Lua, every time, even though a basic understanding of Lua architecture would make it obvious that you don't need to do that. So I'm guessing I might as well just hand-roll it like Garry did. It doesn't seem like luabind's worth it imo.
|
# ? Dec 17, 2012 22:28 |
|
I really like javascript/html5 for making simple browser based stuff. I've been working on an artillery game. I think it's mostly finished, but any comments/suggestions are welcome. I've only tested it in Firefox and Chrome however.
|
# ? Dec 17, 2012 23:20 |
|
Jewel posted:So I'm guessing I might as well just hand-roll it like Garry did. It doesn't seem like luabind's worth it imo. If all you need is to bind C functions and expose them to lua, then this is really simple to do. The harder part comes in when you are trying to fake lua classes and bind them to C++ classes.
|
# ? Dec 18, 2012 02:33 |
|
xgalaxy posted:If all you need is to bind C functions and expose them to lua, then this is really simple to do. Ah, this is probably where I'll go wrong then. I was about to settle in and read a bit more of the book but yeah most of the examples I've seen were functions not classes. Hmmmh. Still don't feel luabind's the way to go, and the other libraries someone said they used are a full api, not just for lua, so I don't really wanna use that either..
|
# ? Dec 18, 2012 02:34 |
|
Jewel posted:Ah, this is probably where I'll go wrong then. I was about to settle in and read a bit more of the book but yeah most of the examples I've seen were functions not classes. Hmmmh. Still don't feel luabind's the way to go, and the other libraries someone said they used are a full api, not just for lua, so I don't really wanna use that either.. It can be done, it's just more involved, more error prone, and honestly kind of hacky, to bind to C++ classes with Lua. You're better of just exposing straight C functions. You don't necessarily need to bind C++ classes, it it depends on what your requirements are. An alternative is http://www.squirrel-lang.org/ which is basically Lua with real OOP support but I have no idea how simple it is to bind to.
|
# ? Dec 18, 2012 02:41 |
|
Squirrel uses nearly the same binding model as Lua. If you're looking for an "automated" Lua binding generator similar to Luabind, LuaBridge (https://github.com/vinniefalco/LuaBridge) seems promising at least.
|
# ? Dec 18, 2012 14:02 |
|
This is probably the most common question here, but how can I make games that don't look like they were made by a 13 year old with a copy of RPG Maker if I don't know how to draw worth poo poo?
|
# ? Dec 19, 2012 00:02 |
Rip off graphics, practice practice practice, find someone to make graphics for you, or make an "artsy" game and if people complain about the graphics just imply that they don't "get it".
|
|
# ? Dec 19, 2012 00:09 |
|
Manslaughter posted:Rip off graphics, practice practice practice, find someone to make graphics for you, or make an "artsy" game and if people complain about the graphics just imply that they don't "get it". That said, it's arguably still important to include the 'juice' factor, as I believe the tower of goo guy calls it. eg. make your buttons pulse and make a sound when clicked, make your submenus slide in / fly out of things / do something other than just appear instantly like a Windows window, make your score display roll up rather than just updating, make things that *do* appear and dissapear, appear and disappear in a splash of sparks, that sort of thing. That's a big part of what makes a thing look polished, and yes, it's time-consuming and kind of boring to do.
|
# ? Dec 19, 2012 00:34 |
|
roomforthetuna posted:That said, it's arguably still important to include the 'juice' factor, as I believe the tower of goo guy calls it. eg. make your buttons pulse and make a sound when clicked, make your submenus slide in / fly out of things / do something other than just appear instantly like a Windows window, make your score display roll up rather than just updating, make things that *do* appear and dissapear, appear and disappear in a splash of sparks, that sort of thing. That's a big part of what makes a thing look polished, and yes, it's time-consuming and kind of boring to do. https://www.youtube.com/watch?v=Fy0aCDmgnxg
|
# ? Dec 19, 2012 00:40 |
|
On the topic of Juiciness, I recently saw a "science game" (because FoldIt) where you did some tetris puzzle thing and you get one point for completing a level. Just multiplying that so you get 10 points or 100 points makes that a lot better. Even Mario was programmed this way, the score counter storing only up to the tens to save memory, and a static 0 being drawn in its place.
|
# ? Dec 19, 2012 01:30 |
|
Sinestro posted:This is probably the most common question here, but how can I make games that don't look like they were made by a 13 year old with a copy of RPG Maker if I don't know how to draw worth poo poo? Learn to draw out of necessity, or hire an artist.
|
# ? Dec 19, 2012 01:31 |
|
roomforthetuna posted:That said, it's arguably still important to include the 'juice' factor, as I believe the tower of goo guy calls it. eg. make your buttons pulse and make a sound when clicked, make your submenus slide in / fly out of things / do something other than just appear instantly like a Windows window, make your score display roll up rather than just updating, make things that *do* appear and dissapear, appear and disappear in a splash of sparks, that sort of thing. That's a big part of what makes a thing look polished, and yes, it's time-consuming and kind of boring to do. I've found iTween (http://itween.pixelplacement.com/index.php) to be a pretty nice tool for automating some of this stuff if you're using Unity3D. (I think Shalinor originally suggested it in a thread somewhere.) It's just a small set of source, too, so it's pretty easy to hack in support for new stuff (like various 2D libraries, etc).
|
# ? Dec 19, 2012 02:11 |
|
Unormal posted:I've found iTween (http://itween.pixelplacement.com/index.php) to be a pretty nice tool for automating some of this stuff if you're using Unity3D. (I think Shalinor originally suggested it in a thread somewhere.) It's just a small set of source, too, so it's pretty easy to hack in support for new stuff (like various 2D libraries, etc). iTween is the best. Seriously, tween everything.
|
# ? Dec 19, 2012 05:06 |
|
Shalinor posted:It's critical, especially if you don't have artsy art, but thankfully it's mostly a programming task. That video has become my biggest inspiration in the last six months or so. Ive been using a LOT of NGUI, which has several basic tweening things built in that are pretty much fire and forget, around which Ive built a whole thing just to let you setup that stuff from the editor, and the difference is so wonderful. Its almost professional looking! Of course, even with my newfound juiciness focus, sound effects are still the absolute last thing anyone ever thinks of
|
# ? Dec 19, 2012 05:31 |
|
Looking for a robust way to set up collision categories to handle most cases of colliding entities. I was thinking that one way to go about it would be to set up three sets of properties for entities: Collision Categories: Describes the nature of the object itself Collision Targets: Describes things that the object collides into Collision Excludes: Describes exceptions for targets. See example for clarification. For example, let's say I have a level with walls and braziers that shoot out fireballs. Wall Collision Categories: Wall Collision Targets: - Collision Excludes: - Brazier Collision Categories: Wall, Brazier Collision Targets: - Collision Excludes: - Fireball Collision Categories: None Collision Targets: Wall Collision Excludes: Brazier Player Collision Categories: Player Collision Targets: Wall Collision Excludes: - So, what this says in English: Players collide into anything marked 'wall', period. Fireballs collide into anything marked 'wall', except if that thing is marked 'brazier' as well. This seems like it would cover most cases, anyone have any suggestions based on what they've seen or implemented in the past?
|
# ? Dec 19, 2012 16:32 |
|
I usually see stuff like that implemented as layers. Well really it's just tagging objects that you want to collide with the same id number, but it's usually described conceptually as layers. Objects in the same layer collide, and objects can be in multiple layers. Easy to implement because it only requires assigning an integer (or an array of integers) to your objects. The example you give only requires two: walls and braziers. Fireballs are only on the wall layer, the player is on the walls and brazier layer.
|
# ? Dec 19, 2012 16:48 |
|
Orzo posted:Looking for a robust way to set up collision categories to handle most cases of colliding entities. That looks pretty good actually. Other things I've seen are collision layers, which you can dynamically change at runtime. Everything defaults into the "all" layer, but otherwise only things on the same layer collide. This was in addition to a collision groups / excludes system similar to the one you have here. And then supporting mechanisms like being able to turn on / off collision send / response on individual entities, whole groups, or whole layers.
|
# ? Dec 19, 2012 16:48 |
|
xzzy posted:I usually see stuff like that implemented as layers. Well really it's just tagging objects that you want to collide with the same id number, but it's usually described conceptually as layers. Objects in the same layer collide, and objects can be in multiple layers. Easy to implement because it only requires assigning an integer (or an array of integers) to your objects.
|
# ? Dec 19, 2012 16:53 |
|
It would seem more prudent to dynamically assign/ unassign collision layers and do collision on layer intersects. The best answer seems like it would be best solvable via SQL like SQLite, but I'm not a game dev.
|
# ? Dec 19, 2012 17:02 |
|
I guess it depends on what you intend to do with your game. If you think you're going to need complex collision filters it makes more sense to use properties. But if all you need is for fireballs to not collide with braziers, a couple integers might be good enough. In my experience, "extensible" is a word that gets developers stuck in a sand trap. It's super tempting to make an awesome subsystem that can handle all possible permutations, but it generates the risk of you spending all your time making code rather than games. If you think you need properties don't let me stop you. I'm just babbling.
|
# ? Dec 19, 2012 17:05 |
|
Orzo posted:Yes, that seems like an easy solution. However, it seems to require pre-defining a bitmask of layers ahead of time, which is something I don't really want, since it's not quite as extendable. A search of collision categories/groups yielded some article about box2d which I think does the same thing. Create a hash table that maps string names to integer layer IDs. Run all objects through that at init, to give them their fast collision ID. Creat another table of arrays, indexed by collision ID, where each entry in the indexed array is one integer layer that the collision ID collides with. You can add new entries and collision relationships runtime however you please, or even silently change the collision relationships of existing layers. Simple, extendible, logical, etc. You can even drop the hash if you want, but I find working with named layers to be waaaaay easier. You could also do that hash map purely within your toolset, though, if you're working through an editor of some kind. Shalinor fucked around with this message at 17:18 on Dec 19, 2012 |
# ? Dec 19, 2012 17:15 |
|
xzzy posted:In my experience, "extensible" is a word that gets developers stuck in a sand trap. It's super tempting to make an awesome subsystem that can handle all possible permutations, but it generates the risk of you spending all your time making code rather than games. Shalinor posted:No it wouldn't.
|
# ? Dec 19, 2012 17:27 |
|
Go with a bitmask in-engine, and if you really need extensibility (I can almost guarantee you don't) then in the editor you can have some complex interface for defining custom layers and at import time assign them each a bit and generate an error if there's more than 32. Anything that doesn't result in a simple "x & y" in the engine is way overkill.
|
# ? Dec 19, 2012 17:57 |
|
Shalinor posted:No it wouldn't. Why wouldn't you just go (rough since tired and 4am) C++ code:
code:
Jewel fucked around with this message at 18:09 on Dec 19, 2012 |
# ? Dec 19, 2012 18:06 |
|
Jewel posted:Why wouldn't you just go (rough since tired and 4am) We're living in the land of quad cores as standard, where even AAA games seldom push the hardware due to consoles and slacking visual requirements. A couple extra "if's" won't hurt anyone, and if it makes the resultant code more flexible and easier to read/use, I'm all for it. Now that said, I'd also bracket it all safely off in a corner of the engine, to make it relatively easy to switch to bitmasks if I ever had to for some reason... but if's are fine. Even on mobile hardware, it's fine. EDIT: Completely unrelated... I keep hitting "man this would be cool with co-op" points in my code, but I keep avoiding them due to unknown cost. Has anyone tried doing a co-op game in Unity 3D? I'm curious how the networking layer is, or if it even exists in any practical sense, or what. Might actually do a simple co-op game for OneGameAMonth. Seems like a perfect isolated-target sort of thing to experiment with. Shalinor fucked around with this message at 18:55 on Dec 19, 2012 |
# ? Dec 19, 2012 18:12 |
|
Jewel posted:Why wouldn't you just go (rough since tired and 4am)
|
# ? Dec 19, 2012 18:36 |
|
Unity peeps, I'm working with an artist on an awesome space project. He has delivered a video of a sensors screen and was wondering if I could do it in code: I see some pieces here -- render a rotating model, render some colored noise on top of that, use a shader to sample a displacement map to get the mosaic effect. Is there any way to do this with Unity free? It seems like accessing/altering the render targets is something I can't do without Pro. NGUI looks like it might be able to do what I want, but I'm not about to pay for it just to find out. Any suggestions? (The gameplay is that as you move closer/farther away, the mosaic gets higher/lower resolution, so a person with experience operating sensors can see a ship in the noise more easily.)
|
# ? Dec 19, 2012 18:55 |
|
Pfhreak posted:I see some pieces here -- render a rotating model, render some colored noise on top of that, use a shader to sample a displacement map to get the mosaic effect. Is there any way to do this with Unity free? It seems like accessing/altering the render targets is something I can't do without Pro. You could approximate it with a rotating model in UI-space with an alpha card rendering in front of that which uses a UV flip-book animation. Each frame of the UV flip-book would be a different pattern of pixel'y chunky static, and you'd randomly choose one and display it, possibly using a grayscale texture so that you could then apply a tint, possibly not. It won't make the ship look aliased quite the way you've got there, and it won't allow for the toneshift / LUT-like appearance, but it may be close. Try using additive or multiplicative (if Unity Basic supports it?) blending on the card, too. That + big chunky square pixels on the UV flip book MIGHT give the impression of a pixellated spaceship (whereas alpha blending probably won't, it'll look more like a static overlay). It'll require whatever color you're adding to be substantial, though, as a subtle color add won't cut it. Worth a try, at least. Also use point sampling, don't bilinear filter it, and the UV flip book pages should be pretty low-res. Note that to do this right, you MUST keep the chunky pixels on your UV flip book properly aligned in screen space. If you don't do the proper half-dimension offset on the UVs each time to flip to a random page of the book, the "pixels" will shift, possibly breaking the illusion. EDIT: for generating the flip book pages, look into layered Perlin Noise with high/low pass filtering. This writeup should get you started. You should be able to do it in Photoshop, no sweat. Bake it down to one PS layer per frame, and then use one of the many layers -> tiled animation frames export scripts out there to get your final flip book texture. EDIT2: VV I think that custom shaders are another Pro-only thing, yes... but I could be wrong. If you can do a custom shader and don't care that the ship is real-time rendered, yep, that'd be the easiest/fastest/bestest way. I'd figured the ship had to change depending on target or something. Shalinor fucked around with this message at 19:54 on Dec 19, 2012 |
# ? Dec 19, 2012 18:59 |
|
|
# ? Jun 3, 2024 10:58 |
|
Shalinor posted:Short of jumping through some very, very serious hoops, you're going to flat out need Unity Pro for that. Rather than rendering the ship to a texture, could I just draw a sprite of the ship to a quad and use a fragment shader on that quad? I figured render to texture was pro only, but are writing shaders?
|
# ? Dec 19, 2012 19:36 |