Author Topic: MegaGlest Refit - Engine  (Read 2840 times)

Zoythrus

  • Guest
MegaGlest Refit - Engine
« on: 4 January 2013, 18:26:07 »
*takes Elim by the shoulder*
If we truly believe it can happen and with a dash of magic, things like tooltips, auto-repair, and a smarter AI will come true. Don't doubt it!

Original topic: https://forum.megaglest.org/index.php?topic=8787.75
« Last Edit: 7 January 2013, 01:21:46 by John.d.h »

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: MegaGlest Refit - Engine
« Reply #1 on: 4 January 2013, 21:22:53 »
*takes Elim by the shoulder*
If we truly believe it can happen and with a dash of magic, things like tooltips, auto-repair, and a smarter AI will come true. Don't doubt it!

You're a programmer, don't tell our shoulders to do it.... :P
Egypt Remastered!

Proof: Owner of glest@mail.com

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #2 on: 6 January 2013, 17:25:22 »
Regardless, most people won't know everything and we don't want the upgrades sounding so funny to them do we?
I don't think we need to dumb everything down, though.

WHEN we get tooltips, it'll all make sense!
That sounds like somebody just volunteered! ;)

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #3 on: 6 January 2013, 17:47:55 »
I find this engine to be coded in a very confusing manner. Forgive me for not giving us such great things immediately.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #4 on: 6 January 2013, 18:03:07 »
Aside from there just being a lot going on in a game engine, what part are you having trouble with?

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #5 on: 6 January 2013, 18:10:19 »
The amount of files related to one thing is immensive. If I wanted to add a new node to a unit's XML, which files would I need to change? It seems like I keep finding more and more!

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #6 on: 6 January 2013, 20:56:44 »
Well it depends on the node and what it does. Adding the node itself should be trivial, but hooking whatever the new node adds to the unit type into the rest of the game could be difficult.

I've probably added like 20 pairs of new files or more to GAE over the time I've worked on it. But then I added things like items which are really complicated.

For something like adding a new stat it should only take changes to 3 or 4 or 5 files.

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #7 on: 6 January 2013, 21:11:53 »
As an added penalty, I've never worked on something this large or complex before. I've also never seen this coding style before, so it seems like the odds are stacked against me. Why couldn't this be GAE?!

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #8 on: 6 January 2013, 21:17:18 »
GAE is just as bad complexity wise. Its not like you can change stuff by modding a single file in any RTS engine.

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #9 on: 6 January 2013, 21:19:47 »
Of course not, but some comments talking about where stuff is going would be nice.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #10 on: 6 January 2013, 21:52:43 »
Ha, when I complained about that starting out I got a load of hate, mostly from bloodwurm though and he appears to be gone so maybe you won't lose any body parts.

Your best bet is obsessive use of a file searching program, or your IDE if it has one. like when I want to add a stat like shield to go on top of HP I text search Hp and hp and HP and hP, only 2 matter but better to be safe. Then I clone every function and any line of text involving HP and switch h  to s. That usually gets you most of what you need the first few times and eventually you have it memorized as to where stuff is.

Haha but the trick is then you want to do more complex stuff and you have to start all over since your old knowledge is not helpful there.

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #11 on: 6 January 2013, 21:58:30 »
I figured that you were going to say that....

now, to put away my fear of this engine, and get something done (after I get this faction balanced, of course. ;)).

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #12 on: 6 January 2013, 22:50:46 »
Omega should probably split this off to another thread.

Well as soon as Mandate gets to the 1.0 beta phase I'm going to be documenting how to do all sorts of things to the engine like add new GUI panels, add new skills and commands, add new unit stats, add new object types aside from items and units and various other things.

Adding new commands takes editing a ton of files that you wouldn't expect for instance. There will still be things I didn't get done explaining for time reasons or I just forgot, but generally you can do anything useful following the documentations.

Some people argue that a good coder should just be able to read through the raw code and figure shit out but that's such a pain and I would argue not a good strategy to get new people into coding. First you hook them with easy to follow documentation, then when they are invested you force them to work with undocumented code.

Sadly for most people they only want to work with multiplayer capable engines RTS wise so nothing I do affects them. It might be good for you to write documentation for MegaGlest to help others and because its good practice though.

Zoythrus

  • Guest
Re: MegaGlest Refit - Engine
« Reply #13 on: 6 January 2013, 23:11:33 »
Since most of it isn't documented, I was hoping that there was someone who knew the engine that was available to answer questions (which I have plenty of). I'd write documentation, but seeing as I barely understand what's happening.....

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #14 on: 7 January 2013, 01:28:24 »
It seems someone has gotten around to a topic split. I think the conversation has mostly died off but still a good idea.

But while I'm waiting for something to compile, what do you think your first change to MG is going to be? I think this whole thing was kickstarted by some comments on tool tips?

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: MegaGlest Refit - Engine
« Reply #15 on: 7 January 2013, 06:12:25 »
Last I knew, Zoy was trying and having a lot of difficulty implementing day/night cycle unit effects.
Egypt Remastered!

Proof: Owner of glest@mail.com

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #16 on: 7 January 2013, 06:17:26 »
Can't you just use the attack boost class and apply it based on the time of day?

Never mind I looked at the code. It would take a lot of work to add day night to that.
« Last Edit: 7 January 2013, 06:31:21 by MoLAoS »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: MegaGlest Refit - Engine
« Reply #17 on: 7 January 2013, 06:24:21 »
Last I knew, Zoy was trying and having a lot of difficulty implementing day/night cycle unit effects.
Last I know, he gave up on it for now.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: MegaGlest Refit - Engine
« Reply #18 on: 7 January 2013, 06:31:00 »
can't you just use the attack boost class and apply it based on the time of day?
I thought he was going for universal engine-side modifications like sight decreasing at night.
Egypt Remastered!

Proof: Owner of glest@mail.com

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: MegaGlest Refit - Engine
« Reply #19 on: 7 January 2013, 06:33:03 »
can't you just use the attack boost class and apply it based on the time of day?
I thought he was going for universal engine-side modifications like sight decreasing at night.

Well you would just add a non command loaded attack boost to unit_type and then apply the boost for each time period in world::tick() when the clock hits the right time, but its prohibitively difficult based on the code I looked at. I was talking about things like sight decreasing though.