Give me a simple challenge
Give me a simple challenge
Brand new to love2d, can someone give me a simple challenge for a beginner?
Re: Give me a simple challenge
Create a simple "Avoid" Game with a basic mainmenu, pause function, gameplay and game over screen.
Avoid game means for me you control something and have to avoid other objects. After some sort of condition ( passed objects or time) increase the difficulty by making the objects faster ; spawn more of them ; make them bigger etc.
To difficult ? I believe you can do this !
Avoid game means for me you control something and have to avoid other objects. After some sort of condition ( passed objects or time) increase the difficulty by making the objects faster ; spawn more of them ; make them bigger etc.
To difficult ? I believe you can do this !
Re: Give me a simple challenge
i can't even create a simple 2D physics sandbox without using the wiki
Re: Give me a simple challenge
Who said you can't use the wiki? I use the wiki all the time
You will never learn anything if you do not attempt something that you do not know how to do.
You will never learn anything if you do not attempt something that you do not know how to do.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Give me a simple challenge
- Level 1: Make a ship move around in the screen with the arrow keys (the ship always looks to the right). Make the ship more or less rectangular.
- Level 2: Make a single bad guy (looking to the left) which spaws at a random position just outside of the screen on the right, and then moves to the left. He doesn't interact with the ship at all. Once he reaches the left, he dissapears, and he doesn't appear again. The bad guy should be more or less rectangular too.
- Level 3: Spawn a new bad guy once every 5-10 seconds, randomly (Hint: you will need to insert them into a table when they are created and remove them when they reach the left side). Bad guys should move to the left with different speeds (chosen randomly too).
- Level 4: Make the ship shoot bullets to the right, once every time you press space (make sure you are not able to spawn infinite bullets by keeping spacebar pressed). Hint: Use a table for the bullets, too.
- Level 5: Detect when a bullet hits a bad guy, and remove both. You can use [wiki]BoundingBox.lua[/wiki] to test for this (you did your enemies rectangular, right?). And you will need a loop inside a loop.
- Level 6: Make the player die when an enemy touches him.
Don't forget to ask around if you get stuck
When I write def I mean function.
Re: Give me a simple challenge
What kikito said.
But for my sugguestion the physics module isn't required.
You can start with the player. Create a rectangle which can be moved via the arrow keys. then, find a way to create multiply other objects. If you cant manage it, look in the forums, there are many topics about it.
then look for collisions, use a simple bounding box collision, example:
And so on... Just do it step by step. Then this is super easy.
I can't either. I almost never use the physics module, but if I do I look how I could do what I am heading for.badfitz66 wrote:i can't even create a simple 2D physics sandbox without using the wiki
But for my sugguestion the physics module isn't required.
You can start with the player. Create a rectangle which can be moved via the arrow keys. then, find a way to create multiply other objects. If you cant manage it, look in the forums, there are many topics about it.
then look for collisions, use a simple bounding box collision, example:
Code: Select all
function boxCollision(ax, ay, aw, ah, bx, by, bw, bh)
return ax + aw < bx and ax > bx + bw and
ay + ah < by and ay > by + bh
end
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: Give me a simple challenge
What kikito said...
But...
You must do every loop... WIIIIIIIIIIIIIIIITH............................. REPEAT LOOPS!
[Monty Python anyone?]
But...
You must do every loop... WIIIIIIIIIIIIIIIITH............................. REPEAT LOOPS!
[Monty Python anyone?]
Re: Give me a simple challenge
I'm not that familiar with Löve (or programming for that matter) but when you're start to get the hang with Löve, a suggestion could be that you take a old popular game (like Tetris for example) and recreate it and add your twist to it but not too much but just enough so that you change what's normally associated with that game.badfitz66 wrote:Brand new to love2d, can someone give me a simple challenge for a beginner?
I also suggest that you take your ideas and sketch it down onto a sketchbook (or you can document it digitally, it's a matter of preference), just so you have that for next time you want to make something.
[EDIT]
Using the Löve2D wiki is nothing to be ashamed of, I'm pretty sure that (correct me if I'm wrong) it's safe to say that everyone uses the wiki because if it didn't exist when I wouldn't have gotten into programming at all.
Have a good day!
Re: Give me a simple challenge
I do programming for a living, and StackOverflow and the documentation for the framework/language I work with are practically my homepages. You should never be ashamed of having to look stuff up; that's what wikis are for.Using the Löve2D wiki is nothing to be ashamed of, I'm pretty sure that (correct me if I'm wrong) it's safe to say that everyone uses the wiki because if it didn't exist when I wouldn't have gotten into programming at all.
Who is online
Users browsing this forum: No registered users and 5 guests