←  Games

ComputerCraft | Programmable Computers for Minecraft

»

NightFall - Tower Defence Game

Exerro's Photo Exerro 18 Jan 2015

Hello,

Having taken a little break from Nova (and CC altogether), I decided to come back and create a game. After some brainstorming with a friend, we decided I should make a tower defence game.

The game is in a really basic state at the moment, so don't be too harsh. I'm mainly posting this so I can get some feedback so I don't have to do any drastic changes further in the game's development.

Screenshots:
Spoiler

The 3 waves I've programmed in aren't too creative, just demos really to show a couple of different units. I'll probably be spacing them out a bit more too. I've also just realised that your health can go below 0 without anything happening... oops.

If you want to create your own maps, use the map creator. Just make sure there is a full path from the start block to the end one, and you also need to place a path block at the start block.

You can download this from pastebin:
pastebin run v4ZQBHyh
You can then run the game by typing ".nightfall/launcher" into the shell.

Any feedback is greatly appreciated. I also need a lot of artwork done (as you can probably see) so if you'd like to help out with that, just say.

Have fun!
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

Bug:
[NightFall] gameUI:40 Attempt to index ? (a nil value)

Reproduction:
Launch game
Create or load game
Click on basic turret
Click on the "place"
Game crashes


Great game though. Would love to see people generating more content to it.

EDIT: fixed :)
Edited by InDieTasten, 18 January 2015 - 07:54 PM.
Quote

Exerro's Photo Exerro 18 Jan 2015

Oh, sorry, thought I fixed that. Can you try downloading it again? If it still doesn't work, it should print a traceback (saying "in ..." etc) and it would be useful to know what caused it.
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

Yeah, it works great now :)
It's a little... slow. The step-rate is inconsistent on my computer, even though I have fix 60 FPS.

I like the graphics and different projectiles you implemented.

I'll see if I can mess with the pathfinding in the map editor :3
Quote

Exerro's Photo Exerro 18 Jan 2015

Yeah I'll be working on new waves and performance updates for the next version. For the rendering, it goes through a long process of drawing to an image which draws to another image which draws to a buffer which draws to the screen. I'll be trying to take the map and units etc away from the UI library to speed things up.

Also, the pathfinder should be perfect. It calculates all possible routes to the destination then selects the shortest one (slow I know but it doesn't need to be fast as it's only computed once).
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

 InDieTasten, on 18 January 2015 - 08:00 PM, said:

I'll see if I can mess with the pathfinding in the map editor :3
Well, having no path available as AI, the enemies won't show up. You could implement a check that executes at every change in the map and displays its validity in the menu on the right, so at least one know, that the map I'm editing is at it's current state not valid.

Also as a feature request:
Why not different terrain types, so that enemies can walk through everything, as long as it doesn't cost more "movementpoints" as the "regular path" which has a much lower movement cost.
Then you wouldn't have to deal with invalid maps, as the enemies could walk through the grass too, only much slower ;)

Also, the pathfinding behaves strange to me, when there are multiple paths. all enemies follow the same path, but not the shortest. they take weird routes until they finally arrive at my base
Edited by InDieTasten, 18 January 2015 - 08:15 PM.
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

Pathfinding at it's best:
Posted Image
Quote

Exerro's Photo Exerro 18 Jan 2015

Hmm, weird, I'll have to take a look at the algorithm. If I were to implement the open terrain idea, I'd need a better pathfinding library. Any ideas what I could use?
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

 awsumben13, on 18 January 2015 - 08:21 PM, said:

Hmm, weird, I'll have to take a look at the algorithm. If I were to implement the open terrain idea, I'd need a better pathfinding library. Any ideas what I could use?
A* fast and allows for different costs between tiles.
I don't know, whether there are "libraries" for that, but the implementation is quite simple.
I've seen people referencing good material for learning how the algorithm works.
Quote

Exerro's Photo Exerro 18 Jan 2015

Ok, any comments on the graphics? Anything I can improve?
Quote

InDieTasten's Photo InDieTasten 18 Jan 2015

 awsumben13, on 18 January 2015 - 08:26 PM, said:

Ok, any comments on the graphics? Anything I can improve?
No man, I don't think you can do much better without making the game unplayable performance-wise.
The game feels nice with the amount of animation/sliding. I think you hit it perfectly. It's like playing a real game, as supposed to playing a "hakeliges" game within a mod of a game.
Quote

Exerro's Photo Exerro 18 Jan 2015

Awesome, thanks! I need to change the costs of the turrets at some point, it's way too easy to get set up early on.

Current todo list:
  • Performance improvements.
  • New waves (probably about 10, with increasing and logical difficulty increases).
  • Better costs and rewards for killing units.
I'll get to the pathfinding/new map structure later.
Edited by awsumben13, 18 January 2015 - 08:35 PM.
Quote

ByteMe's Photo ByteMe 18 Jan 2015

It's awesome, I love that time went into the look such as menus and homescreen.
Quote

oeed's Photo oeed 18 Jan 2015

Wow, this looks really awesome. I'll try it out soon!
Quote

TheOddByte's Photo TheOddByte 19 Jan 2015

This is really awesome, tried it and it was better than I expected. Love the GUI and the animations, sprites and just everything!
You did a really good job on this! :D
Quote

cdel's Photo cdel 21 Jan 2015

looks awesome, the menu image just looks spot on :)
Quote

Geforce Fan's Photo Geforce Fan 05 Apr 2015

This deserves more attention. It's pretty cool.
The animations are VERY smooth, and they game plays quite well. I am bypassing the window API, but even then it's hard to get animations that smooth.
10/10, good work.

I did get an error, but I'm fairly sure it was my own OS's fault. It errored out and said access denied, meaning it tried to access a file it did not have permission to -- it will only error when doing this through write mode. Running it will admin permissions fixed this, but what files do you write to?
And nice error tracing system.
The game's actually pretty small, too.164KB(the APIs are 112KB) on a fresh install. For what it does, that's pretty small.
Edited by Geforce Fan, 05 April 2015 - 07:12 AM.
Quote

Exerro's Photo Exerro 05 Apr 2015

Thanks, people keep commenting on my animations (which don't bypass the window API), and I really can't take credit for it - tween.lua by kikito. Anyway, the files it writes are in the /saves folder, which it does every time you use money, complete a wave, or get money. The error tracing system, again, isn't me, and is mainly due to lbphacker's traceback() function which returns a table like { "blah:10", "blah2:20" } etc. The APIs should be minified, hence the size, although I may have wrote this long enough ago that I wasn't using a minifier.

Anyway, I'm going to rewrite this as soon as I finish my new UI library. I wrote a little preprocessor and I'm dying to test it out on something like a game, I think it will really help. With the new version, I'll be able to use the glorious mouse_up events (thanks Dan!) which will drastically improve the gameplay, although I think I'll keep the layout/graphics pretty much the same, just a bit faster hopefully.
Quote

Creator's Photo Creator 14 Apr 2015

Really good, alittle bit laggy, but else excellent. get a +1
Quote

CrazedProgrammer's Photo CrazedProgrammer 18 Apr 2015

Can you make it so that the files don't have to be in .nightfall?
I'm currently making a Steam-like game distribution program and I would like to include this game, but because it has hardcoded paths I can't include it.
Quote