Be a Supporter!

The Flash 'Reg' Lounge

  • 1,708,791 Views
  • 63,678 Replies
New Topic Respond to this Topic
PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge 2013-10-04 19:05:08 Reply

At 10/3/13 03:57 PM, Rustygames wrote: Yup sorry what I meant was, people don't do them professionally, as in, you aren't looking to make money and a living out of it, it isn't work, it's a hobby, you're not in it for the money.

Ah yeah. I agree. My bad. I think misunderstood what you were saying before.

I think it's funny too about how some people say Flash is dead long live HTML5 yada yada. It's just easy for people to latch onto. Personally I think there is a big place for HTML5 games on the web. I still think there is a place for flash, though. Definitely not for websites anymore, but for games -- sure. Actually right now we still aren't in a world where HTML5 has penetrated all of the market yet. If you were to build a game today for the web only, and you wanted to target the most people possible in the door, and have a rich experience, flash is still your best option. Obviously won't stay that way forever, though.

Anyways - wars have been fought over this. Some people feel more strongly about it than others. Personally I think, a technology is just a technology. If you sucked at making games in flash you will probably still suck in HTML5. The product itself is the most important thing and if you make something really good then people will find a way to play it.


BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-05 13:18:07 Reply

Has anyone here actually built an HTML5 game?

Everything works just fine for me in HTML5, but the only thing that really makes it unattractive to me is the face mobiles get it soooo wrong. The main problem of course being that I can't full screen display my games on mobile. It's such a massive pain in the arse to get the game fitting to the window on all devices/ browsers regardless of orientation and user zoom/drag events.

If anyone knows what I'm talking about on screen sizes please let me know I'm not alone in this pain...


- Matt, Rustyarcade.com

swishcheese
swishcheese
  • Member since: May. 12, 2007
  • Offline.
Forum Stats
Member
Level 14
Programmer
Response to The Flash 'Reg' Lounge 2013-10-05 14:20:13 Reply

At 10/5/13 01:18 PM, Rustygames wrote: If anyone knows what I'm talking about on screen sizes please let me know I'm not alone in this pain...

You are not the only one.... If only they made every mobile screen the same size! And then you got tablets, etc. And its hard to say, well if you have this screen size, well then screw you, but even harder to make it possible for all screen sizes.


BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-05 15:04:53 Reply

At 10/5/13 02:20 PM, swishcheese wrote:
At 10/5/13 01:18 PM, Rustygames wrote: If anyone knows what I'm talking about on screen sizes please let me know I'm not alone in this pain...
You are not the only one.... If only they made every mobile screen the same size! And then you got tablets, etc. And its hard to say, well if you have this screen size, well then screw you, but even harder to make it possible for all screen sizes.

Well the varying sizes I can deal with, but I literally can't get the game to just full screen. Try it, make a canvas which is just a red square, and try and make that fit full screen on every device/browser (just try a couple, like chrome and stock on android and safari on iOS6 and 7).

On chrome it can work pretty well, but on stock browser user zoom is allowed even when you use the viewport meta data to disable it. Orientation also has crazy effects on that fake "zoom" level. You can't even detect the fake zoom level either so you're fucked basically.

iOS6 safari works okay in full screen mode if you do some tricks, but in iOS7 it's been removed and the address bar at the top and bottom are always visible making your screen size tiny.

Basically it's just a massive headache, loads of work arounds and hacks, to make a game fit on the screen on different devices. I hate it


- Matt, Rustyarcade.com

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-05 15:10:54 Reply

At 10/5/13 03:04 PM, Rustygames wrote: Basically it's just a massive headache, loads of work arounds and hacks, to make a game fit on the screen on different devices. I hate it

With openfl, you can listen for Event.RESIZE. Along with stageW/H and Capabilities.screenResolutionX/Y, you should be able to resize to any device.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-05 21:15:55 Reply

At 10/5/13 03:10 PM, MSGhero wrote:
At 10/5/13 03:04 PM, Rustygames wrote: Basically it's just a massive headache, loads of work arounds and hacks, to make a game fit on the screen on different devices. I hate it
With openfl, you can listen for Event.RESIZE. Along with stageW/H and Capabilities.screenResolutionX/Y, you should be able to resize to any device.

Have you tried it?

Resize events haven't been enough, the virtual browser zoom is the main problem and there is no event for it.

I'll look into OpenFL to double check though, anything is worth a try at this point


- Matt, Rustyarcade.com

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-05 21:25:15 Reply

At 10/5/13 09:15 PM, Rustygames wrote:
At 10/5/13 03:10 PM, MSGhero wrote:
At 10/5/13 03:04 PM, Rustygames wrote: Basically it's just a massive headache, loads of work arounds and hacks, to make a game fit on the screen on different devices. I hate it
With openfl, you can listen for Event.RESIZE. Along with stageW/H and Capabilities.screenResolutionX/Y, you should be able to resize to any device.
Have you tried it?

Resize events haven't been enough, the virtual browser zoom is the main problem and there is no event for it.

I'll look into OpenFL to double check though, anything is worth a try at this point

Also although this is my worst gripe, there are still a lot more issues which are caused by:
different browsers
different browser versions
different OS'
different OS versions
device (Samsung S3 and S4 have different quirks even on the same browser and OS for example)

Being at the mercy of all these variables makes it a nightmare to build anything. Additionally every time a new phone/os/browser comes out you have to update your entire back catalog of games. iOS7 for example has caused a huge stir (here)

None of this was an issue with the Flash plugin (except the odd bug with a new player) because it was governed by a single organisation and you could have confidence developing it once would work in all browsers.

I have to build HTML5 content for commercial reasons which I won't bore you with, but the sooner I can get back to doing Flash for web and Air for Android/iOS the better!


- Matt, Rustyarcade.com

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-05 22:12:32 Reply

At 10/5/13 09:15 PM, Rustygames wrote: Have you tried it?

Nah, I've only been using swf export. The game would be kinda hard to use on mobile (wouldn't be able to hold the device and play), and we were never planning to do anything else with it besides swf.

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-06 16:03:31 Reply

Juggernaut 2:

Progress: really good, way faster than before
Reusability: I can copy pasta everything and just replace assets and cutscene data
File size so far: 3.16 MB
Audio so far: 155MB

...anyone know any good speech compression formats?

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-07 12:43:27 Reply

At 10/6/13 04:03 PM, MSGhero wrote: Juggernaut 2:

Progress: really good, way faster than before
Reusability: I can copy pasta everything and just replace assets and cutscene data
File size so far: 3.16 MB
Audio so far: 155MB

...anyone know any good speech compression formats?

Copy and paste what exactly?

The first one was very short, it was like a demo/teaser to me (unless I missed a big chunk of it which is possible!)

Since we're doing game updates:

I got saving and loading more or less finished on mine. I was pleasantly surprised to see I'd already done the DB schema and back end processing code when I went to finish the front end after a month long hiatus.

Next is converting a multi-player only Java back end into a single player mode. Going to just have an AI which takes control of any would-be user interactions making some basic decision making. Sounds easier than it is methinks ;).

Good news is it won't involve any front end work so I don't have to look at that slightly messy, year old AS3 which I naively thought would be architecturally robust enough to endure the weight of what it's supposed to accomplish.


- Matt, Rustyarcade.com

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-07 13:45:49 Reply

At 10/7/13 12:43 PM, Rustygames wrote: Copy and paste what exactly?

The entirety of the source code. I'm in the process of rewriting the entire engine to be more robust and less shitty. The next one in the series will (hopefully) be a re-skinned version of this game with the necessary changes.

The first one was very short, it was like a demo/teaser to me (unless I missed a big chunk of it which is possible!)

I think you missed some stuff. I don't remember exactly, but I added beta testers well before it was done.

Since we're doing game updates:

I got saving and loading more or less finished on mine. I was pleasantly surprised to see I'd already done the DB schema and back end processing code when I went to finish the front end after a month long hiatus.

What game is this exactly? Was it that card game, or was that someone else's?

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-07 14:06:38 Reply

At 10/7/13 01:45 PM, MSGhero wrote:
At 10/7/13 12:43 PM, Rustygames wrote: Copy and paste what exactly?
The entirety of the source code. I'm in the process of rewriting the entire engine to be more robust and less shitty. The next one in the series will (hopefully) be a re-skinned version of this game with the necessary changes.

The first one was very short, it was like a demo/teaser to me (unless I missed a big chunk of it which is possible!)
I think you missed some stuff. I don't remember exactly, but I added beta testers well before it was done.

Ahhh okay. Yeah it was the beta I played. I will have to give that a play now it's out!

Since we're doing game updates:

I got saving and loading more or less finished on mine. I was pleasantly surprised to see I'd already done the DB schema and back end processing code when I went to finish the front end after a month long hiatus.
What game is this exactly? Was it that card game, or was that someone else's?

Yeah it's the card game :)
By saving and loading I should have said it's a deck builder which allows you to make a deck, save it into a slot (6 slots for different decks), and then load it for later.

It checks on the server to make sure you've built a valid deck out of cards that you actually own (to stop those naughty little front end hackers) and saves it to the db linked to your user account. User login (and everything else!) is all server side so there is no opportunity for any funny business.


- Matt, Rustyarcade.com

Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to The Flash 'Reg' Lounge 2013-10-07 20:27:29 Reply

Word.


BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-07 21:04:10 Reply

At 10/7/13 08:27 PM, Rudy wrote: Word.

Yes. Yes it is.
Good job! :3


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-08 14:26:15 Reply

My game engine is getting closer and closer to a 2d Unity engine. I'm just going to add trigger/switch scripting, and then try making a game out of it...but I'm feeling that it's very close to production status, at least for a few games, so I'm excited. Plus it's very easy for me and my artist to test things out/exchange levels, since the whole state of the game engine can be saved into a file. Super handy.

Entity Systems ++

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-08 14:31:46 Reply

At 10/8/13 02:26 PM, PSvils wrote: Entity Systems ++;

Fixed. And as useful as minimalcomps are, I really hate organizing all the buttons and boxes. I found minimalconfigurator which lets you define the layout in xml which is handy, but it can only do so much. Comboboxes are a nightmare.

Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-10-08 17:20:34 Reply

At 10/8/13 02:31 PM, MSGhero wrote:
At 10/8/13 02:26 PM, PSvils wrote: Entity Systems ++;
Fixed. And as useful as minimalcomps are, I really hate organizing all the buttons and boxes. I found minimalconfigurator which lets you define the layout in xml which is handy, but it can only do so much. Comboboxes are a nightmare.

I swear I get freaked out when I see people with these big ol game engines/editors that let them make everything but the kitchen sink. I'm far too lazy. I just try to plan what I know I'll need and leave things fairly clean enough to put it extra stuff on the way if I realize I absolutely need it (cut-scene editor in dreamlike pixels was probably my biggest oversight).

I've never seen starting from almost scratch with each game a hinderance or "inefficient", I feel like it's an intimate/essential part of my experience, only when it comes to personal projects though of course. But I'm still young so \_(ツ)_/


nobody

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 04:24:39 Reply

At 10/8/13 05:20 PM, Innermike wrote:
At 10/8/13 02:31 PM, MSGhero wrote:
At 10/8/13 02:26 PM, PSvils wrote: Entity Systems ++;
Fixed. And as useful as minimalcomps are, I really hate organizing all the buttons and boxes. I found minimalconfigurator which lets you define the layout in xml which is handy, but it can only do so much. Comboboxes are a nightmare.
I swear I get freaked out when I see people with these big ol game engines/editors that let them make everything but the kitchen sink. I'm far too lazy. I just try to plan what I know I'll need and leave things fairly clean enough to put it extra stuff on the way if I realize I absolutely need it (cut-scene editor in dreamlike pixels was probably my biggest oversight).

I've never seen starting from almost scratch with each game a hinderance or "inefficient", I feel like it's an intimate/essential part of my experience, only when it comes to personal projects though of course. But I'm still young so \_(ツ)_/

I'm extremely lazy, hence me focusing on my tools first, so that making a game becomes a very easy thing to do!

Also, while programming my own games, I've realized that I just duplicate too many things instead of being able to focus on new and interesting functionality. So I just made all the low-level subsystems like display etc., generic. So hopefully when I make a game, I'll only be making the game part.
I think it only makes sense to eventually have your own code base to constantly work from.

gamzary
gamzary
  • Member since: Oct. 9, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to The Flash 'Reg' Lounge 2013-10-09 05:25:40 Reply

nice


wellcome

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-09 14:12:38 Reply

At 10/9/13 04:24 AM, PSvils wrote:
At 10/8/13 05:20 PM, Innermike wrote:
At 10/8/13 02:31 PM, MSGhero wrote:
At 10/8/13 02:26 PM, PSvils wrote: Entity Systems ++;
Fixed. And as useful as minimalcomps are, I really hate organizing all the buttons and boxes. I found minimalconfigurator which lets you define the layout in xml which is handy, but it can only do so much. Comboboxes are a nightmare.
I swear I get freaked out when I see people with these big ol game engines/editors that let them make everything but the kitchen sink. I'm far too lazy. I just try to plan what I know I'll need and leave things fairly clean enough to put it extra stuff on the way if I realize I absolutely need it (cut-scene editor in dreamlike pixels was probably my biggest oversight).

I've never seen starting from almost scratch with each game a hinderance or "inefficient", I feel like it's an intimate/essential part of my experience, only when it comes to personal projects though of course. But I'm still young so \_(ツ)_/
I'm extremely lazy, hence me focusing on my tools first, so that making a game becomes a very easy thing to do!

Also, while programming my own games, I've realized that I just duplicate too many things instead of being able to focus on new and interesting functionality. So I just made all the low-level subsystems like display etc., generic. So hopefully when I make a game, I'll only be making the game part.
I think it only makes sense to eventually have your own code base to constantly work from.

Totally agree a code base which you use time and time again in your games is essential. Mostly the little component and utility things are what you'll end up reusing a lot (Some custom math functions, standard algorithms [a* for example], buttons and other custom ui elements). A solid barebones framework is handy but obviously you all know my views on this (PureMVC all the way baby). If everything is built modular enough then you will find ways of recycling bits and pieces here and there.

That being said, I can't say I'm totally sold on what I've heard a couple of you doing which is to build a massive library of, as our friend Mike put it, "everything but the kitchen sink". I mean, building lots of functionality, potentially hard tied to a 'framework', "just in case" you need it doesn't sound like the most efficient or productive way of going about things.

Obviously I may be misunderstanding what you guys are up to, but I remember Eggy Mario seemed to have quite the comprehensive library going on which made me come to that conclusion.


- Matt, Rustyarcade.com

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 15:13:47 Reply

At 10/9/13 02:12 PM, Rustygames wrote: Totally agree a code base which you use time and time again in your games is essential. Mostly the little component and utility things are what you'll end up reusing a lot (Some custom math functions, standard algorithms [a* for example], buttons and other custom ui elements). A solid barebones framework is handy but obviously you all know my views on this (PureMVC all the way baby). If everything is built modular enough then you will find ways of recycling bits and pieces here and there.

That being said, I can't say I'm totally sold on what I've heard a couple of you doing which is to build a massive library of, as our friend Mike put it, "everything but the kitchen sink". I mean, building lots of functionality, potentially hard tied to a 'framework', "just in case" you need it doesn't sound like the most efficient or productive way of going about things.

Obviously I may be misunderstanding what you guys are up to, but I remember Eggy Mario seemed to have quite the comprehensive library going on which made me come to that conclusion.

The beauty of my current engine is its modularity, where adding new functionality is super easy, and doesn't interfere with existing code at all. And right now, my engine is based around creating a game; I'm not loading it with features pointlessly, right now it just has physics, display (just native vector DisplayObject stuff for now), an asset loading system, switches, weapons...well, amounting to a lot of stuff, but it's all the basics.

So my biggest point or emphasis about my engine isn't that I've hardcoded in a bunch of features for every game that I can currently imagine, its architecture itself is just open enough that I can quickly add things, or change things, while reusing any feature I need from other games. So if I program something once, I'll hopefully have to never program it again.

Plus it's very easy to add a level editor for it, which is basically just some UI elements sitting on top of the engine itself. I can change stuff, play the game a bit, pause it, and change some more stuff, and keep playing from that same point.

All of this isn't mainly "my engine", it's actually just the whole concept of Entity Systems that make everything so easy. If anyone hasn't read up about them, despite me spamming those 2 words, then do it finally.

P.

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 16:13:56 Reply

At 10/9/13 03:13 PM, PSvils wrote: All of this isn't mainly "my engine", it's actually just the whole concept of Entity Systems that make everything so easy. If anyone hasn't read up about them, despite me spamming those 2 words, then do it finally.

I imagine his system ending up as a drag n drop game maker once it's done.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 17:19:24 Reply

At 10/9/13 04:13 PM, MSGhero wrote:
At 10/9/13 03:13 PM, PSvils wrote: All of this isn't mainly "my engine", it's actually just the whole concept of Entity Systems that make everything so easy. If anyone hasn't read up about them, despite me spamming those 2 words, then do it finally.
I imagine his system ending up as a drag n drop game maker once it's done.

Well right now my entity/component editing is very similar to Unity's, without meaning to.

But very soon it will be drag'n'drop :)

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-09 17:41:58 Reply

At 10/9/13 05:19 PM, PSvils wrote:
At 10/9/13 04:13 PM, MSGhero wrote:
At 10/9/13 03:13 PM, PSvils wrote: All of this isn't mainly "my engine", it's actually just the whole concept of Entity Systems that make everything so easy. If anyone hasn't read up about them, despite me spamming those 2 words, then do it finally.
I imagine his system ending up as a drag n drop game maker once it's done.
Well right now my entity/component editing is very similar to Unity's, without meaning to.

But very soon it will be drag'n'drop :)

Ahh entity systems. An old colleague of mine was obsessed with them quite a few years ago. He even went and did a presentation on them at the LFPUG. He built a framework for it, then someone else did a better one so he contributed to that instead. Despite all of this it's taken me until now to look it up just because you lot have been chatting about it recently :)

So my question to you is: which part is new to you and turning you on to entities? The composition over inheritance part of it or the component based design part?

I only ask because these are the two things in programming which have a hundred different names for slight variations in principle or implementation and are constantly being reinvented or "re-branded". Ultimately they all boil down to the same thing!


- Matt, Rustyarcade.com

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 17:52:50 Reply

At 10/9/13 05:41 PM, Rustygames wrote: Ahh entity systems. An old colleague of mine was obsessed with them quite a few years ago. He even went and did a presentation on them at the LFPUG. He built a framework for it, then someone else did a better one so he contributed to that instead. Despite all of this it's taken me until now to look it up just because you lot have been chatting about it recently :)

So my question to you is: which part is new to you and turning you on to entities? The composition over inheritance part of it or the component based design part?

I only ask because these are the two things in programming which have a hundred different names for slight variations in principle or implementation and are constantly being reinvented or "re-branded". Ultimately they all boil down to the same thing!

Definitely the component based design part, because it makes everything so generic. A player is an entity with a certain set of components, and an enemy entity would have the same components, except instead of a PlayerComponent, it would have a GoblinComponent. So adding new things doesn't break existing code, all functionality is divided between the components and the systems to run them.

My entity system is based on a strict division of logic and data. Components are pure data. They are objects with public properties, and no functions, unless they're just helpers for setting/getting the data.
Systems request all entities with a certain set of components. And so as soon as an entity contains all the necessary components for a system, the system will start processing it.

It makes all code reusable, because of how modular and detached it is from each other. The component based aspect of it is essentially the composition over inheritance part.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-09 18:16:09 Reply

At 10/9/13 05:52 PM, PSvils wrote:
At 10/9/13 05:41 PM, Rustygames wrote: Ahh entity systems. An old colleague of mine was obsessed with them quite a few years ago. He even went and did a presentation on them at the LFPUG. He built a framework for it, then someone else did a better one so he contributed to that instead. Despite all of this it's taken me until now to look it up just because you lot have been chatting about it recently :)

So my question to you is: which part is new to you and turning you on to entities? The composition over inheritance part of it or the component based design part?

I only ask because these are the two things in programming which have a hundred different names for slight variations in principle or implementation and are constantly being reinvented or "re-branded". Ultimately they all boil down to the same thing!
Definitely the component based design part, because it makes everything so generic. A player is an entity with a certain set of components, and an enemy entity would have the same components, except instead of a PlayerComponent, it would have a GoblinComponent. So adding new things doesn't break existing code, all functionality is divided between the components and the systems to run them.

My entity system is based on a strict division of logic and data. Components are pure data. They are objects with public properties, and no functions, unless they're just helpers for setting/getting the data.
Systems request all entities with a certain set of components. And so as soon as an entity contains all the necessary components for a system, the system will start processing it.

It makes all code reusable, because of how modular and detached it is from each other. The component based aspect of it is essentially the composition over inheritance part.

It certainly does sound interesting to have the systems automatically pick up on which VO's (components) have that data and then act upon them if they do. Presumably any changes would either be polled or the system would just fire some update event notifying the view components to redraw etc.

I can see the systems becoming somewhat hard coupled though. Allow me to use wikipedias example to illustrate a scenario:

"Another system could be a collision detection. It would iterate through all entities that have a physical component, as it wouldn't care how the entity is drawn. This system would then detect arrows that collide with monsters, and generate an event when that happens. It shouldn't need to understand what an arrow is, and what it means when another object is hit by an arrow.
Yet another component could be health data, and a system that manages health. Health components would be attached to the human and monster entities, but not to arrow entities. The health management system would subscribe to the event generated from collisions and update health accordingly. This system could also now and then iterate through all entities with the health component, and regenerate health."

The problem I foresee here is that you instantly have a hard coupled dependency between the health system and the collision system. The health system must update it's components on certain collision events.

Suppose the angle you hit a wall at is relevant to how much health you lose. That data would need to come in a payload from the collision event.

Now what if I want to take my health system and move it to another game where collision is not the system which health events are interested in, and damage is no longer calculated based on angle, it's based on how sharp the enemies sword is. I'm going to either add methods to health and leave some unused redundant code in there (very bad) or write a new health component (meaning the code isn't reusable).

Also I was wondering about systems editing many components and potentially conflicting since it's a bit of a free-for-all on them.

Please forgive me if I'm talking rubbish since I've never used the pattern before :)


- Matt, Rustyarcade.com

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-09 23:30:09 Reply

I cheated OOP for the first time this game. I'm not proud, but I'm certainly not writing cutscene commands for 50 individual people. I put them into 2 groups and manipulate those, but the group class had to extend the child class to keep everything else consistent, and I had to override half the methods so they wouldn't break...so yeah. Messy and a slight bit of hard-coding, but fuck it.

gods of OOP, i beg for forgiveness
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-10 16:27:04 Reply

For the last week or so I've been staying up until 2 in the morning to edit YouTube videos and waking up at 7 in the morning for math class. A video a day is not easy .-.
Though i've been doing two since Terraria is no longer getting views. Everybody's got the game, now :(

It's fine, i'll find other games that aren't quite out yet or just out to play. And horror games because October. Fuck horror games and everything they stand for >:(


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-10-10 16:46:49 Reply

Eggy Mario, link plz


- Matt, Rustyarcade.com

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-10-10 17:57:20 Reply

At 10/10/13 04:27 PM, egg82 wrote: Though i've been doing two since Terraria is no longer getting views. Everybody's got the game, now :(

If we were near the same level in dota2, I'd suggest recording a game with me on skype. I get pretty heated when my team is bad, and they often are.

This tutorial game thing is becoming a normal game, but I'm documenting the hell out of the dev process. It'll be a temperature-based platformer or something; an alien dude who needs to maintain his body temperature while ____ on earth. PSvils will come up with ideas for that blank after getting tobacco.

"doood. those things would facillitate my compound of the elixir of creativity"