Fighting in random maps

About Monkey 2 Forums Monkey 2 Projects Fighting in random maps

This topic contains 5 replies, has 3 voices, and was last updated by  Pakz 1 year, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11071

    Pakz
    Participant

    https://cromdesi.home.xs4all.nl/emscripten/monstersrandommap/Untitled1.html

    I had a rather long break from coding for my doing. But I noticed yesterday that it was not that hard to get back into things. I was playing a game called Legend of Pandora and decided to program a part of that game for myself.

    What I got right now is more of a spare part for possible future projects. I was also thinking of turning this into 3d. What I got right now is a 2d level generator with a player that can be controlled with the cursors. The space bar triggers his weapon. On each map a random amount of enemies get spawned with a random amount of HP. When the player kills them all a new map gets generated. The player can not get killed at the moment.

    I put the code on my github pages. Both a version for monkeyx and monkey2 are there.

    https://github.com/pakz001

    The fun thing is that not that long ago I figured out how to do that bouncing back that the enemy does when getting hit. Done with the angle between the weapon and the enemy. Also I think I figured out how to unpile a group of enemies using that same method. (untangle)

    Attachments:
    #11124

    papgar
    Participant

    Very cool I like these kinds of games, with random maps

    #11159

    Pakz
    Participant

    This is the latest version. The code is on my monkey2 github(pakz001) (the player vs monster main file)

    It has a rpg a gun and explosions.

    https://cromdesi.home.xs4all.nl/emscripten/playervsmonstersmain/Untitled1.html

    #11210

    Pakz
    Participant

    I spend a while creating a new map generator and ai. I was thinking how to make cover points on the map where the ai can move to hide from the players bullets. I programmed it so that around the player invisible bullets are shot. Then each tile below the bullets get marked until the bullets get removed if off map or hit wall. Then I find cover spots not marked if wall tile nearby.

    I used a* to move the enemies around and used a couple of methods so they show ‘playable’ behaviour. I gave them the ability to shoot also.

    It seems to work allright. I think I got the freezing bugs out this evening. I originally coded this yesterday in MonkeyX but just converted it to Monkey2. I still use the Flash target.

    Emscripten version here :

    https://cromdesi.home.xs4all.nl/emscripten/aitakingcover/Untitled1.html

    The code is on my pakz001 user github.

    #11211

    Ethernaut
    Participant

    The enemies are a lot tougher now! Cool stuff.

    You should consider adding “Robotron” style shooting, where the shooting direction doesn’t have to match the player direction (let’s say, cursor keys for movement and WASD keys for shooting in 8 directions, or dual analogue sticks like Geometry Wars), I think the core shooting mechanic would be more enjoyable!

    Cheers!

    #11212

    Pakz
    Participant

    I spend some time adding an Rocket Propelled Grenade launcher. The ai can also use this. I made a checkfunction that shoots the rpg to see if it or the debris hits the player before the ai shoots them. I also added polygon smoke and debris.

    Not to sure about adding different control method yet. I am not that familiar with games that have that style of control.

    Here the link : (the old one so Ctrl+f5(reload) might be needed)

    https://cromdesi.home.xs4all.nl/emscripten/aitakingcover/Untitled1.html

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.