thanks man, that works! just gotta figure out how exactly it works so i can take advantage of it. but i think i get the basic idea here.middlerun wrote:You need a way to store the blocks that have been placed. Try this.
Search found 874 matches
- Wed Dec 21, 2011 8:27 am
- Forum: Support and Development
- Topic: 2d minecraft like engine
- Replies: 3
- Views: 2918
Re: 2d minecraft like engine
- Wed Dec 21, 2011 6:01 am
- Forum: Support and Development
- Topic: 2d minecraft like engine
- Replies: 3
- Views: 2918
2d minecraft like engine
I've been trying to make a 2d minecraft/terraria like thing for the last few days. but can't really figure it out. for now i'm just going for placing blocks with the mouse, I'll think about world generation/characters and stuff like that later/never. So far i've managed to create a single block with...
- Sat Dec 17, 2011 4:59 pm
- Forum: Support and Development
- Topic: Stuff locked to a grid
- Replies: 4
- Views: 1396
Re: Stuff locked to a grid
I think you want integer division. Lua doesn't have that, but it can floor numbers: block_x = math.floor(x / BLOCK_SIZE) * BLOCK_SIZE Doing this, you can pretend you don't work with pixels, but with blocks. If you actually have those blocks, it becomes even simpler: block_x = math.floor(x / BLOCK_S...
- Sat Dec 17, 2011 1:24 am
- Forum: Support and Development
- Topic: Stuff locked to a grid
- Replies: 4
- Views: 1396
Stuff locked to a grid
What i'm trying to do is when you click with the mouse on the screen, it creates a rectangle, But instead of having it exactly where the mouse was clicked it would adjust itself to a grid. is there any simple way to do that? if not is there any complicated way to do it? lol
thanks in advance.
thanks in advance.
- Thu Dec 15, 2011 12:21 pm
- Forum: Games and Creations
- Topic: Simple mouse game
- Replies: 17
- Views: 6897
Re: Simple mouse game
the only reason i used that font instead of the default one was cause i was trying out using custom ones. You can and should use custom fonts. No problem with that (unless you do the usual coding LOVE problem of badplacing the load of the font in our code). No need to use default font. Let me help ...
- Thu Dec 15, 2011 3:46 am
- Forum: Games and Creations
- Topic: Simple mouse game
- Replies: 17
- Views: 6897
Re: Simple mouse game
oh yeah so they are :/ well thanks for pointing that out i'll fix that soon as i can.TechnoCat wrote:The hitboxes on the stars are shifted to the bottom right!
- Thu Dec 15, 2011 3:36 am
- Forum: Games and Creations
- Topic: Simple mouse game
- Replies: 17
- Views: 6897
Re: Simple mouse game
the only reason i used that font instead of the default one was cause i was trying out using custom ones. Here's an updated version, Uses the default font, Has a new dot (a star) that gives you more points and a splash screen so the game doesn't start right away. I also plan on adding more dots, lik...
- Wed Dec 14, 2011 5:02 am
- Forum: Games and Creations
- Topic: Simple mouse game
- Replies: 17
- Views: 6897
Re: Simple mouse game
you don't need to make an account, just press the big "PopGame.love" around the top of the pageTesselode wrote:Nobody wants to make an account just to download a file. Try MediaFire or something.
- Wed Dec 14, 2011 4:17 am
- Forum: Games and Creations
- Topic: Simple mouse game
- Replies: 17
- Views: 6897
Simple mouse game
So this is basically the closest thing to a game i've made, And i started playing around with love just a couple days ago. But i have some experience with coding so it wasn't too hard to get started. But yeah, The game is called Pop. And the objective is simple, It generates a dot at a random locati...
- Tue Dec 13, 2011 11:30 pm
- Forum: Support and Development
- Topic: Timer / countdown
- Replies: 6
- Views: 5350
Re: Timer / countdown
that works. Thanks. But i got a followup question, When i print the value, it prints a number like xx.xxxxxxxxx, Is there a way to make it only print the number before the dot?