Show Posts
|
|
Pages: 1 2 3 [4] 5 6
|
|
62
|
Player / General / Re: what was the first successful game you made, and how long did it take?
|
on: July 23, 2013, 11:18:18 AM
|
My most successful game to date is Fractured. It received write ups on IndieGames.com, Rock Paper Shotgun and Jay is Games, all of which had me smiling like a little kid on Christmas morning. First thing I did was build a prototype with nothing but rectangles. It took a week or so to refine the concept. Originally the "fractured" part of the screen was a perfect uniform grid of 50x50 tiles simply rearranged (the original working title). It was good but wasn't perfect. Prototype, prototype, prototype is the lesson to be learned here. It took less than two months from start to finish including the time I was hands off while the artists did their thing. It's just a simple platformer with a unique hook so coding was pretty easy.
|
|
|
|
|
64
|
Developer / Technical / Re: Methods for animating in Haxe/AS3
|
on: July 22, 2013, 04:35:26 PM
|
|
Using Flash you can export your library assets to a SWC (a compiled SWF basically) and import them using FlashDevelop. I'll walk you through it in ActionScript because I'm unfamiliar with Haxe.
In Flash: - Create a new ActionScript 3 Project. - Open the Publish Settings menu (Ctrl-Shift-F12). - This part will change depending on which version of Flash you have but navigate until you find the option to export a SWC file and check the box. - Draw a square or some squiggly lines or whatever as an example. - Select it, right click on it and click Convert to Symbol. - Give it a name (MyFirstMovieClip) and then click "Advanced" if it's closed. Check "Export for ActionScript" and "Export in frame 1". Make sure you check those two boxes or you won't be able to import it in FlashDevelop. It should automatically fill out the Class and Base Class fields. Whatever name you give it in the Class field is what it will show up as in FlashDevelop. - Click OK. - Compile your SWF and SWC (Ctrl-Enter).
In FlashDevelop: - Create a new AS3 project (with or without a preloader, doesn't matter for this example). - In Windows Explorer, navigate to the SWC file you created earlier and copy it over to your project's folder. - Back in FlashDevelop it should show up in the Project view on the right. - Right click the SWC and click "Add to Library". - Open Main.as. - In the init() function, add: addChild(new MyFirstMovieClip()); - Compile (Ctrl-Enter) and you should see whatever you drew in Flash!
That should work -- let me know if you have any other questions.
|
|
|
|
|
66
|
Developer / Technical / Re: Collision checking alternatives
|
on: June 28, 2013, 12:43:11 PM
|
|
Does everything need to check against everything else? Bullets don't need to check against other bullets. Players only need to check against hostile bullets and enemies. Static entities don't need to check against anything. Sometimes just refining one gigantic entity list into smaller lists for collision purposes can be all the partitioning you need.
|
|
|
|
|
67
|
Player / General / Re: Why do you play games? Or... when is it not worth anymore to play games?
|
on: June 10, 2013, 06:04:54 PM
|
|
Games stopped being games and started becoming interactive fiction. Story and voice acting has taken precedence over level design and gameplay. You spend more time watching your charter than playing your character. It's exceedingly dull.
There's still gems to be found -- especially in the indie sections of your various storefronts -- but they're becoming rare from AAA studios.
|
|
|
|
|
69
|
Player / Games / Re: EA gets exclusive Star Wars license
|
on: May 09, 2013, 06:24:19 PM
|
I remember I liked Han Solo when I first watched Star Wars. He uses a lightsaber once, and that's to cut that alien horse thing in the snow planet.
All this blasphemy in such a little span of text!
|
|
|
|
|
71
|
Player / General / Game company names that are ironically hilarious
|
on: May 07, 2013, 12:42:39 PM
|
|
Let's see if we can get a big list of ironic game company names.
Creative Assembly has rehashed the same game 15 times.
CD Projekt Red makes all of its money from digital distribution.
(inb4 this isn't the proper use of ironic)
|
|
|
|
|
72
|
Developer / Technical / Re: Why not HAXE?
|
on: May 07, 2013, 12:35:32 PM
|
- It's pronounced "hex" but spelled "haxe". Something fishy about that. - All the data types are Pascal case but all other keywords are lowercase. What up with that? 
|
|
|
|
|
74
|
Developer / Business / Re: What should I expect to pay for graphics
|
on: May 02, 2013, 10:06:53 AM
|
Heavy Cat Studios may be a rip off according to this FGL thread: https://www.fgl.com/view_thread.php?search=1&offset=0&thread_id=41306Some excerpts for people without FGL accounts: "I hired Heavy Cat Studios to work on the sequel to my racing game "Freegear", but they have been quite unresponsive so far and I'm not exactly aware of the market for these things, but $1000 for a car animation, still props and a handful of backgrounds is a little steep for me." "To start with Heavy Cat Studio, I would recommend you not to work with him. My experience with them was very bad, especially about delays and communication. Having to ask during months to deliver the work." "NEVER work with Heavy Cat Studios. They are a scam. I know an artist who worked for them and did about 1-2 weeks work and they simply didn't pay him. And he knew of other artists in a similar position. Same level of bs goes for companies hiring HCS to make games. If you're an artist working for them, you sign a contract that may as well read "I agree to shoot myself in the foot."" Be careful guys. No one wants their (already) small budget to become even smaller.
|
|
|
|
|
76
|
Developer / Technical / Re: Dogfighting AI
|
on: April 21, 2013, 10:13:38 AM
|
Lots of good responses, thanks guys. @Moromis It's a FFA deathmatch style game so I'm hesitant to weight the player more heavily than anything else. Out of 16 participants, if even 4 are constantly chasing the player, that's somewhat insurmountable. I'll try it out and see how brutal it is. @Daid I did add a little fuzz to the timings to help break the habit before posting. It fixed the problem for any large clumps but left isolated 1v1 instances intact. I like the idea of picking up new targets automatically if they're in a cone of sight check, I'll pursue that further. @Columbo I mostly see it happening when I die and respawn on a different side of the map. I'll add another (random) step where they just fly off in a random direction for a bit and see how that improves things. @BorisTheBrave I like the manoeuvre but I don't like that they do it endlessly. The flight mechanics are actually more top down with a sidescroller perspective. There's no gravity or stalling or anything like that. @Fallsburg That would probably work a lot better. I'll take a stab at it if I can find something less "mathy" than the wiki. 
|
|
|
|
|
77
|
Developer / Technical / Dogfighting AI
|
on: April 20, 2013, 04:49:46 PM
|
Hey all, I'm working on a sidescrolling dogfighting game and am looking to make it more exciting. Right now the AI follows the following pattern: Step 1Acquire a target. The AI weights the "score" of the target by comparing distance and health, so it's smart enough to go for weaker enemies that are further away (within reason). Step 2Head towards the target, turning as necessary, until it's lined up for a strafing run. If it fails to align with the target within 2 seconds, it bails and moves to step 4. Step 3Firing the guns for a couple of seconds, continuing to angle at the target. Step 4Turn around and fly away for a couple of seconds, then back to step 1. This actually works pretty damn well 1 on 1 against a human. The AI will come at me, shoot a few times, fly away and do it again. They're quite slippery to get in behind and take out. The problem comes when AI is battling each other, especially when they're further away from the larger clump of other fighters. I'll often be flying across the field and see this:  They've acquired each other (due to the distance from other fighters), are attempting to line up the shot, give up, fly in the opposite directions for half a second then rinse and repeat. I could add a check for the AI to never target something that's already targeting it, but that feels... incorrect (for lack of a better word). Anyone done something similar? Any advice on how to prevent "dog chasing its tail" syndrome?
|
|
|
|
|
78
|
Developer / Technical / Re: component based architecture
|
on: April 14, 2013, 04:11:21 PM
|
@GroZZler:
How do you implement your retrive function? Do you use getQualifiedClassName and iterate through component list? If yes, how does it affect your performance when the project gets bigger?
They're stored in a Dictionary using the type as the key for O(1) look up times. entity.retrieve() doesn't even show up on the profiler, so I've never tried optimizing it further. I also use a nifty trick to get the type during the attach, here's the code: public function attach(component : Component) : void { var type : Class = (component as Object).constructor as Class; if (_components[type] == undefined) _components[type] = component; else throw new FrameworkError(this, "attach", "Entity already contains a component of type " + type); }
public function retrieve(type : Class) : * { return _components[type] != undefined ? _components[type] : null; }
That's interesting, do you extend your components and use className.prototype.constructor to make sure they work with your systems that inspect for base component (I guess that would be most useful for rendering)? I'm considering building a component-based framework for my next project, but still need to wrap my head around some concepts. Your approach looks most appealing atm, I also wonder where do you store game's logic? Do you treat your World object as a state-machine that manages which systems are active atm, or do you have separate Script components that handles that? My components inheritance tree is flat, all components inherit from Component and that's it. Since they're purely data, I don't see a reason to ever extend a PhysicsComponent into an EvenMorePhysicsyComponent, if I needed different data I'd want that intent to be explicitly declared. It also depends on your desired granularity, would you rather have a unified PhysicsComponent or a PositionComponent and a VelocityComponent? I've elected to use the latter as not everything with a position needs a velocity and it adds to reusability. The systems define the game logic. They can be more "enginey" systems like a DisplaySystem that pulls the SpriteComponent and the PositionComponent and draws it or CoinCollectionSystem that handles when Mario touches a coin specific to that game. Here's a real life example from a game I'm wrapping up with extra comments to explain: _world = new World ( // input new MouseAimSystem(), // any entity with a MouseAimComponent has its AngleComponent set to aim at the mouse automagically, I use this a lot between projects new InfiniteWeaponControlSystem(), // manages any entity with a WeaponControlComponent and a WeaponComponent to basically say "if the button marked in WeaponControlComponent is being held down, then mark WeaponComponent.firing as true" new TurretControlSystem(), // written just for this game to handle the way the turret moves
// logic new InfiniteWeaponSystem(), // if WeaponComponent.firing == true then spawn WeaponComponent.projectileType entity at WeaponComponent.speed velocity facing AngleComponent.angle new TimedLifespanSystem(), // TimedLifespanComponent.lifetime -= deltaTime; if(TimedLifespanComponent.lifetime < 0) world.destroy(current entity)
new AiSpawnSystem(), // spawns enemies at special times, written just for this game new AiControlSystem(), // controls the AI entities spawned above, written just for this game new CoinControlSystem(), // handles the coins, written just for this game // physics new WaveMovementSystem(), // oscilates the y velocity of anything with a WaveMovementComponent so they move in... yep, waves. new SidescrollerPhysicsSystem(), // position += velocity * delta time and adds gravity // collision new CollisionTransformSystem(), // updates all the collision components to the new positions new FlammenImpactSystem(), // written just for this game, flammen is the main projectile new HostileProjectileCollisionDetectionSystem(), // written just for this game but extends a generic CollisionDetectionSystem to make things easier //new CollisionDebugDrawSystem(debugLayer), // self explanatory // display new TracerSystem(projectileLayer, 1), // draws tracers behind bullets new AirshipDisplaySystem(), // special display system for the main villain, had to be written for this game for a special case new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "backgrounde", 10, _settings.windowHeight), // automatically scrolls a background of "backgrounds" sprite sheet with "backgrounde" animation at 10 pixels per second new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "backgroundd", 14, _settings.windowHeight), new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "backgroundc", 18, _settings.windowHeight), new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "backgroundb", 24, _settings.windowHeight), new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "backgrounda", 26, _settings.windowHeight), new HorizontalScrollingDisplaySystem(backgroundLayer, "backgrounds", "foreground", Constants.calculateTravelSpeed(), _settings.windowHeight + 40), new DisplaySystem(airshipLayer, AirshipIdentifierComponent), // generic DisplaySystem I use in all projects for routine stuff new DisplaySystem(projectileLayer, HostileProjectileIdentifier), new DisplaySystem(sortedLayer, SortedDisplayIdentifierComponent), new DisplaySystem(effectLayer, EffectDisplayIdentifierComponent), new UiSystem(uiLayer) // the UI which draws the health bars for any entity with a HealthComponent );
Hope that helps, I find real life examples generally do.
|
|
|
|
|
79
|
Developer / Technical / Re: component based architecture
|
on: April 14, 2013, 07:42:37 AM
|
@GroZZler:
How do you implement your retrive function? Do you use getQualifiedClassName and iterate through component list? If yes, how does it affect your performance when the project gets bigger?
They're stored in a Dictionary using the type as the key for O(1) look up times. entity.retrieve() doesn't even show up on the profiler, so I've never tried optimizing it further. I also use a nifty trick to get the type during the attach, here's the code: public function attach(component : Component) : void { var type : Class = (component as Object).constructor as Class; if (_components[type] == undefined) _components[type] = component; else throw new FrameworkError(this, "attach", "Entity already contains a component of type " + type); }
public function retrieve(type : Class) : * { return _components[type] != undefined ? _components[type] : null; }
|
|
|
|
|
80
|
Developer / Technical / Re: component based architecture
|
on: April 13, 2013, 07:49:29 PM
|
@doihaveto I've never made a cutscene system but I'd approach it by enable and disabling systems as necessary. Disable the input system that reads keyboard input and enable the input system that reads data from the script instead. I imagine it's going to get pretty messy if you try to shoehorn it around systems that already exist rather than building your systems / components with the notion beforehand. @_Tommo_ There's no singletons or statics. Everything is decoupled because the systems find the components, the components don't find the systems. Here's how the logic flows: - First you register your systems with the world. - Every time an entity is created, the world loops through all the registered systems and passes them the new entity for inspection. - The system (let's use physics as an example) asks the entity "hey do you have a position and velocity component?" and if it does, the physics system adds the entity to its local list. - Every frame, the world.update loops through and calls update on all the registered system. - When the physics system is updated, it loops through its local list (important to remember its a local list to that particular system) of entities, and adds the velocity data to the position data. Some psuedo code: physics system.update { for(i = 0; i < my local list of entities.length; ++i) { entity = local list of entities[i];
position = entity.retrieve(PositionComponent) velocity = entity.retrieve(VelocityComponent)
position.x += velocity.x * delta time position.y += velocity.y * delta time } }
Does that help? Nothing is explicitly coupled and everything is highly reusable.
|
|
|
|
|