Author Topic: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]  (Read 27817 times)

mathpunk

  • Newcomer
  • Posts: 12
  • Karma: +0/-0
    • View Profile
    • Email
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #15 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.)

javelinrl

  • Rogueliker
  • ***
  • Posts: 86
  • Karma: +0/-0
  • Creator of Javelin
    • View Profile
    • Javelin - party-based roguelike (open-source RPG / strategy game)
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #16 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...
Javelin, party-based roguelike (free RPG / strategy game for Win/Mac/Lin)
https://javelinrl.wordpress.com/

Numeron

  • Rogueliker
  • ***
  • Posts: 88
  • Karma: +0/-0
    • View Profile
    • Numeron Reactor
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #17 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.

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2027
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #18 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 :)

Zireael

  • Rogueliker
  • ***
  • Posts: 604
  • Karma: +0/-0
    • View Profile
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #19 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.

Numeron

  • Rogueliker
  • ***
  • Posts: 88
  • Karma: +0/-0
    • View Profile
    • Numeron Reactor
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #20 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.

javelinrl

  • Rogueliker
  • ***
  • Posts: 86
  • Karma: +0/-0
  • Creator of Javelin
    • View Profile
    • Javelin - party-based roguelike (open-source RPG / strategy game)
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #21 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!
« Last Edit: March 16, 2017, 05:24:11 PM by javelinrl »
Javelin, party-based roguelike (free RPG / strategy game for Win/Mac/Lin)
https://javelinrl.wordpress.com/

Skeletor

  • Rogueliker
  • ***
  • Posts: 580
  • Karma: +0/-0
  • villains ftw
    • View Profile
Re: Cyan Security - A Cyberpunk Adventure [7drl 2017 - Success]
« Reply #22 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.
What I enjoy the most in roguelikes: Anti-Farming and Mac Givering my way out. Kind of what I also enjoy in life.