Temple of The Roguelike Forums

Game Discussion => 7DRLs => Topic started by: Numeron on March 05, 2017, 01:56:50 PM

Title: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Numeron on March 05, 2017, 01:56:50 PM
This game was a success!
Download HERE! (http://www.numeronreactor.com/index.php?page=7DRL_2017)
Requires Java 8 and OpenGL2+

(http://i.imgur.com/nVsUH8g.png)



Hello! My name is Numeron, and this is my 10th entry in the 7 day roguelike challenge! This year, my game is (tentatively) called Cyan Security.

This will be a standardish hask-n-slash type game set in the same universe as my previous game Rogue City Scavenger. This time however, instead of a CDC agent you take the role of a Cyan Security robot. This robot's health pool is its power supply, and its from this health pool you must draw power to use special abilities. This means a careful balance on spending for powerful abilities since they might kill you just as fast as they kill your enemies! In addition to this, I'm implementing multi-tile enemies and a multi-tile chassis for the player! So you can increase your size to 2x2 and also fight enemies that size too.

Stay tuned!
Title: Re: Cyan Security [7drl 2017]
Post by: Numeron on March 05, 2017, 02:00:50 PM
DAY 1

Got some UI work done - a nice segmented health/power bar on the left, and some work for the mapping upgrade (you can see walls in undiscovered areas.

Also, those 4 guys in the middle are actually the same guy! I need to get 32x32 tiles working for him, but he can move around and bump walls and enemies properly as a 2x2 unit. Even open and close doors, and pick stuff up from any of the 4 tiles! Tomorrow will be harder though because I need to make the AI handle this, both attacking me as 2x2 and also being sensible controlling 2x2 units. Also need to do FOV, currently its only from the top left tile.

Happy with the progress so far though :)

(http://i.imgur.com/YXaJ7XS.png)
Title: Re: Cyan Security [7drl 2017]
Post by: Avagart on March 05, 2017, 02:53:04 PM
Numeron's roguelikes never disappoints a player 8)
Title: Re: Cyan Security [7drl 2017]
Post by: KhaoTom on March 05, 2017, 06:49:07 PM
Yep. Cool to see a larger than 1 tile enemy!
Title: Re: Cyan Security [7drl 2017]
Post by: Numeron on March 06, 2017, 01:29:19 PM
DAY 2

FOV for multi tile units took a little longer than expected, and I never even got started on enemy AI being ok with large. I did get the tiles working properly, and even a 3x3 unit for the final boss which when controlled directly all works just fine! Mostly I got a lot of story stuff and cut scenes done today instead - a number of hand crafted mini areas and events that trigger to progress what little story there is. Hoping tomorrow I can finish off enough to be comfortable starting random level generation the day after - a task that always seems to take me the longest...

(http://i.imgur.com/VtZgVr4.png)

(http://i.imgur.com/zgHrupU.png)
Title: Re: Cyan Security [7drl 2017]
Post by: Numeron on March 07, 2017, 02:56:51 PM
Day 3

After working until 2:30 last night, I had to get up at 8 this morning to babysit some tradesmen while they replaced carpet in one of our rooms... Didn't know they were coming today until they rocked up! Well I'm extra tired today now, but I've been alright with progress. All story stuff and hand-crafted mini-sections are all totally squared away - you can go from start to end and win (though bosses are currently unresponsive). You can also die, and everything hangs together nicely. I have the 2x2 mobiles working well except its sometimes obvious that they tend to lead with their top left tile, and also target the top-left tile in their opponents. I'll have to look into that... I've also fixed all my items and shooting code to work from the 2x2 unit, and also made the items into permanent upgrades instead of consumables. I figure the consumable is now your health so lets try to keep tactical focus on that.

Additionally, I've added an pseudo-XP bar which fills as you kill. Once it reaches top you can transform into the 2x2 model, during which time it will drain back down to zero and then drop you back to 1x1. Switching over bodies was a pain because this old codebase doesn't have that ability. So I had to hack in some nasty code so that the internal server tells the client to forget all its assets before switching. This means the entire map is wiped on the client side and rebuilt from scratch. It seems to work instantly but, its causing plenty of issues as some bits and pieces of the old map linger in various hidden references due to all this janky 7drl code.

Here are a couple of screenshots of the story sections...

In a spot of bother with some big lads in the subway:

(http://i.imgur.com/1OmJ6eg.png)

Accidentally foiling the neighbors:

(http://i.imgur.com/iFUu9gW.png)
Title: Re: Cyan Security [7drl 2017]
Post by: Numeron on March 08, 2017, 02:48:52 PM
Day 4

Well I've been doing proc world gen today, and as anticipated its going slooowly. Because of my tiles, rooms have to have a lot of stuff in them or they look very empty, so it takes time writing room generators as well as map generators. While I can certainly go back and take some from past 7drls, they often need improving or porting to work with the system as it is now. In addition I've had smooth lighting implemented in the engine since last year, and while it looks amazing, it means I not only have to make rooms look good I also have to give them sensible lighting... but when it works it works extremely well! Here are some room samples I've collected as I'm going... Lights actually flicker, glow and change color too!

This shit is cyberpunk as f*ck, and I haven't even added graffiti and other wall decorations yet

(http://i.imgur.com/O3rjHqM.png)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017]
Post by: Numeron on March 09, 2017, 06:47:32 AM
Full update for today coming later, but just wanted to share some cyberpunk goodness...

(http://i.imgur.com/979BPKw.png)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017]
Post by: Numeron on March 09, 2017, 04:43:37 PM
Day 5

So the world-gen is done for the metro area and for the quarantine area - now trying to wrangle the final area is proving tricky. I hope to have that done before the end of tomorrow so I can start adding all the spawners, and then begin play-testing and balancing on the final day...

Ugh world gen always takes the longest... I have the week off work and it still takes 3-4 full days just on that! I really need to work on my tools for doing this stuff, its all janky as heck... maybe I'll see what I can do when I merge enhancements from this 7drl cleanly back into trunk.
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017]
Post by: Zireael on March 09, 2017, 07:04:18 PM
The visuals already look amazing!
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017]
Post by: Numeron on March 10, 2017, 11:55:50 AM
Thanks!

Day 6

World-gen all done! I have different weather effects for each of the three areas all created this 7drl - rain you can see above, fog, and a smoky black fog. In Area 2 (with the fog) there are a lot of walls missing (on purpose) so there is fog indoors and that's ok for the quarantine zone theme. Section three doesn't though so when I got to that today I couldn't just pallette swap the fog to a black color I had to completely re-write the weather routine for a third weather type instead.. took too long! Here is a little sample from area 3. Its darker and eviller, and has a few things going on...

Now tomorrow to start distributing enemies evenly and start on balancing and polishing!

(http://i.imgur.com/VsgVhfn.png)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017]
Post by: Numeron on March 12, 2017, 12:52:53 AM
All done! Download here (http://www.numeronreactor.com/index.php?page=7DRL_2017).

Extremely tired though - been working a solid 24 hours  :'( I cant do a write up right now, or any decent presentation work like screenshots and descriptions but I have made the thing available above. I'll do all that other stuff properly tomorrow after I've rested. Hopefully I haven't botched the pack, and it works correctly for everyone. You gonna need java 8 and OpenGL2+
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Numeron on March 13, 2017, 10:23:13 AM
Day 7 - Success

Ok, so all done, and ready! Last day was hectic - it took way longer than expected because of issues with the multi tile enemies. Turns out that pathfinding wasn't as simple as directing the top left tile to the target while checking multiple tiles on each A* node for blockages - because if the target is standing next to a wall on the right there is no path even if the left is open... and then if the target is also a multi-tile unit standing in a doorway, enemies have to know they can reach you without going all the way around. That and more...

So it was a full 23 hour working day bringing my total time worked this week to 110 :O But I love it so all good :D

Anyway, have some screenshots!

(http://numeronreactor.com/7drl/2017_cyanSecurity/ss1.png)

(http://numeronreactor.com/7drl/2017_cyanSecurity/ss2.png)

(http://numeronreactor.com/7drl/2017_cyanSecurity/ss3.png)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: javelinrl on March 13, 2017, 01:53:59 PM
Congrats on your success! Unfortunately I get a "minimum window size is 1024x768" error, even though my resolution is "1366x768". I'm guessing the window decoration (borders) are messing things up by eating a few pizels and making the window taller than 768 pixels?
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Numeron on March 14, 2017, 09:35:52 AM
Thanks! I removed that restriction, rebuilt and re-uploaded.

The window can now be any size, but the health-bar on the left may not be fully visible at lower window height than the initial default. Better that everyone can play, even if it means minor bugs in the interface :)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: mathpunk on March 14, 2017, 07:01:46 PM
Ok, so all done, and ready! Last day was hectic - it took way longer than expected because of issues with the multi tile enemies. Turns out that pathfinding wasn't as simple as directing the top left tile to the target while checking multiple tiles on each A* node for blockages - because if the target is standing next to a wall on the right there is no path even if the left is open... and then if the target is also a multi-tile unit standing in a doorway, enemies have to know they can reach you without going all the way around. That and more...

How did you solve this A* problem? I suppose you could convolve the whole map with an NxN tile of 1s, and then compute the A* in the convolved space? (i.e., if the map is MxM you make an (M-N+1)x(M-N+1) grid where tile (x, y) is passable if and only if tiles (x+i,x+j) are passable in the original space for all 0<=i,j<M, and then compute A* on the (M-N+1)x(M-N+1) grid.)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: javelinrl on March 14, 2017, 08:30:19 PM
I was wondering why I managed to download your last year entry (Cult) instead of the right one the first time I went to your site. Now I realized why: following your link in the OP send me to a page where Cult is listed! You should probably fix that!

Cult is a neat little game though! It's like a single-player MOBA roguelike, very interesting. Did you design it with that in mind? Or did you just create your own design from scratch without thinking about MOBAs at all?

Cyan Security looks great and for the little time I played it feels pretty solid too! The problem though is that I'm getting something like 2 frames per second here and every move takes 1 second to update the screen. It's playable for a few minutes but as soon as you need to exit a building it becomes a 30-second-long task (30 steps). Hey, I'm all for slow gameplay, we're talking roguelikes here but this is too much, even for me - also the rain effect looks terrible as it varies between 1 and 2 frames per second.

Don't get me wrong, the game art is at a professional level for pixel art, it's awesome but the frame rate makes it unplayable and unenjoyable. My current setup is a 2.5GHz quad-core, 3GB RAM, up-to-date Java 8 (updated today). I suppose my biggest weakness is my graphics card, which is an integrated (onboard) chip from 2009 - but even then it's hard to believe that it cannot reach even 3 or 4fps, when it runs much more demanding games well enough.

Just idling the game at the first room (not even using half of the screen) is enough to keep a consistent 50% CPU usage. That's extremely heavy for a simple 2D game, even if it's one that has nice graphics! I happen to be a Java developer too and this seems pretty unreasonable to me... as I said before, I know I have a shitty graphics card but even then Cyan Security doesn't look like the type of game that should need a latest-generation graphics card or a last-year AlienWare computer to run at 30fps...
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Numeron on March 14, 2017, 11:20:23 PM
I was wondering why I managed to download your last year entry (Cult) instead of the right one the first time I went to your site. Now I realized why: following your link in the OP send me to a page where Cult is listed! You should probably fix that!

Thanks, link fixed.

Cult is a neat little game though! It's like a single-player MOBA roguelike, very interesting. Did you design it with that in mind? Or did you just create your own design from scratch without thinking about MOBAs at all?

I have a history of arena-type games for the 7drl, my first ever was a king of the hill, and the two that followed were area capture games. I didn't have a lot of time last year to work on a game so I went with what I knew best :P

(performance stuff)

Hm, it works alright on my dev PC, which purposely isn't the latest and greatest for that reason, but trying it on my shitty work laptop can see some slowdown. I'll have to chuck it into a profiler when I get home from work tonight. The lighting seems the obvious thing, there's a lot of alpha blending going on. The pegged CPU is because when the FPS dips below the 60 cap I don't sleep the main thread, just let it go immediately to the next frame.



How did you solve this A* problem? I suppose you could convolve the whole map with an NxN tile of 1s, and then compute the A* in the convolved space? (i.e., if the map is MxM you make an (M-N+1)x(M-N+1) grid where tile (x, y) is passable if and only if tiles (x+i,x+j) are passable in the original space for all 0<=i,j<M, and then compute A* on the (M-N+1)x(M-N+1) grid.)

I can't reduce the search space because gaps in walls and so forth are all irregular. The way I solved it is by tracking onto the target tile, but returning a successful path if any of the 2x2 nodes checked for passability are next to the target (or any of the targets since the player can be multi tile too). Then the AI has to determine if it is next to the target and attempt to bump in that direction, even though the path doesn't go quite that far. Also for some corner cases resorting to "blind steps" where the mob simply tries to walk towards the player with no regard to path. Basically, previously my pathing always went onto the target tile, and the AI had rules to not step there if it was an ally, now it only goes next to the target tile, and the AI has rules to do the extra step if its an enemy.
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Darren Grey on March 14, 2017, 11:45:00 PM
Runs very smooth on my machine. Awesome piece of work, Numeron! Love the atmosphere and the games looks even more gorgeous than usual :)
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Zireael on March 15, 2017, 09:45:49 AM
I am seeing no performance problems, but to be frank this is a switchable graphics laptop where the drivers are shot to all hell so I'm never sure if I'm running off the dedicated card or the integrated Intel.
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Numeron on March 16, 2017, 01:12:55 AM
Played the game with some profiling on, and at its worst the shadow layer rendering took up to 15ms per frame to render. When trying to keep a steady 60fps, that means 900ms out of every second is spent drawing shadows, so while my pc can keep up, i can def see how that bottle neck would blow over on others. I have some ideas on improvements but theyre significant and involved enough that i think i wont be fixing them in this 7drl branch (sorry javelinrl), rather do it more leaisurely in trunk after merging down the changes I want to keep.
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: javelinrl on March 16, 2017, 05:16:58 PM
No need to be sorry pal  :D my reply may have sounded like a big ol' rant but it was more of a detailed dissection of there being a performance problem - which, if I didn't elaborate on, you and others might fairly assume it was just me having an outdated JVM, or terribly slow computer, etc . Others here have had no problem with the game so I think you're OK but I find it hard to believe I'm the only one too  :P Anyway I was mostly writing just so you know there's room for improvement, as I appreciate when others do the same for me. I wasn't expecting a fix at all - even though I've been trying to give feedback on many 7DRLs here, I understand they mostly come out in an "as-is" state!

Thanks for the follow up and reply, good luck with the work on your main branch!
Title: Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
Post by: Skeletor on April 24, 2017, 02:27:08 AM
Nice concept. The first pic, with a robot in front of a 'Babes' go go bar, reminds me of an RPG made by a high school classmate where you would play as an antisocial robot in a dystopian world, doing things like exterminating entire villages and then rent the empty houses and running dodgy activities. Going with prostitutes though would result in the robot ejaculating oil and therefore losing hps.