Donkey Kong Forum
Blogs => Player Blogs => Topic started by: WCopeland on April 25, 2014, 08:47:21 pm
-
Discovering Donkey-Me (see: https://donkeykongforum.net/index.php?topic=857.0 (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/ (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.
(http://i.imgur.com/de52sju.png)
(http://i.imgur.com/rFieomA.png)
-
Here's a similar project you may find interesting:
Out Run Enhanced Edition (https://github.com/djyt/cannonball/wiki/Cannonball-Manual)
I've been following its progress for the past 2 years.
-
Here's a similar project you may find interesting:
Out Run Enhanced Edition (https://github.com/djyt/cannonball/wiki/Cannonball-Manual)
I've been following its progress for the past 2 years.
That is awesome Kreygasm
-
I've been working lately on barrel movement:
(http://i.imgur.com/9IqNAYJ.gif)
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.
-
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.
-
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)?
-
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://donhodges.com/Controlling_the_barrels_in_Donkey_Kong.htm)
http://www.jeffsromhack.com/products/donkeykong_tech.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):
(http://i.imgur.com/x1pTnOK.gif)
-
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.
(http://i.imgur.com/s8FwPDd.gif)
-
Looking good, Wes!
-
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 (http://www.twitch.tv/up2ng/b/523825178)
-
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.
(http://i.imgur.com/ObTiSdf.gif)
Timings for basically everything are going to be off until I add the in-game timer feature to compare them back to MAME with.
-
Starting to look more and more like DK:
(http://i.imgur.com/NtvheSt.png)
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
-
Love it <Allen>
-
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.
(http://i.imgur.com/c1QEPQy.png)
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.
-
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
-
Hey, one thing to note (in case you either didn't know this already or forgot to add it) is that Jumpman being on the same x-axis as a ladder steers barrels as well. So, even if he is several levels below a ladder, if he is directly under it, it steers barrels as though he is sitting on it. It's hard to tell from the gifs if you've incorporated this element already, so I thought I'd mention it.
Also, I don't remember the details, but there is something special with the first barrel (or maybe it was a timer based thing that can affect all barrels until a certain amount of time) where the first barrel will always take the first ladders on each levels that it reaches. You'll have to ask around or look in some DK code threads to find out the precise way this works (maybe it is easy to find in the code).
-
Both points already implemented :)
-
Both points already implemented :)
Oh, you!...
-
Also, I don't remember the details, but there is something special with the first barrel (or maybe it was a timer based thing that can affect all barrels until a certain amount of time) where the first barrel will always take the first ladders on each levels that it reaches. You'll have to ask around or look in some DK code threads to find out the precise way this works (maybe it is easy to find in the code).
Yeah, at the beginning of the stage each rolling barrel will always descend the first ladder it encounters, if the oil barrel has not yet been ignited.
-
It has been a while since an update, but I've been very busy at work squashing bugs and adding new features to the engine.
(http://i.imgur.com/tmBERVw.png)
The following things are all now working:
- Timer - 100% Arcade Pure
- Wild Barrels - Extremely close to arcade pure, but they're using their own physics system that I've developed. I'm experimenting with having more than three types of wild barrels with this physics system. These new wild types could have interesting behaviors, including the ability to bounce off of each other using this aforementioned physics system.
- Starting Wilds - 100% Arcade Pure
- Hammers - 100% Arcade Pure
- Bomb Barrels - Very close to arcade pure. I still need to code in the bug that allows bombs to turn into wilds, but I'm not expecting difficulty here.
- Kong Barrel Emissions - This is the logic that has Donkey Kong producing barrels to kill Jumpman. This includes determining if barrels should be blue, wild, bombs, or if there should be a pause. The arcade game uses an overcomplicated barrel seeding algorithm to do this. My algorithm works very differently, but the final output itself is so close to the arcade game I doubt anyone will realistically be able to tell the difference.
I am getting very close to being done with all barrel board logic. All that's left are the things I've mentioned and flame logic (which will be a monster to implement). After that I'll start moving on to the other boards. I've also been jotting down notes of options I'd like to implement into the proof-of-concept, such as:
- Built-in pace calculator
- Different game modes, such as arcade/marathon/no-hammer/wild barrel, each with its own unique HSL
- Track causes of death and show them on game end
- Some sort of beginner and advanced tutorial system demonstrating game mechanics to newbies
- Achievements
Since this is a web application (the screenshot above is actually running in Firefox), I can store a lot of these things into a SQL database...
-
love it <Allen> well done sir!
-
Not even Helen of Troy tried to understand flame logic Kreygasm
good stuff Wes!
-
i am looking for a DKCORE download link that have been working. Please someone can help me?
-
i am looking for a DKCORE download link that have been working. Please someone can help me?
Sorry, this project is on hold indefinitely :(
-
Sorry, this project is on hold indefinitely :(
what you mean
-
but someone has a DK script level one for use in the Construct 2 ? I'm trying to create a game using only the engine of the first level of DK platform game with barrels, but it would be for use with own characters. Someone in the group would or could indicate a link or something to help me. thanks !!
-
Hi Wes. Looks like great work and I was interested in looking into the code, but the github link gives a 404 error. Any ideas?
*edit : Never mind, I read page two now and see you've put the project on hold, which is fair enough. Any plans to make the code available again?