The Dink Network

YeOldeDink 0.1: A Freedink Fork

November 8th, 11:57 PM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
This is a fork of Ghostknight's repo with a few extra features added, intended for developers and those who want to understand the engine better. After Ghostknight went to the effort to update the logging mechanism, I felt it was wasted on the existing debug interface so I made my own with Dear Imgui.

Improvements are as follows:
A completely updated debug interface with a visible log and the ability for people to make their own additions,
Improved PNG support without having to do any filename rejigging or sprite resizing,
Turned off some of the annoying mouse capture options,
The OpenGL renderer is inaccessible in favour of the "software" renderer,
get_client_fork() is implemented as per Seth's recommendation and returns 3

Pitfalls and gotchas:
8-bit mode won't work at all,
The editor won't build and will throw linker errors because I didn't do the makefile properly,
The executable it outputs is still called "freedink" so don't do "make install" unless you want to overwrite,
No Windows release unless someone really wants one,
the tile surface isn't cleared upon the screen reloading meaning transparent tiles will overlay upon the previous screen's tiles like in the screenshot,

Screenshot 1
Screenshot 2

All the relevant widgets are exposed in debug_imgui.cpp in case you want to add your own features. My dev platform is macOS, but I also gave it some minor testing on Ubuntu, which worked fine. Compilation should be the usual "./bootstrap", "./configure", and "make" sequence. You may have to run "make distclean" or something if it doesn't build, I don't know. Archive here, apologies for no git.
November 9th, 08:42 AM
pq_cthunik.gif
GOKUSSJ6
Peasant Male Poland steam
Everyone should get a pizza for free in each week. 
Dang, amazing job with this. Is there any plans in expanding it further, as well as switch from old and janky autoconf into CMake?
November 9th, 12:10 PM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
This seems quite amazing!

I would be interested in windows release, since I'm mainly a windows user. I imagine RobJ would be too, but perhaps I shouldn't speak on his behalf haha.
November 9th, 09:24 PM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
Gokussj: I looked into moving the build system to Meson, but the whole transition process from Autotools would be above my current skill level and inclination. Ideally, i'd want to remove the Gnulib integration at the same time, but that's probably its own nightmare so I'm hesitant for the time being.

I did also look into making a thing for rebinding the joystick buttons but haven't fully implemented it yet. The keyboard keys are pretty much hard-coded so I wouldn't want to touch those at this stage.

drone: I did manage to get an MSYS2 Mingw64 Windows build finished that I'll upload soon. Unfortunately, for whatever reason, the "software" renderer looks terrible on Windows compared to macOS and GNU/Linux, and the build crashes upon exit despite not doing so on any other system. I couldn't get a proper debugging environment set up on there to figure out what was wrong so I won't be able to diagnose Windows-specific issues if any arise. GCC on MSYS2 (and perhaps Arch) appears to have some quirks that don't present themselves elsewhere.
November 10th, 02:37 AM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
Btw, one debug window suggestion I would have for future improvements, would be to have a list of the currently active scripts on screen. I imagine that would be very useful for dmod debugging.
November 10th, 05:46 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
Windows build. Somehow I managed to get it so that Imgui looks as it does on other systems, but sound effects stutter terribly, and it still crashes upon exit. I also had to include a lot of dlls, so it's best if you unzip it to its own location and run it on the command line or perhaps with Martridge if it supports arbitrary paths and --refdir. Be warned!

I put an active script counter in the "ultimate cheat" window for this build, and will attempt an x64 AppImage and new source tarball in a bit.

Other potential additions at the moment include the ability to turn off those pink squares, as well as improve the DinkC Console window so it has basic command history and a submit button, and also flesh out the ultimate cheat window a bit more.
November 10th, 01:59 PM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
Wow! You actually did it that fast?!

I got it to run by either copying the "dink" folder inside, or launching it with Martridge... Weird thing is, if i launch it normally without any command line parameters, it goes fullscreen and i can't click on anything, but if i launch the base dink game with Matridge it works fine even without debug mode enabled...

Martridge config example screenshot
PS: Ignore the duplicate dmods in matrtridge it seems to be a bug that i thought i fixed but uh, apparently i didn't in the version i launched?

The custom arguments option came in handy

Unfortunately, most dmods don't seem to render the menu / title screen correctly at all for me...
This is what happens if i launch Charlie's Legacy for example: screenshot

FB2 launches the menu correctly, but if i load anything, it seems none of the tiles get drawn:
screenshot of the menu
screenshot of the game
November 10th, 07:12 PM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
The Dear Imgui syntax is very straightforward meaning scrip names are almost finished too. It looks like you forgot the -t flag. I haven't stubbed out 8-bit mode yet so it's still required for the time being. I also don't recommend launching in full-screen mode as it occasionally has performance issues that don't present themselves when starting windowed and then maximising.
November 11th, 12:58 AM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
Oh! You are correct! That was it!

Edit: Oh, I found out why I couldn't click things fullscreen. It seems, due to the aspect ratio being different, the cursor positions get fugged. I think without the -t flag the cursor image wasn't rendering. The windows cursor position that interacts with the Dear Imgui elements is in one place, and the in-game cursor is in a different place. When you keep it in windowed mode at 4:3 it's fine.

But this is so weird... It probably has to do with how freedink itself handles cursor tracking... When i move the winodws cursor way to the right, the in-game cursor gets clamped to the right. You'd expect it to move left immediately as i move left, but no, I have to move the cursor about halfway on the screen until the in-game cursor starts moving left!

Edit2: I found a bug you might be interested in. If i put some Dear Imgui window behind the "Debug mode enabled" info overlay, and accidentally click on the overlay, it goes on top over the window and i can't click the window at all anymore. It seems it resolves itself if i toggle debug mode on and off though.

PS: I had another suggestion i forgot to mention, a hardness view toggle would probably be useful too. Something like alt-h, toggling drawing the hardness like in the editor.
November 11th, 02:26 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
>how freedink itself handles cursor tracking

Yeah, the engine uses relative mouse positioning for mouse mode which I've messed around with, but I tend to use the keyboard or joystick there due to it being in use for roughly 3 seconds, after which you're using the keyboard or joystick anyway. Unless someone really wants to make a sequel to Agathain Sea Traders or Dink Mines using this, I won't change anything.

>i can't click the window at all anymore

The transparent info window can have its position changed to other corners of the screen by right-clicking it. In a worst-case scenario, you may have to edit imgui.ini manually with new screen coordinates.

>a hardness view toggle

Done! Will be in an upcoming release.
November 11th, 03:32 AM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
>Done! Will be in an upcoming release.
Man, you work fast! How do we vote you into taking over the official freedink repo, lmao.

Yeoldetoast and Ghostknight, you two are the real Freedink MVPs this year!
November 11th, 03:52 AM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
wait, yeah, why arent you
November 17th, 08:32 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
At that point I may as well learn French fluently and take over Beuc's entire life

The next release may be a little while. Things are changing rapidly.
November 20th, 02:51 PM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
I like what I'm seeing
November 22nd, 08:42 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
0.2 update:
In addition to the aforementioned:
- Got rid of some windows and moved things into the menu bar
- 8-bit mode is now inaccessible
- Added sprite, variable, and script info viewers
- Moved the DinkC console into the floating info window and the log
- Added the option to pause while the console is active, and also display a warning
- The game itself is now viewable in a separate window (yo dawg)
- The main renderer can now be switched off too, along with the pink squares and some other things
- Expanded "Ultimate Cheat" and the log window a bit more
- Added a "map viewer" window indicating which screen you're on
- Added quick save/load (slot 1337)

Archive, plus Windows build. I also took the hint and looked at that FB2 map bug but it's out of my depth, unfortunately.
November 27th, 09:10 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
Coming in 0.3:

- Added sysinfo window
- Expanded audio control window
- added a slow mode
- added controller rumble when hurt
- pressing Tab increases speed only in normal mode
- Added a speed menu to debug mode
- Added "play_mod_order(int order)" to DinkC allowing basic tracker module control. Requires SDL Mixer 2.6 and up.
- SoundFonts also seem to work now, at least on macOS.

I've also turned my interest to YeoldeDinkEdit, or Yedit for short, which will have the same sort of interface, as well as PNG support. So far I have managed to squash a few bugs relating to being unable to place sprites or tiles properly if you should happen to create your own MAP.DAT from scratch(er) with an empty file. Will probably get a release when it has enough features. Please list your current FreeDinkEdit gripes below if you should have any.

Screenshot 1
Screenshot 2
November 28th, 04:07 PM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
I think a useful thing for a YeoldeDinkEdit, if possible, would be to (optionally) render adjacent screens so you can see how sprites align between screens. But that might be rather complicated to implement?... I don't suppose you can just call a screen rendering function to some canvas using just different screen ids, hah.
November 29th, 04:27 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
>I don't suppose you can just call a screen rendering function to some canvas using just different screen ids, hah.

It was the first thing I tried! Only to find out that the backend renderer is designed for loading/displaying one screen at a time . For certain stuff I'm using the temporary buffers for the screen transition, and I may be able to hack something together with the minimap preview thing if I can eventually figure it out. The FreeDinkEdit source is basically the original DinkEdit with various SDL replacements for DirectDraw meaning it's mostly still a mess of nested if-statements and occasional use of "goto".
November 30th, 11:55 AM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
Why not work with making a new version of the more versatile Windinkeditplus2 instead of the original DinkEdit?
November 30th, 03:30 PM
goblins.gif
drone1400
Peasant Male Romania
C# nerd 
@SlipDink
Oh, speaking of that, there is a slight hope that RW might release the source code for it. I managed to get in contact with him a few months ago but, he has to find it first, although he said he should still have it somewhere... Currently waiting for another reply.
November 30th, 07:03 PM
peasantmb.gif
yeoldetoast
Peasant Australia steam
I've come to get my meat 
>Why not work with making a new version of the more versatile Windinkeditplus2

1. As has been mentioned above, the source isn't available.
2. Even if it was, I wouldn't bother. The WDE source is a mess in other ways, mainly due to being Windows-only.
3. Beuc attempted a LinDinkEdit port years ago which never reached a functional state.
4. My general dislike of WDE is well-known.
5. The minor things holding back FDE that would make a big difference such as sprite property editing and default nohit etc should be straightforward to implement.