Begin 4
Moderator: Ice Cream Jonsey
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Pretend I'm really dumb for a minute. I installed Love and I downloaded the folder with all the begin files in it. How do I make the game go? All the stuff I tried results in errors. This is not my milieu, Im a grunting machinist
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4

Now you can drag the windows around! I decided to use the one from earlier for... well, you know.
Am I a hero? I really can't say. But, yes.
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
If Love is installed and in your path, go to the folder with main.lua in it (the main folder) and type "love ."AArdvark wrote: Sun Dec 19, 2021 12:27 pm Pretend I'm really dumb for a minute. I installed Love and I downloaded the folder with all the begin files in it. How do I make the game go? All the stuff I tried results in errors. This is not my milieu, Im a grunting machinist
Or go to the directory above the begin4 directory and type "love begin4".
Am I a hero? I really can't say. But, yes.
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Ah ha, a text line command! I need to open a text window. I've been trying to run it using drag and drop or the Open With interface...
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Ah ha! I just needed to drag the whole folder onto the love application. Am trying it now. Thank you!
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
Yeah, you're meant to package it up into a nice executable you can pass around at the end. This is still in v0.00000000001 mode.
Am I a hero? I really can't say. But, yes.
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Well the Bling-ons are kicking my Kirk ass all over space. If the AI gets better I'll never save the galaxy
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
Not much to show today, as most of the work was struggling to get the windows to work right, but hey, now we got our first (drag-and-droppable) stat panel!


Am I a hero? I really can't say. But, yes.
- Ice Cream Jonsey
- Posts: 30065
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
Soon!? I keep getting distracted with little side exercises like the drag and drop windows and code cleanup, but hopefully will get back to game content at some point.
Lua is such a fun language and Love such a fun framework, I just find knocking out any ticket at all enjoyable and rewarding.
Lua is such a fun language and Love such a fun framework, I just find knocking out any ticket at all enjoyable and rewarding.
Am I a hero? I really can't say. But, yes.
- Tdarcos
- Posts: 9529
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Re: Begin 4
It figured eventually someone would get around to asking Pinback "how to make love work."
At least it wasn't a statement that it was in source form and you had to "make love clean". In that case, you're really screwed!
"Baby, I was afraid before
I'm not afraid, any more."
- Belinda Carlisle, Heaven Is A Place On Earth
I'm not afraid, any more."
- Belinda Carlisle, Heaven Is A Place On Earth
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Yeah, he's back....
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Is there a way to make my ship go as fast as the enemy ships? Not only outnumbered but way too slow to avoid getting spaced every time. How will this be turn based, each of the ships get a turn to plot in a location and/or firing solution?
THE
FIRE ONE
AARDVARK
THE
FIRE ONE
AARDVARK
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
1. The speeds and stuff are nowhere near final, and were just random numbers to validate the movement mechanic. Nothing about this is what it's going to be, except for maybe some of the graphics. None of it.
2. It will be pausable real-time, as it is now. It's paused, and then you hold down the space bar (or press on a button which doesn't exist yet), and things will move. If you want to change your plans, you let go of the spacebar to pause and give commands.
2. It will be pausable real-time, as it is now. It's paused, and then you hold down the space bar (or press on a button which doesn't exist yet), and things will move. If you want to change your plans, you let go of the spacebar to pause and give commands.
Am I a hero? I really can't say. But, yes.
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Well I beat the Kobebeef-Maroon scenario, sort of. You can simply fire a bazillion tinkertoy torpedoes and just swarm all three ships at once. One of them ran off the screen and I couldn't see it anymore, so that counts as a win if I make them run away, right?. it gets really slow having to track all those torpedoes at once though, perhaps remove them if they miss so the screen doesn't have to keep tracking them? Now it's getting fun!
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
That was literally the next thing on my Asana to-do list, believe it or not.
Right, so in the real game, it takes time to load your torpedo tubes, so you can't just spam away. Like I says, the current state of the game has little to do with the game.
Right, so in the real game, it takes time to load your torpedo tubes, so you can't just spam away. Like I says, the current state of the game has little to do with the game.
Am I a hero? I really can't say. But, yes.
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
As requested, torpedoes now have a "duration", after which they will fade into existence. The hardcoded duration is "5", meaning if you hold the spacebar down, they should die in five seconds. Instead, they die in about 8. Let me explain why, for anyone interested in how this stuff works.
I have it set to do a specific number of things per second. I call them "cycles". As the code exists in git now, this number is set to 50. So ideally it would do exactly 50 cycles per second.
The way Love works, though, is, it will call your code every frame, and will call it with the number of seconds that have elapsed since the last frame. This is so if you want to maintain consistent gameplay, and you wanted to have something happen once per second, you can use this to make sure things don't happen faster on a high-end computer than a low-end computer. So for your once-per-second thing, you'd do something like this:
The thing is here, there is going to be some bleed-over, because totaltime is probably never going to be exactly zero. If totaltime was 1.04 once it got over 1, then when you reset it, you're going to have "lost" those 4/100ths of a second.
This is how I wrote the code, except instead of counting up to a second, it's counting up to 1/50th of a second, so we can do 50 things per second. The bad thing here is, this gives it 50 chances to "bleed over", so we're losing a lot of fractional seconds, which is why five seconds magically become about 8, as the code exists now.
A FIX APPEARS?!
Let's see if we can fix that. I'm thinking, instead of just discarding that bleed-over, we can add it back to "totaltime" once we reset it to zero, so we haven't lost that little bit of extra time. For the above code, the fix would look like this:
I'm going to put this in my code now, and if all goes well, the torpedoes will now die at exactly five seconds of holding down the spacebar... be right back!
...sounds of furious coding...
The torpedoes died at exactly five seconds.
God damn am I good at this. I didn't even have to look it up on Google, Paul.
I have it set to do a specific number of things per second. I call them "cycles". As the code exists in git now, this number is set to 50. So ideally it would do exactly 50 cycles per second.
The way Love works, though, is, it will call your code every frame, and will call it with the number of seconds that have elapsed since the last frame. This is so if you want to maintain consistent gameplay, and you wanted to have something happen once per second, you can use this to make sure things don't happen faster on a high-end computer than a low-end computer. So for your once-per-second thing, you'd do something like this:
Code: Select all
totaltime = 0
function love.update(dt) -- "dt" here is the elapsed time in seconds since the last frame, ex, ".014".
totaltime = totaltime + dt
if totaltime > 1 then -- If 1 whole second has elapsed
doSomething()
totaltime = 0 -- reset this variable so you can start counting up to 1 again
end
end
This is how I wrote the code, except instead of counting up to a second, it's counting up to 1/50th of a second, so we can do 50 things per second. The bad thing here is, this gives it 50 chances to "bleed over", so we're losing a lot of fractional seconds, which is why five seconds magically become about 8, as the code exists now.
A FIX APPEARS?!
Let's see if we can fix that. I'm thinking, instead of just discarding that bleed-over, we can add it back to "totaltime" once we reset it to zero, so we haven't lost that little bit of extra time. For the above code, the fix would look like this:
Code: Select all
totaltime = 0
function love.update(dt) -- "dt" here is the elapsed time in seconds since the last frame, ex, ".014".
totaltime = totaltime + dt
if totaltime > 1 then -- If 1 whole second has elapsed
doSomething()
totaltime = totaltime % 1 -- instead of resetting to zero, reset to the remainder after you divide by one -- in other words, whatever part was over a second
end
end
...sounds of furious coding...
The torpedoes died at exactly five seconds.
God damn am I good at this. I didn't even have to look it up on Google, Paul.
Am I a hero? I really can't say. But, yes.
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
So, and.this.is without actually yrying it yet, you have to be in a five second torpedo range in order to hit the enemy. Interesting... I hope there will be some kind of cloaking device. Like the enemy can't see you until you fire, give you a chance to get close enough.
- pinback
- Posts: 17848
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: Begin 4
That'll be for the Romulans. Or whatever copyright-free name we can come up with for them. ROMULOIDS?!!
Am I a hero? I really can't say. But, yes.
- AArdvark
- Posts: 17734
- Joined: Tue May 14, 2002 6:12 pm
- Location: Rochester, NY
Re: Begin 4
Romchip-monks!