Author Topic: DKCore Development Blog  (Read 21034 times)

0 Members and 2 Guests are viewing this topic.

WCopeland

  • Guest
DKCore Development Blog
« on: April 25, 2014, 08:47:21 pm »
Discovering Donkey-Me (see: https://donkeykongforum.net/index.php?topic=857.0) was very inspirational, as it proved a clone/remake of the DK engine could be written and then extended to produce an enjoyable experience.  After finding this project, I reached out to the author asking questions about whether or not it would ever be open-sourced or updated.  I never got a response.  As a result of that, over the past week I've taken on a new project which I've dubbed DKCore.

DKCore is my personal attempt to completely rewrite the Donkey Kong arcade engine in a modern multi-platform language: in this case JavaScript.  During my day job, I serve as a full-stack web applications developer, so it seems like a natural fit. Also, with recent software advances such as the advent of the Node.js framework and node-webkit, it's possible to now port JavaScript web applications as multi-platform desktop applications complete with OS-level APIs.  While my experience with js is vast, my experience with game programming itself is a bit limited.  Due to this contextual issue, I'm using Construct 2 to aid with rapid development.

Regardless of how far this project goes, whether it succeeds or dies, I know full well I won't be able to emulate the quirkiness of the arcade engine with a 100% level of accuracy -- however I'm hoping to at least reach 99%.  I am using pixel-by-pixel comparisons between MAME and my own algorithms to do this.

I already have Jumpman's movement mechanics emulated to near arcade-pure accuracy.  Normal jumps, straight jumps, and even back jumps (which Donkey-Me fails to include) all work.  Ladder mechanics work in a nearly arcade-pure fashion as well.  I also have barrel scoring working, regardless of jump type or barrel location/orientation. 

This project is completely open source with the latest code commit always on GitHub.  This means even if I discontinue at some point, another person can pick it right up. The DKCore repo can be found here: https://github.com/wescopeland/DKCore/

The end goal is to have a fully-functioning template to create DK-like games.  I have a bad habit of dropping projects shortly after picking them up, so this devlog is one way I can keep myself motivated.



« Last Edit: April 25, 2014, 09:05:01 pm by WCopeland »

Offline stella_blue

  • High Score Moderator
  • Spring Jumper
  • *
  • Posts: 1530
    • Awards
Re: DKCore Development Blog
« Reply #1 on: April 25, 2014, 09:09:00 pm »

Here's a similar project you may find interesting:

Out Run Enhanced Edition

I've been following its progress for the past 2 years.

DK High Score 
1,064,500
  (L22-1)
DK Level 1-1 
13,400
DK No Hammer 
535,300
  (L15-2)
Member for 11 Years Most Time Online DK 1M Point Scorer DK Killscreener Blogger Twitch Streamer

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #2 on: April 25, 2014, 09:10:13 pm »

Here's a similar project you may find interesting:

Out Run Enhanced Edition

I've been following its progress for the past 2 years.

That is awesome Kreygasm

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #3 on: April 26, 2014, 08:01:07 pm »
I've been working lately on barrel movement:



In the screenshot above, all mask visibility is enabled.  The green mask above the girders is the movement track for barrels.  The yellow mask above barrels in their "scorebox", or where Jumpman must pass through to gain points (eg -- passing through two scoreboxes before beginning a fall from a jump results in earning 300 points).

I've got a working score indicator on the top left ... this is solely for debugging and will be replaced with the arcade font in due time.

The screenshot shows a funny bug I encountered during development today where rather than telling barrels to roll down at ladders based on internal difficulty, I accidentally told them to fly up.

Offline JCHarrist

  • Spring Jumper
  • *
  • Posts: 643
    • Donkey Kong Forum
    • Awards
Re: DKCore Development Blog
« Reply #4 on: April 26, 2014, 09:01:29 pm »
Very cool Wes. Look forward to watching your progress with this.

Having DK ported to more modern programming languages could open up the door to a lot more "modders". Not many people left who can code in Z80 assembly.
Member for 11 Years DKF Founder Former CK World Record Holder - Arcade CK Killscreener DK Killscreener

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: DKCore Development Blog
« Reply #5 on: April 27, 2014, 12:03:03 am »
Exactly what Jeff said. You're a pioneer, Wes!

So, how much are you using the commentary of the code that people already posted to figure things out (a priori), and how much are you just figuring out via experimentation (a posteriori)?
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #6 on: April 27, 2014, 10:23:11 am »
Exactly what Jeff said. You're a pioneer, Wes!

So, how much are you using the commentary of the code that people already posted to figure things out (a priori), and how much are you just figuring out via experimentation (a posteriori)?

I'm using pretty much everything we already know, such as:
http://donhodges.com/Controlling_the_barrels_in_Donkey_Kong.htm
http://www.jeffsromhack.com/products/donkeykong_tech.htm

This is all pretty easy in modern expressive languages.  It's not a hassle to generate random numbers, or calculate odds like "do this 1 in 4 times" like it can be with assembly.

If there are any other resources you know of that would be helpful please let me know.  Most of the basic stuff I linked to will be pretty easy to replicate.  I'm particularly worried about the wild edge cases that happen once on a blue moon.

I'm most interested in any commented code available about flame/firefox logic. I think that will be the most difficult by far to get working correctly, and I plan on doing it last.

edit: Well, that was fast.  The current state of barrel movement (excuse the speed of the GIF):

« Last Edit: April 27, 2014, 12:15:31 pm by WCopeland »

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #7 on: April 28, 2014, 08:43:19 pm »
Barrels will now leave the screen if they are rolling on a girder beneath you. Life indicator also added (with the same quirk as the arcade version in showing a bonus life after a death), and there's also an oil drum thing on the bottom left.

Notice that barrels are no longer automatically going down every ladder they encounter.  This is because internal difficulty has been added to the engine. Barrels now respond both to the 1/4 always go down ladder variable and barrel control based on internal difficulty.

« Last Edit: April 28, 2014, 08:46:11 pm by WCopeland »

Offline stella_blue

  • High Score Moderator
  • Spring Jumper
  • *
  • Posts: 1530
    • Awards
Re: DKCore Development Blog
« Reply #8 on: April 28, 2014, 09:11:32 pm »

Looking good, Wes!

DK High Score 
1,064,500
  (L22-1)
DK Level 1-1 
13,400
DK No Hammer 
535,300
  (L15-2)
Member for 11 Years Most Time Online DK 1M Point Scorer DK Killscreener Blogger Twitch Streamer

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: DKCore Development Blog
« Reply #9 on: April 28, 2014, 09:23:57 pm »
If there are any other resources you know of that would be helpful please let me know.  Most of the basic stuff I linked to will be pretty easy to replicate.  I'm particularly worried about the wild edge cases that happen once on a blue moon.

I had Dean explain, on stream, two of the more "edge cases" of the code that I knew of (but didn't know as much as Dean about), so that it'll help you in the future when you get to including them in your port. You can hear what he had to say starting at 2:47:50 into this broadcast: http://www.twitch.tv/up2ng/b/523825178
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #10 on: April 29, 2014, 05:18:59 pm »
I've opened tickets on the repo for some of the things Dean pointed out :)

Today I've mostly been working on wild barrel logic.  While I initially thought this was going to be a complete nightmare, if I shoot for 95% pure emulation rather than 100% this becomes way more realistic.



Timings for basically everything are going to be off until I add the in-game timer feature to compare them back to MAME with.

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #11 on: May 01, 2014, 09:11:06 pm »
Starting to look more and more like DK:



Notice level and score indicators are now in place.

Logic for the first wild blue barrel on every board in the game is now also implemented.

What's left for barrel boards:
  • Hammers
  • Normal wild barrel logic
  • Flames
  • Timer
  • Logic for finishing the level
  • Wall jump logic
  • Barrel emitter
« Last Edit: May 01, 2014, 09:14:01 pm by WCopeland »

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 835
  • wht u mean
    • Awards
Re: DKCore Development Blog
« Reply #12 on: May 02, 2014, 10:07:32 am »
Love it  <Allen>
Member for 11 Years IGBY 2016 DKF Team Member Winner of a community event Former DK Remix World Record Holder DK Remix Killscreener IGBY 2015 DKF Team Member DK 1M Point Scorer IGBY 2014 DKF Team Member Blogger DK Killscreener Twitch Streamer

WCopeland

  • Guest
Re: DKCore Development Blog
« Reply #13 on: May 07, 2014, 10:44:53 am »
Ok, I've got a small status update.

First I'd like to point out that DKCore itself is not a playable game... it's just an engine modeled after Donkey Kong.  I've been working on a proof-of-concept project built with DKCore called Chibi Kong.



Chibi Kong uses the DKCore engine, but is also emulating Gameboy hardware (resolution, sound, and palette). I'll be talking more about this one later.
« Last Edit: May 07, 2014, 12:17:35 pm by WCopeland »

Online johnbart

  • Senior Member
  • *
  • Posts: 232
    • Awards
Re: DKCore Development Blog
« Reply #14 on: May 07, 2014, 11:30:09 am »
I love what you're doing with this.  It's a neat approach to replicate the logic instead of trying to emulate the underlying hardware.  I'm excited to see how close you can get.

-j
Member for 11 Years CAGTournaments.com Founder Blogger Twitch Streamer