|
Ephphatha posted:How many of us are planning on entering the 2014 indie game maker contest? I'm gonna try get something made since the longer timeframe gives me more weekends to work on something, but I know it won't be competitive. I think I'm going to try. My plan is to attempt a Unity 4 blueprint only vehicle game.
|
# ? May 30, 2014 15:19 |
|
|
# ? May 21, 2024 04:25 |
|
In C#, Unity: I need to have a series of enemies of various types spawn, and they should spawn more often as the game progresses. The easier enemies spawn first and spawn more quickly as the game progresses. The harder enemies first spawn later, and do the same but at a much slower rate. I wanted to just use an array, but each type needing a different spawn rate is throwing me off. Right now I have a bunch of InvokeRepeating calls with cascading delays at the start, and that works well and gives me a lot of fine balance control, but it results in a lot of very similar-looking code and doesn't look or feel particularly elegant. I know I've found a solution and it's working and I probably shouldn't gently caress with it too badly, but I've just started learning how to code in general and am using this game as a learning experience, so if there is a clever way to do this I'm very interested. I don't want or need anyone to post up a bunch of code or hold my hand through the process, but because I'm so new to this I'm still learning how to think about problems like this. If anyone could suggest a method I would love to hear it. This is some psuedocode of what I have so far code:
|
# ? May 31, 2014 09:51 |
|
A basic timer (basically what InvokeRepeating is doing) is usually something like:code:
|
# ? May 31, 2014 11:17 |
|
I'm a beginner as well so take this with a grain of salt. From your pseudocode it looks like you have one gameobject that is responsible for spawning all the enemy types. You could break that up into multiple gameobjects, each responsible for spawning a single enemy type. Have your script have some public properties like "InitialDelay" and "Period" so you can fiddle with the spawn rates in the Inspector. (Edit: Or I suppose you could have just the one gameobject but with multiple copies of the script, each script handling a different enemy type. I'm not sure how well I like that solution though, it could clutter up the inspector with a bunch of the same named script.) If you want to get fancy you could use Invoke instead of InvokeRepeating, and have it do math to figure out the next delay. Something like code:
Che Delilas fucked around with this message at 11:39 on May 31, 2014 |
# ? May 31, 2014 11:34 |
|
Is there some sort of API or library for doing menus in C++? I'm trying to fill the gap in my knowledge but it's taken nearly 250 lines of code just to do a vertical list of buttons with mouse and controller. Is there even any reading I can do if there's some theory behind it I might be missing or is this just something to get used to?
|
# ? May 31, 2014 19:35 |
|
Onion Knight posted:void Start (){ The code itself is fine; when you find you have a lot of repeating code like this, with just parameters changing, you're usually looking at a good candidate for data-driven code ! So you'd define an xml or json chunk (or whatever, CSV is a favorite of data-noobs, devolving into CSV delimited first with colons or tildes, and then multiple tildes... ) like so: code:
code:
|
# ? May 31, 2014 20:37 |
|
If you wanted something in the Unity editor you could create a serializable class that has fields for prefab, time, amount. If its serializable a monobehaviour with an array of them can be configured right in the inspector. You could put the logic into the little class too.code:
So then the ParentSpawner monobehaviour just zips through its own array of Spawner objects and updates them on the current time. Each Spawner spawns or not depending upon its fields. For the level progression stuff it would be easy to add to it (when time passes a field value cut delay or something). This isn't terribly different than having a bunch of monobehaviours doing this but I like it because it doesn't crowd your hierarchy and if you want to stop spawning rather than find every spawner you just tell the ParentSpawner to stop updating. Though I like Unormal's solution better and I use XML files for everything.
|
# ? May 31, 2014 22:26 |
|
Praseodymi posted:Is there some sort of API or library for doing menus in C++? I'm trying to fill the gap in my knowledge but it's taken nearly 250 lines of code just to do a vertical list of buttons with mouse and controller. Is there even any reading I can do if there's some theory behind it I might be missing or is this just something to get used to?
|
# ? May 31, 2014 22:40 |
|
Thanks a ton to everyone who posted a suggestion. I should have set it up like Che Delilas suggested (why didn't I think of that!) but I'm going to try to get it to work pulling data from an XML like Unormal suggests. I'm going to need to learn how to do that sooner or later, so might as well dive in now. If I can get it working in the next day or so, I'll throw a dev build up here. Thanks again!
|
# ? Jun 1, 2014 15:10 |
|
Onion Knight posted:Thanks again! I should point out that (and this is true for all programming) you shouldn't get too caught up in making everything elegant and generic and infinitely expandable, at least not too early. As you can see from all the replies, there is a multitude of ways to solve a particular problem, each with its own pros and cons, and it's very easy to get paralyzed trying to choose the "best" solution. Obviously you have to make a decision as to how future-proof you want your project to be; in your example if you are planning on having dozens or hundreds of enemy types, then yeah you're probably going to want to roll a data-driven solution before you start creating all those types. But if you're just going to have a few, then I might move onto other areas of the project for now since you really already have a working (if brute-force) solution. Premature optimization is death, DEATH, for a project that you actually want to get out the door at some point.
|
# ? Jun 1, 2014 17:36 |
|
Che Delilas posted:Premature optimization is death, DEATH, for a project that you actually want to get out the door at some point. It's also quite frankly a waste in most circumstances. Most early code either get's completely rewritten, unused, or never needs to be optimized. It's very difficult to optimize the code until the projects finished. As one of my bosses would say the key to optimizing is speeding up the slow parts. You can't know which parts are the slow parts until you're near the end. This is also why most game dev machines and game demo's are hardware 5-10x more powerful than game consoles. Notable example Forza E3 vs shipping. http://www.examiner.com/slideshow/forza-motorsport-5-e3-build-and-final-version-compared Data driven code can save your tons of headache and in and of itself is not necessarily optimization.
|
# ? Jun 1, 2014 21:29 |
|
IRC dudes, if any of you have contact deets for bbcisdabomb, might want to ping him. The SA GameDev wiki's down, which is hampering my "LOOK AT THE PROUD HISTORY OF THIS COMPETITION!" opening explanation paragraph (yes, we're doing SA GameDev again, I'm writing the OP for the organizational thread as we speak)
|
# ? Jun 1, 2014 22:32 |
|
Joooooiiiinnnn Uuuuuuusssssssss
|
# ? Jun 1, 2014 22:37 |
|
, the SQL columns howled in monstrous union.
|
# ? Jun 2, 2014 00:01 |
|
SA GameDev 9 is live. Come make Public Access TV games with us (no, really!).
|
# ? Jun 2, 2014 00:01 |
|
Wondering what people would think the best approach is here. Say I am making a Zelda Link to the Past clone in Unity. How would you go about setting up the project with regards to scenes. I have 3 options really. I could create a scene for the world map and each dungeon/area. But in the Zelda games each square of the map has a scroller once you hit the edge, so maybe a scene per square makes sense? That seems like it could become a bit massive in the end though, but easy to manage on a per scene basis. Loading the maps from a file also works, but it seems like it would be a lot slower to design the game when in the editor I can drag items/enemies/triggers around really easily. Thoughts? I'm leaning towards option 2 and just making sure I have everything named and structured well to avoid confusion. Alternatively are there any good 2D tutorials for this kind of game? I'm fine going it on my own but it might just give me some structural ideas for the project as a whole.
|
# ? Jun 2, 2014 21:27 |
|
I think the recommendation is generally not to use Unity as a level editor as it's not really well suited to that kind of stuff. Maybe if you write a custom editor or use something from the Asset Store.
|
# ? Jun 2, 2014 21:57 |
|
BUGS OF SPRING posted:Wondering what people would think the best approach is here. We did NimbleQuest in Futile and used the tilemap editor Tiled (http://www.mapeditor.org).
|
# ? Jun 2, 2014 22:17 |
|
Ragg posted:I think the recommendation is generally not to use Unity as a level editor as it's not really well suited to that kind of stuff. Maybe if you write a custom editor or use something from the Asset Store. Its that bad eh? Seems like such a waste when it's so built into the app eeenmachine posted:We did NimbleQuest in Futile and used the tilemap editor Tiled (http://www.mapeditor.org). That is definitely the feel I am going for. I'll check out Tiled. I had planned to use to new Unity built in 2D, but I'll check out Futile and see what tutorials I can find. Thanks!
|
# ? Jun 3, 2014 00:38 |
|
I'm using Tiled and .tmx in my game doodle and its pretty awesome, but older versions you have to edit tile properties tile by tile, which sucks, and daily builds which have the ability to edit a group of tiles' properties at once have all kinds of other bugs on my system that make it pretty drat hard to use. I don't want to get involved in writing bug fixes for Tiled instead of working on my game I'm almost considering trying out a different map editor and a different map format, although Tiled should probably iron those details out soon-ish? Development doesn't seem crazy but it is active at least.
|
# ? Jun 3, 2014 00:48 |
|
BUGS OF SPRING posted:Its that bad eh? Seems like such a waste when it's so built into the app It doesn't even have snap to grid. Speaking from experience it's a real pain in the rear end laying things out in Unity.
|
# ? Jun 3, 2014 02:02 |
|
Ragg posted:It doesn't even have snap to grid. Speaking from experience it's a real pain in the rear end laying things out in Unity. WITH that, Unity is alright for level design. Without that, it's totally miserable.
|
# ? Jun 3, 2014 02:42 |
|
Ragg posted:It doesn't even have snap to grid. Speaking from experience it's a real pain in the rear end laying things out in Unity. Yes it does. Hold down control/command key while moving the object. You can set the grid in Edit->Snap Settings. See here. However, I lay most things out in Maya rather than the Unity editor as it's what I'm used to.
|
# ? Jun 3, 2014 03:06 |
|
Hey, it worked! https://googledrive.com/host/0BxsXVYMElwaZYzYxcDljYUZBNms/Dog%20Petter%20Dev%20Build.html In retrospect I don't nearly have enough enemies to necessitate pulling data from elsewhere, but, I learned a ton in the implementation. This is incredibly rough and has zero polish, but here's where I am so far, if anyone wants to take a look. It gets a little overwhelming for the mouse, but it's designed for a touch interface (there's also no game over screen yet, you just stop collecting points when a pest touches your arm)
|
# ? Jun 3, 2014 05:26 |
|
One Eye Open posted:Yes it does. Hold down control/command key while moving the object. You can set the grid in Edit->Snap Settings. See here. However, I lay most things out in Maya rather than the Unity editor as it's what I'm used to. That ain't snap to grid.
|
# ? Jun 3, 2014 10:13 |
|
Just wanted to share a really neat game by some Irish friends of mine that is on Kickstarter now. Check it out: https://www.kickstarter.com/projects/bitsmithgames/franknjohn
|
# ? Jun 3, 2014 10:59 |
|
Shalinor posted:ProGrid is the best $20 I spent in the AssetStore. I poo poo you not. Thanks maybe I'll give this a try. Tiled was suggested in the other thread so may try that since its free. It just seems like balancing level design would be easier right in the editor, it's weird there isn't a great solution for it. Though I guess native 2D is new.
|
# ? Jun 3, 2014 15:41 |
|
The purpose of this post was originally to ask a simple question, but after having asked it, this post devolved into a detailed analysis of my project; the decisions I've made so far, the ones I'm still deciding on, how and why I've made them and how I felt they would affect the commercial sales of the finished product. That further devolved into an analysis of my insecurities with devoting so much time and effort into a project, that like most indie projects, needs to realistically be looked at as an inevitable and abysmal commercial failure, and that any money made from such a venture is simply to be taken as gravy on top of having the pride of having released a game. But then I thought better, deleted all that and here's my original question: what is a good 2D framework for Unity, that doesn't force me into a 2D only environment / orthographic only camera? I'm working on a graphical roguelike, but I'm working with 3 dimensional maps, so vertically aligning horizontal map slices (which are obviously tiles merged into a singular mesh) and rendering them with a perspective camera is a must. I've looked at a number of different options, but it seems like every one comes with its own quirks and limitations that don't jive well with my requirements.
|
# ? Jun 4, 2014 05:12 |
|
You can use any 2D framework with any camera you want as far as I know (I'm not sure about Futile). If you start a 2D project in Unity, it'll start you out with an orthographic camera but you're welcome to change it to a perspective camera at any time.
|
# ? Jun 4, 2014 07:04 |
|
The King of Swag posted:The purpose of this post was originally to ask a simple question, but after having asked it, this post devolved into a detailed analysis of my project; the decisions I've made so far, the ones I'm still deciding on, how and why I've made them and how I felt they would affect the commercial sales of the finished product. That further devolved into an analysis of my insecurities with devoting so much time and effort into a project, that like most indie projects, needs to realistically be looked at as an inevitable and abysmal commercial failure, and that any money made from such a venture is simply to be taken as gravy on top of having the pride of having released a game. I know 2D toolkit is well regarded for 2.5d development using a perspective camera although I've never tried it for that purpose.
|
# ? Jun 4, 2014 07:15 |
|
I've done a full 3d perspective 2d sprite game in Unity with 2dtoolkit and it works ok. My sprites were large and having them in perspective led to billboard clipping issues that I had to hard-code render orders to get around. I haven't used unity 2d at all yet.
|
# ? Jun 4, 2014 13:00 |
|
Unreal Engine 4.2 Release Notes
|
# ? Jun 4, 2014 19:48 |
|
That sure looks like a whole bunch of really neat stuff.
|
# ? Jun 4, 2014 19:51 |
|
Especially the Windows XP support.
|
# ? Jun 4, 2014 20:04 |
|
Any insight on how the levels in the 8-bit Donkey Kong worked? I'm wondering the most about the angled floors, all the other levels seem to be on a 14-wide grid. I'm guessing the moving elevators weren't really level tiles but sprite/objects of some sort?
|
# ? Jun 5, 2014 22:02 |
|
The angled girders just look like the same tile as the straight ones, just arbitrarily placed a few pixels above or below the next one. I don't think there's any reason why they would have to confine themselves to a grid for the background other than for organizational purposes.
|
# ? Jun 6, 2014 03:18 |
|
Lork posted:The angled girders just look like the same tile as the straight ones, just arbitrarily placed a few pixels above or below the next one. I don't think there's any reason why they would have to confine themselves to a grid for the background other than for organizational purposes. Because that's how stuff like the NES worked. They have a grid of tiles in memory, and then very few sprites. Even stuff like screen scrolling was a variable for offset that they incremented then shifted all the tiles over when it hit 16. I'm interested in knowing the answer too, actually. Edit: vvv Ah yeah never thought of that! Jewel fucked around with this message at 06:52 on Jun 6, 2014 |
# ? Jun 6, 2014 03:31 |
|
My guess would be that they just used 15 tiles; girder, girder-up-1-pixel-bottom-7-pixels, girder-up-1-pixel-top-1-pixel, [...], girder-up-7-pixels-bottom-1-pixel, girder-up-1-pixel-top-7-pixels. (Assuming the tiles are 8x8 for this example.)
|
# ? Jun 6, 2014 06:32 |
|
Jewel posted:Because that's how stuff like the NES worked. They have a grid of tiles in memory, and then very few sprites. Even stuff like screen scrolling was a variable for offset that they incremented then shifted all the tiles over when it hit 16. I'm interested in knowing the answer too, actually.
|
# ? Jun 6, 2014 06:35 |
|
|
# ? May 21, 2024 04:25 |
|
Lork posted:I had no idea. Kind of makes some of the stuff I've seen in later NES games seem totally out of control in retrospect. What kind of stuff do you mean? I can't think of anything that's crazy mind blowing in that respect off the top of my head.
|
# ? Jun 6, 2014 06:47 |