Nidhogg for the Arduboy

Hi, I want to show a little techdemo I made a couple of months ago. It’s a “port” of the game Nidhogg. I’ve done it with very small programming knowledge. The sprites where converted one by one (because I didn’t know how to access the game files :sweat_smile:). It has no AI, hitboxes or enemies. It just shows a controllable character that can walk, crouch and idle. I also tried to experiment with the sword placement, so if you press B, a small sword shows up. Maybe someone could make something real out of it.

Ardhogg.hex (39.9 KB)

1 Like

I suggest you add a LICENSE file to your repository, so people can know what they are allowed to do with your code.

2 Likes

I’ve edited the .hex into the post so the emulator runs it and allowed the GitHub link to become a ‘onebox’ so it’s more obvious.

As your program evolves, you’ll have to manually replace the .hex yourself.

(Also for some reason you were using graves instead of apostrophes, so I swapped those out.)

Ok thanks. Is it normal that the emulator runs twice the speed as the regular handheld? Its much slower on my hardware

1 Like

That might be because you’re calling arduboy.diplay() on every loop() iteration.

Instead of doing

void loop() {
  if (arduboy.nextFrame()) {
    // Loads of code
  }
  
  arduboy.display();
}

You probably need to do:

void loop() {
  if (arduboy.nextFrame()) {
    // Loads of code
  
    arduboy.display();
  }
}

But doing:

void loop()
{
  if (!arduboy.nextFrame())
    return;

  // Loads of code
  
  arduboy.display();
}

Would probably be better.

3 Likes