Is it okay to ask here programming questions (in terms of game design/logic, not really programming itself)?
Aight~
I'm trying to write my first thing in Java and.. at first I thought to just write a different class for every entity type (like different enemies) in a hierarchy, but I'm thinking maybe it'll be better to create an enum as a singleton that has all the different types inside it, with their attributes and all that, and then create one class that has all the AI and logic and uses the enum to decide what it is. I guess I'm just trying to avoid having a huge hierarchy of a million classes for the entity types.
How is this usually done, is there a different way to go about this?
Aight~
I'm trying to write my first thing in Java and.. at first I thought to just write a different class for every entity type (like different enemies) in a hierarchy, but I'm thinking maybe it'll be better to create an enum as a singleton that has all the different types inside it, with their attributes and all that, and then create one class that has all the AI and logic and uses the enum to decide what it is. I guess I'm just trying to avoid having a huge hierarchy of a million classes for the entity types.
How is this usually done, is there a different way to go about this?
Yeah I'm using MVC. I haven't really done anything yet but here's the git (mostly empty classes, but the general structure is there).Using Enums is a very monolithic way to do things, which could work for a very simple game, but will get things way, way too cluttered otherwise. Luckily, there're many ways to go around that. One such model is the MVC one, which stands for Model, View, Controller: Say, you could have a "character" model with its attributes and abilities (move, walk, jump, attack, etc.), a separate view that renders itself, and a controller, which is what interacts with the model and calls its routines.
By splitting models and controllers, you could actually have the player, enemies and bosses all use the same model, only with different controllers (one of them takes keyboard input to call the model's methods, while the other two use state machines instead). The view doesn't just mean the object's sprite, but any other things that are drawn for it, such as a health bars, damage numbers, shield effects and so on.
If you want to keep all three things in a single class, you should at least use inheritance: Say, making an "Enemy" class with HP and basic abilities, and set them to new values or override methods for enemy sub-types. That way, you don't have to write the same basic code over and over for each and every kind of enemy.
If you want to to Object-Oriented Programming, the idea is that you make small-ish objects that each have a few functions limited in scope, so that you can combine and reuse them rather than write large classes that are harder to maintain and modifiy, and you can also resort to inheritance to reuse code (as child classes inherit all non-private properties and methods of its parent class and/or interfaces), and polymorphism, which takes advantage of the fact that child classes keep their parent's methods and properties to access them (say, both a tank and a combat airplane could have "shoot" and "move" methods inherited from their parent "war vehicle" class, which means you could call WarVehicle.Shoot() or WarVehicle.Move() and have it work regardless of whether it's a tank or a combat airplane, since you know both of them have those functions).
I only know about OOP from experience, and not from reading theory about it, so I might be wrong about some of these things. Still, I think the explanation is valid for the most part.
Yeah I'm using MVC. I haven't really done anything yet but here's the git (mostly empty classes, but the general structure is there).
Considering I'm unit testing, I want to use less inheritance and more Composition and Inversion of Control (with lots of interfaces), and only really use enums as hard-coded singletons rather than actual enums, but I get what you mean to keep classes small. It'll make it a bit easier to change stuff later.
Guess I'll look into a class for every entity after all, dunno how I'll handle AI but oh well, it's a ways off.
so fmod, an audio development studio, is now free for indies.
so fmod, an audio development studio, is now free for indies.
I don't think that's the right term for it. FMOD is audio middleware, which allows people (especially actual sound guys) to set up complex events and sound cues, complete with variable states, without having to type a line of code. It isn't a "development studio" in the way that Pro Tools/Ableton/Cubase/etc. is, although FMOD studio has had a visual overhaul to make it a bit more friendly to people using them.
They've also announced their plugin for Unity as well, which is a hell of a boon to anyne who's had to use Unity's audio engine beyond dropping noises in.
If anyone's interested then it may be worth looking up Stephan Schütze's video series on Youtube to see what it can do (like this engine example in Designer, Studio's predecessor)
(Sorry, nitpicky audio dude. Not meaning to be a snarky arse!)
no, this is perfect. i am an audio guy myself, strictly composer at the moment, and my lack of product knowledge about fmod and a general rush to get this up here meant my post was way off.
thank you for the clarification and information. now i'm off to learn fmod and make myself hireable!
I'm playing around with Unity out of mostly boredom. I want to try making something really simple for the lulz but I've learned a lot by just listening to podcasts, doing youtube training videos and all that.
I have one question though and I figure this is a good place to ask. I found a great tutorial online for a 2D platformer, I've been following it but I want to deviate from it a bit but am stuck. I want the character to always be running forward. By default you have to press the running button while holding the right arrow key. Now I figured out how to make him move forward on its own but the running animation doesn't play. It just moves forward while the legs stay, like he's hovering.
How can I get him to run the whole time? I'll provide any info anyone needs if you can help If not it's coooooool.
so fmod, an audio development studio, is now free for indies.
New point h = averageOfAllFaceVertexPositions + normalVectorOfFace * h? Then connect it to all the vertices?Dang.
http://mathworld.wolfram.com/Cumulation.html
Constructing those in code was not straight-forward at all. Took me the whole day.
Yeah, I've had functional stellation for a while, but it was never accurate enough. Using trig to get the distance of the stellated points away from the origin would be a few degrees off and it'd be really ugly. Strange that tiny inaccuracies would be so noticeable.New point h = averageOfAllFaceVertexPositions + normalVectorOfFace * h? Then connect it to all the vertices?
Yeah I can see why it would suck, though. = P
Personally, I like seeing both kinds. If split I think you might have the following problems:I wonder at times, should we split this thread between showing off your stuff, and asking for help with code and the like? It runs into some spells where it's barely readable for me, just because it dives so deep in one direction or the other.
Oh my god you're my hero. Yes it's using mechanim. I've been racking my brain for this for 2 days now and have been googling like crazy and never once did it occur to me to just switch Idle and Run around in the animator. I've been avoiding nagging you guys here with questions but this one I just couldn't solve so thank you.It depends on what animation system you're using and how you're managing animation changes.
Basically, you'd make the character's "Idle" state use the running animation (if you're using Mecanim) or just assign a looping animation of the character running around, and swap it with a jump animation whenever the player jumps if you're using the old animation system.
Since you said the character automatically uses the running animation when the right key is pressed, it means that whichever example you're using has set the mecanim animation system (or whatever is used) up to work that way, since Unity doesn't do so by default.
Personally, I like seeing both kinds. If split I think you might have the following problems:
- Neither thread gets much visibility, since right now this thread is popular but not TOO popular.
- There is already a dedicated "programming help" thread in the OT forum.
- The "show your stuff" thread might get old after a while, plus it might run into the problem of whether people are allowed to promote their projects or not. I feel like there is a fine line, since people are allowed to talk about their projects, and respond if someone else creates a thread for their game, but not allowed (I think) to create a thread for their own game. And of course someone could be sneaky and ask someone else to make a thread for their game, but you're presumably not supposed to do that either.
Probably minor problems, but I guess I just don't think it's really necessary, and the mix keeps things interesting.
I actually made most of the progress I wanted to make by the end of the weekend, and am finally working on very basic real-game stuff. This is going to look super amateur-ish, but it really is satisfying when even a very basic editor you've made yourself starts being useful and letting you DO things with it instead of just work ON it.
I'm working on a turn-based strategy game. Any graphics for now are super placeholder, but suggestions are still welcome. Plus, any sort of mode suggestions or questions are welcome from the menu standpoint, though I'm not getting into the details of gameplay yet.
My current idea is for the singleplayer and multiplayer buttons to display the second menus shown above, and for each of those buttons to cause some graphics and text to appear that describes the mode in question, plus buttons to select New/Continue/Host/Connect/Play by Email or whatever other options are appropriate for a particular mode.
So who here is attending GDC?
I'll be there, first time.
Should we organize a meetup?
Nice. FMOD Studio looks a lot like XACT (except better, I think), which was one of the things I was really missing moving from XNA to Unity. I've no idea how well it works, though, since I'm not even to the point in a project where I'd need sophisticated sound.
However, SoundBanks are (to me at least) far superior to having tons of loose audio files in your project -- especially where you can manage individual cue volume and stuff outside of code. I'd highly recommend trying a SoundBank method if you guys have tons of loose audio clips in your projects -- I don't think I can go back to the alternative now (feels...archaic).
So who here is attending GDC?
I'll be there, first time.
Should we organize a meetup?
Didn't know what state machines are so I looked it up, seems like I'll need to read for a while before I continue coding. The more I think about not using that the more messy everything seems, haha.I'd say AI is simple if you build state machines for their controllers. State machines aren't that hard to build unless your project requires extremely complicated ones, and they work nicely and intuitively for the most part.
Also, I'd say that enums are always cleaner than constants since they limit the kinds of data that can be put into them. You can also assign values to each enum, but that's a bit too hack-y for my taste.
Everything is a state machine. No, seriously. One element does not make it more or less of a finite state machine depending on application. Some people consider this a philosophical argument but I take it as a fact since every program is a representation of the current state depending on user input (or not, in some cases). Dont let the technical mumbo jumbo trick you into thinking they are more than they are. Player controller, AI, physics, audio systems, etc - all state machines. An entire game - a state machine.Didn't know what state machines are so I looked it up, seems like I'll need to read for a while before I continue coding. The more I think about not using that the more messy everything seems, haha.
Good thing you got a refund. UnrealScript is discontinued in UE4 in favor of C++ (At least that's what they said when they demo'ed it 2 yearsh ago, been looking forward to it ever since.)
Hi all, does anyone here use Unreal, or would like to learn UDK/UnrealScript? I'm not really any kind of developer as yet, but trying to get into Unity and as such my wife bought me a book at Christmas - except she bought me an Unreal book!
http://www.packtpub.com/unreal-development-kit-game-programming-with-unrealscript-beginners-guide/book
I got a full refund from PACKT due to the error, but they don't have a returns process so told me I could keep the book! It's £30.99 new, but if anyone is interested please PM me and you can have it for the price of postage, or probably even free if you're in the UK
Didn't know what state machines are so I looked it up, seems like I'll need to read for a while before I continue coding. The more I think about not using that the more messy everything seems, haha.
Yeah I know, technically I was doing the same thing when I made a simple Pacman thing, it's just that I had it all spread out between the update() and some methods inside the enemy object, it makes a lot more sense to keep it in one organized place (it establishes some rules too). But I do want to read about the "standards" so I don't mess up again like not knowing about state machines to begin with.Everything is a state machine. No, seriously. One element does not make it more or less of a finite state machine depending on application. Some people consider this a philosophical argument but I take it as a fact since every program is a representation of the current state depending on user input (or not, in some cases). Dont let the technical mumbo jumbo trick you into thinking they are more than they are. Player controller, AI, physics, audio systems, etc - all state machines. An entire game - a state machine.
Dont be scared by the term since it technically means absolutely nothing special. Its just logic and rules. Nothing more.
So who here is attending GDC?
I'll be there, first time.
Should we organize a meetup?
Paz and I will be there (it'll be our first time going to GDC too!) We were offered the opportunity to show Assault Android Cactus at the Unity booth and at the Indie Megabooth!
In fact I've been flat out working on stuff for GDC and hardly had any time to add new things to the game, although I managed to get the next boss character intro animation done when nobody was looking
he's a big guy!
Everything is a state machine. No, seriously. One element does not make it more or less of a finite state machine depending on application. Some people consider this a philosophical argument but I take it as a fact since every program is a representation of the current state depending on user input (or not, in some cases). Dont let the technical mumbo jumbo trick you into thinking they are more than they are. Player controller, AI, physics, audio systems, etc - all state machines. An entire game - a state machine.
Dont be scared by the term since it technically means absolutely nothing special. Its just logic and rules. Nothing more.
This makes me think of how bosses in 3D Zelda are presented. Really badass.
Thanks! You're probably right, I'll move credits under options.I'd say there are too many options at the start. Armies and Maps are a bit unclear. Normally you should probably place credits under options, but credits is always a bit of a weird one.
The difference between match and battle is unclear to me.
Didn't know what state machines are so I looked it up, seems like I'll need to read for a while before I continue coding. The more I think about not using that the more messy everything seems, haha.
Paz and I will be there (it'll be our first time going to GDC too!) We were offered the opportunity to show Assault Android Cactus at the Unity booth and at the Indie Megabooth!
In fact I've been flat out working on stuff for GDC and hardly had any time to add new things to the game, although I managed to get the next boss character intro animation done when nobody was looking
he's a big guy!
Hey !
Is it possible to post a link to a Kickstarter project in which I am involved as a sound designer or is it too "auto-promo" ?
Nice ! Ok, so here it is : Planets³
Basically, it's a story-based construction game made with voxels where the player will be able to build all sort of things (weapons, vehicles, ... ) to help him in his quest. Feel free to comment and/or share the link !
Wow! The competition is getting fierce. Amazing concept art:
So who here is attending GDC?
I'll be there, first time.
Should we organize a meetup?
Paz and I will be there (it'll be our first time going to GDC too!) We were offered the opportunity to show Assault Android Cactus at the Unity booth and at the Indie Megabooth!
Should be floating around as another first timer ! Will be at stand 1238 with a load of other Scottish devs .
We'll be at GDC Play showing Shiftlings Come say hi!
I'll be there! I was there briefly on a Friday two years ago, but I didn't really get a good sense for what it was like. So this is really my first time, I've just had a small preview before.