Project-Blunder / TheGame

A Collab for a game.
0 stars 0 forks source link

Refactoring #19

Closed NicoM1 closed 10 years ago

NicoM1 commented 10 years ago

I'll do this soon, but I realized one thing, theres no problem with mixing scripts and hard-code, but they need to be kept distinct or debugging will be a nightmare. Easier to do something with code? Do that entire chunk with code. Want to do it with a script? Do that whole chunk with a script.

sruloart commented 10 years ago

I think hard-code for the conveyor belt, the procedural generation and the camera stuff, while continue to use scripts for the specific animations and entities behaviors. So: You'll have a class that gets an entity group, chooses what entities should be on screen (how many, when and where) and then moves everything to the left. The specific animations and behaviors (like, what does a zombie do when he sees the player) will be scripted like it is now.

NicoM1 commented 10 years ago

thats how I feel too, no reason we cant use "components" too, which are hard code linked to entitys, that you can spawn from xml (that was the original form of scripting in iceentity)

NicoM1 commented 10 years ago

ok works now but theres a new bug and I'm not sure how its related, might be from stuff yesterday: sometimes a hit on an enemy (in range) is not registered

NicoM1 commented 10 years ago

I think maybe its some weirdness with getMidpoint() I checked and it always hits "in range" but it sometimes it will say you're out of range when you're right beside a guy

NicoM1 commented 10 years ago

now were getting somewhere...the fuck? gravey_2014-09-12_13-15-37

NicoM1 commented 10 years ago

ok its better now, not perfect, but better, we can always tweak later, but I'm pretty sure it was just due to the offcenter frames for the enemy, which is fixed, but the animations move the center a lot, so sometimes it seems strange

sruloart commented 10 years ago

I still vote for fixed sized graphics/animations (16/32/64/128) together with real overlaps. I'm not sure it would be better, but this way is less prone to error (well, to an unknown type of error).

NicoM1 commented 10 years ago

I don't think it will make any difference at this point, maybe I'll switch over at some point but I dont think its really nessesary...

sruloart commented 10 years ago

The states are now obsolete so there's no point in setup and objects xmls referring to them, better go with scenes I think (Like, intro, tutorial, game) and other supportive xmls (like, HUD) that all the other scenes may use.

The way I see it, the scene.xml (intro/tutorial/game) will be the list of entities (and their behaviors scripts links) which the hard-code Conveyor/MapDistributer/ProceduralSectionMaker (I'm having troubles with how to name it) class places on the map.

Procedural Section Generation: