So i started to learn LUA and LÖVE (and programming in general) about one or two weeks ago and this is what I came up with so far: Pholley - a physics-based volleyball game.
It's not the best game out there yet
Still a lot of work to do:
-add menu
-add multiplayer mode
-add difficulty levels
-think about and add an actual theme (sound + graphics)
-find a new title to fit the actual theme
Controls:
Move with A (left), D (right) and W (jump)
I'll update this Thread every now and then.
And please let me know what you think about my first game
Pretty good man. It's good to see this for a first-time project.
Right, first up you want to sort that AI out. What you have so far is really good for a first project. Try and make it seem more 'natural' (i.e. player-like). Bartbes and TommyBrunn made a similar game called Volleybrawl. I hear the code isn't too great for study, but if you play it you may gain some insight into improving your AI. One trick with AI is controlling how accurate it is, yours seems far too accurate at the moment (indeed this seems to cause it to miss when the ball rebounds, heh).
After that, I'd suggest loading some graphical and audio content to help get used to using those. Also, a brief countdown before the round begins would be delightful. It gets a bit frustrating to loose a round because you still had the key held down from the previous round, yet it would be annoying to have to press it again.
Keep it up! (NOT a pun)
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
I find it kind of annoying that so much of movement is acceleration: if I want to move more than a tiny bit, I have to hold in the key, and it keeps accelerating (and it starts out too slow to keep doing some sort of press-release cycle), and after you release, it decelerates much too slowly.
First, reaally cool first game. Remember me to the good old blobby volley days
I've never tried to do a A.I for a game , so I don't know how hard it is to code a nice "human"-like A.I. The current version seems a bit to good to play with
The smooth movment is a nice idea, but the games plays like I'm on ice. May you could reduce the slide effect so the player could move faster to the ball.
Larsii30 wrote:I've never tried to do a A.I for a game , so I don't know how hard it is to code a nice "human"-like A.I.
It's not as hard as you'd think. All you have to do is give the illusion that the cpu player hasn't got exact knowledge of the X/Y of the ball. To achieve this, make it go wrong now and then. Randomly (or structurally) insert offsets for the cpu's position and don't keep it in line with the ball all the time, move it into place as it falls. Humans playing pong don't go haywire, pushing the paddle in erratic directions in an attempt to keep up (well, maybe with frustration), they attempt to line it up as it returns, some even keeping the paddle central meanwhile. Whilst not universally true, this is a behaviour that can be observed from many players.
With some simple observations you can derive ways to make your AI more lifelike in ways more simple than you would have first thought.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
I don't know if it is wanted but right and left arrow can move the right opponent?
I also got the AI stuck on the right side of the window with the ball on it and no more movement at all...
I tried my best to solve the problems, you guys adressed.
What's new:
-added matchball behaviour
-added additional gamelogic
-improved overall physics and controls
-improved AI to be less perfect
-removed controls for second player (for now)
-changed resolution to 1280 x 720
-added placeholder images for ball and players