Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ludum Dare 25 Entry - Hero Must Die  (Read 11761 times)

0 Members and 1 Guest are viewing this topic.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Ludum Dare 25 Entry - Hero Must Die
« on: December 18, 2012, 03:46:04 am »
Hello,

I took part in the LD25 Jam, and here is my entry:

http://www.ludumdare.com/compo/ludum-dare-25/?action=preview&uid=7769

It uses SFML for windowing, sound, and threading.

It uses the NEAT algorithm from the visualization program I previously posted about on this forum: http://en.sfml-dev.org/forums/index.php?topic=9897.0

The AI powered by these neural networks tries to beat levels that you set up with obstacles. You must stop the AI from reaching the princess.

Here is a screenshot:

Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #1 on: December 19, 2012, 06:45:16 pm »
The AI sounds pretty interesting.

When I start NEAT_Visualizer.exe, the screen remains black. After some time, there are single pink and gray pixels, but the biggest part is still black. How do you render the graphics, if not with SFML?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #2 on: December 19, 2012, 07:19:34 pm »
When I start NEAT_Visualizer.exe, the screen remains black.
Unfortunately I can confirm this. The rendering of the images from ui/ and transition/ don't work.
The rendering of the tiles and the robots work fine though, but I can't see the items and can only guess from the screenshots which is placed where.

Maybe some problem with ATI graphic cards?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #3 on: December 19, 2012, 08:01:56 pm »
A couple of people reported this issue. I only used SFML's text rendering, the rest I did manually in OpenGL. Perhaps it has something to do with the title textures not being a power of 2. However, all the UI stuff is a power of 2, which is sort of strange.

I uploaded a new version with this modification and some other potential fixes.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #4 on: December 19, 2012, 08:31:05 pm »
Perhaps it has something to do with the title textures not being a power of 2. However, all the UI stuff is a power of 2, which is sort of strange.
That was an issue with old graphic cards, but shouldn't be a problem nowadays. ;)

I uploaded a new version with this modification and some other potential fixes.
Okay now the intro (and I guess the outro) appear fine, but the items still don't show.

I wonder though, why have saved all the images rotated? ???
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #5 on: December 19, 2012, 08:32:47 pm »
Okay now the intro (and I guess the outro) appear fine, but the items still don't show.
Same here. I can see the menu, but in-game, only 9 pixels are not black.

There is probably a bug in your OpenGL rendering... Wouldn't have happened with SFML :P
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #6 on: December 19, 2012, 09:08:18 pm »
I have no problem playing it on linux through wine (intel graphics card).
TGUI: C++ SFML GUI

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #7 on: December 19, 2012, 09:33:22 pm »
I think I figured it out. In newer versions of OpenGL, you can use glEnable/glDisable for OpenGL arrays. But in older ones you have to use glEnableClientState/glDisableClientState.

Try out the new version! Also, thank you for taking the time to help me debug my game!
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #8 on: December 19, 2012, 10:02:31 pm »
You get closer ;)

Now I can see the bar at the top with "Play" and 3 numbers, but the playing field remains black, apart from the 9 pixels.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #9 on: December 19, 2012, 10:09:36 pm »
Oops, I didn't change the code in all instances ::)

Thank you for your help!

EDIT: Should be fixed now!
« Last Edit: December 19, 2012, 10:13:36 pm by lolz123 »
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #10 on: December 19, 2012, 10:28:51 pm »
Yes, it works now. Cool gameplay :)
I played it through, apparently sometimes it's possible to succeed with fewer tiles than available.

I saw a tiny imperfection (you probably know it): In some levels, I already succeeded, and the hero walked to the right into a wall. Then his position is reset before the wall, he walks in again, and so on...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #11 on: December 19, 2012, 10:40:19 pm »
Yeah, the puzzles are mostly pretty obvious, mainly because there are only 3 items and I made all the levels in the last hour  :P. The last one can be done with 1 item.

Several bugs with the character physics actually only became noticeable when I transferred the controls of the character inputs over to the AI. Learning AI can learn to break your game! Originally, it somehow was able to wall jump to beat levels. That was fixed, but I didn't get around to fixing the wall hugging.

Again, thanks for testing out my game!
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #12 on: December 19, 2012, 11:45:44 pm »
Well the icons still don't appear over here, even with the latest release... :(

Not sure what caused it, but the AI was once able to beat the first level although I had placed the spikes on the floating platform. ;D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

downtimes

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #13 on: December 20, 2012, 01:38:33 am »
Quote
Not sure what caused it, but the AI was once able to beat the first level although I had placed the spikes on the floating platform. ;D

I can second that. The same thing happend to me. The AI used some kind of long jump and barely made it over the gap.
I then changed the spikes around a bit and after a while just placed them on the floating tile again. The second time the AI wasn't so smart. Bit confusing to have different behaviour every time, but learning AI simply does have that drawback ^^.

Nice game never the less. Some more levels would be appreciated!

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Ludum Dare 25 Entry - Hero Must Die
« Reply #14 on: December 20, 2012, 02:02:57 am »
I actually had that happen as well, but only after the competition deadline. It doesn't happen very often, because like you said, it barely makes it when it does. If I reduced the weight perturbation amount and increased the number of generations, it would happen more often.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.