Progress on Enemies

Hey there Hunters,

I've been working on setting up the base system for enemies and it's just about done. I had quite a difficult time with it, and it's still not quite how I want it but I guess I can just extend it if need be from here. Not everything is finished yet, but I want to discuss what my plans are for this enemy system.

The system is set up to handle Lua scripting. It's a big contrast from MMF2's event editor but there's a couple of reasons I chose Lua scripts over MMF2 events.

1. It's accessible.
I've mentioned this before, but one of the reasons I started the X Editor was because not everyone interested in this engine has access to MMF2. External scripting is a good method as it allows everyone to have customizable options available to them. There are plenty of guides and tutorial on Lua scripting, but I plan on making my own eventually for dedicated X Engine use.

2. It's modular.
What does that mean? Basically it means that if someone makes an enemy (let's say Sniper Joe), it can be compressed as a package and used by everyone. All it takes for you to use that Sniper Joe in your own game, is just to import it in the X Editor and plop it wherever you want. Even then you're still free to customize that Joe as you like, so if you only need it for base work and want to add in your own little features, you're perfectly free to do so.

3. It's fast.
Of course, this varies from PC to PC, but the common rule is that Lua scripts are much more optimized to run than MMF2 events. Take for example the screenshot here...

It may not look it, due to how bunched together they are, but this is approximately 100 Ray Bit enemies. All functioning at once. All at a full frame rate. Of course, as I've said, it varies from PC to PC so some people may only be able to get 50 or so enemies, but that's still quite an impressive number in my opinion.


All of this is still a work in progress, so of course, some things are susceptible to change. I still haven't included it into the X Editor yet either, so there isn't a GUI for any of this yet. Although, besides the animations, everything will be done by programming scripts, so their isn't much need for a full-on GUI. Speaking of, here is an example snippet of the code used for the Ray Bit enemies (it doesn't include their shooting action, just jumping).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function Main(obj)
 
 -- Increment delay between each action.
 if obj.currentAnim==0 then
  obj.delay = obj.delay + 1 
 end

 if (obj.doAction==0 and obj.delay >= 40) then
  
  -- Set action to jump and change animation
  obj.doAction = 1    
  if (obj.doAction<4) then
   obj.changeAnim(1)
   
 end
 
 -- When next animation occurs, run Action_Hop function.
 if(obj.currentAnim==2 and obj.onAnimStart) then
  Action_Hop(obj)
 end
 
 -- Execute landing action if in mid-air.
 if (obj.collision.floor() and obj.y_vel > 0) then
  Action_Land(obj)
 end

end

function Action_Hop(obj)
 obj.y_vel = -5
 obj.x_vel = 2 * obj.dir
end

function Action_Land(obj)
 obj.changeAnim(3)
 obj.doAction = 0
 obj.delay = 0
 obj.y_vel = 0
 obj.x_vel = 0
end

Hopefully that's not too overwhelming. If you have any questions, feel free to post them below as always. When this system is fully complete, I'll go into more detail the process of creating an enemy from scratch, kind of like a tutorial.

Be sure to subscribe to this blog if you want to be notified when new info is posted. Until next time guys.

27 comments:

  1. Also, Happy 2013 People!
    Forgot to mention that in my post. @_@

    ReplyDelete
  2. Good job man! Keep up the good work!

    ReplyDelete
  3. Excellent work, Game Dragon. You really are the greatest X Engineer around! ...Also the only X Engineer around, but that's beside the point!

    ReplyDelete
  4. great design, similar to the snes.'m starting my project too, but will be open map. Good luck on your project, all of that right.

    ReplyDelete
  5. Always glad to hear X Engine news.

    ReplyDelete
  6. Man...Can't Wait to see the engine ready! I'm so anxious to start making a game with it!!!

    ReplyDelete
  7. I don't like the magic numbers, but cool concept nonetheless.

    ReplyDelete
  8. Which magic numbers are you referring to exactly?

    ReplyDelete
  9. because GM is ass and everybody knows it

    ReplyDelete
  10. anything new? maybe another playable .exe or perhaps the mfa xD

    ReplyDelete
  11. Dunno when I'll be able to get it out. I've been having issues both with the engine and real life. I am in the process of reworking things, but I don't have anything substantial to speak of at the moment.

    ReplyDelete
  12. Hey, sup. Glad to see you're still working on it. If need help, drop me a e-mail. I sort of don't use MSN or AIM anymore lol

    ReplyDelete
  13. Haha, so I noticed. I don't have your email, but I believe I still have you on Steam.

    ReplyDelete
  14. Do you have twitter by any chance, Game Dragon?

    ReplyDelete
  15. Ok, just throwing it out there. i think u should just give us what uv got. no updates in months and even megaman X eclipse has a demo out. We need something from u, a video or somethin.

    ReplyDelete
  16. ok honostly about how close are you? its been ages man.

    ReplyDelete
  17. Wow! I Just learned of this project. I've been waiting for years for a full ROM hack or MMX fan game, often looking around every 6 months or so, only to not find very much going on. I don't know how I missed this until now.

    I was getting close to taking up a project a lot like this too, though in Unity or GameMaker Studio. I hope this project is still going. I'm still learning Unity, and not having such a overwhelming task on my plate would probably be best. And like many others I just want to see some good MMX style games sooner rather then later, and certainly not never.

    I've gone over your older blog posts and videos, and you seem to have done an amazing job so far. So keep up the great work. I know how important fan feedback is from my own projects, which is why I'm making sure to say this. =)

    ReplyDelete
  18. So, it's been nearly a year...:P

    ReplyDelete
  19. it has been a whole year dude... where are you?

    ReplyDelete
  20. I also just found out about this project from your you tube video which is over three years old. I'm glad to see something a bit more current out there. And would love to see this get released. I've actually been designing my own Mega Man X mavericks lately in 16 bit graphics as a bit of a fan project over on my Deviantart page. And I've been considering starting making my own X game, or at the very least start with programing my Mavericks as fight able mini games. And I'm looking for a engine to help me do that. Of course I know little of coding, but this would be great way to learn. And I think your engine looks amazing. It seems you take a while between updates, but here's hoping you are still perfecting this engine.

    ReplyDelete
  21. ok i give up, this aint ever comn out.

    ReplyDelete
  22. I hope you're still out there somewhere Game Dragon, because this is going to be fucking awesome if you release it

    ReplyDelete
  23. well might as well pack it in, the greatest thing to ever happen to megaman x fans is dead. guess game dragon pulled a capcom on us.

    ReplyDelete
  24. Can you please release the source code?

    ReplyDelete
  25. Em parceria com a Google e com o Grupo VIP oferecemos telas mosquiteiras SP importadas dos estados unidos aos clientes que querem proteção e bem-estar para sua família, isto porque o produto não propaga chamas, fungos ou mofos, são telas de fácil limpeza e protegem sua família contra picadas de insetos, principalmente os mosquitos da dengue. Telas mosquiteiras em São Paulo, telas mosquiteiras campinas, telas mosquiteiras valinhos, telas mosquiteiras vinhedo, telas mosquiteiras granja vianna, telas mosquiteiras alphaville, telas mosquiteiras tamboré , telas mosquiteiras jundiai.



    telas mosquiteiras para idústrias de alimentos , telas mosquiteiras SP, telas mosquiteiras empresas químicas, telas mosquiteiras vinhedo, telas mosquiteiras granja vianna, telas mosquiteiras alphaville, telas mosquiteiras tamboré , telas mosquiteiras SP.

    ReplyDelete