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.
-
AuthorPosts
-
October 11, 2017 at 5:41 pm #11071
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.
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:
October 16, 2017 at 1:57 pm #11124Very cool I like these kinds of games, with random maps
October 18, 2017 at 2:52 am #11159This 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
October 19, 2017 at 10:05 pm #11210I 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.
October 20, 2017 at 4:26 am #11211The 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!
October 20, 2017 at 5:29 am #11212I 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
-
AuthorPosts
You must be logged in to reply to this topic.
