Comments (9)
Hi, thanks for reporting this issue.
The lag from lasers is because I used a generalized separating axis test for lasers, since they are modelled by an oriented bounding box (OBB). This implementation is optimized for complex polygons, which is overkill for this case since the hit test between the player and a laser is a simple AABB/OBB collision test. I'll probably replace it with a more efficient implementation.
from twinject.
Makes sense. Another note, newer versions past 1.2.108 can't seem to boot TH10. Tried both patched and unpatched, even tried to manually build it and it could not open it.
from twinject.
Hmmm... I'm assuming 1.2.112 didn't work either? I didn't change much between 1.2.108 and 1.2.112 except retargeting to v142. If you said you could manually build it then this probably isn't the problem.
One major change in 1.3 is that I rewrote the injector from scratch, which is likely to be the cause of the issue. The injector now needs a configuration file called twinject.toml instead of twinject.ini in the same directory as twinject.exe.
I don't think I updated the deploy script to add the TOML file to the release (or the documentation), so this is probably the problem. It's supposed to print an error when it can't find the file though, so it's weird that it failed silently.
from twinject.
I had gone from the topmost updated version and worked my way down. I had tested each with the specified components on the page. 1.3 would inject HOWEVER TH10 would immediately crash because of the injection. 1.3.1 would not launch whatsoever. Then each below those until I got to 1.2.108 would launch and open the game only to immediately close.
from twinject.
Interesting. Since the only thing that changed is the platform toolset and target version, my primary suspicion is that something to do with that broke MS Detours. The version included in this repo has been around since its conception, and doesn't actually support Windows 10 officially. Could you tell me the version of Windows you are using? I've verified that the injection works properly with version 1.3.1 on Windows 10 1809.
from twinject.
I'm on Windows 10 Enterprise LTSC Version: 1809
Also sorry for late reply. I don't have notifications for GitHub enabled.
from twinject.
No worries, this reply wasn't very quick either ¯_(ツ)_/¯
I also happen to be using Windows 10 Enterprise LTSC 1809, which rules that out as the cause. I'm currently working on a build with updated libraries and more detailed crash information which may help.
from twinject.
Maybe catch any error that occurs before the program crashes and log it into a message box or text document?
Also just a suggestion but why not build an updater? I built a way to update files by URL like this:
// I'm just pulling all the includes I used for this program but I'm sure you could sort through them if you wanted to.
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <array>
#include <Windows.h>
#include <vector>
#include <Urlmon.h>
#include <stdio.h>
#include <tchar.h>
#include <wininet.h>
#include <TlHelp32.h>
#pragma comment(lib, "urlmon.lib")
wstring S2WS(const string& str) {
int length;
int slength = (int)str.length() + 1;
length = MultiByteToWideChar(CP_ACP, 0, str.c_str(), slength, 0, 0);
wchar_t* buffer = new wchar_t[length];
MultiByteToWideChar(CP_ACP, 0, str.c_str(), slength, buffer, length);
wstring out(buffer);
delete[] buffer;
return out;
}
// File Downloader
int download(string url) {
wstring wUrl = S2WS(url);
LPCWSTR lUrl = wUrl.c_str();
TCHAR path[MAX_PATH];
GetCurrentDirectory(MAX_PATH, path);
wcscat_s(path, L"\\dl.txt");
HRESULT response = URLDownloadToFile(NULL, lUrl, path, 0, NULL);
return 0;
}
I had this string->wstring converter since I was getting errors otherwise and URLDownloadToFile required a certain set of types making it obnoxious to use but this was as much as I had gotten. You can use it like such: download("https://www.w3.org/TR/PNG/iso_8859-1.txt");
All you'd need to do really is just change the download format to the zip file (for someone to extract or maybe find someplace it can be directly accessed unzipped?). The URL just needs to be a direct link to a file source. This allows it to work properly. Sending it to a site will attempt to download the current page if the page is served directly, meaning it can't be something like a site that hosts a download on a page and sends the file via request.
Also this took me around an hour to get properly working. It was a pain in the ass.
from twinject.
Cool idea, thanks for taking the time to write up that concept code. I'll probably consider adding an updater, since it seems like a neat idea (after sorting out the crashes, of course). I've been quite busy irl lately so I've put this project on the backburner, but I'm always willing to review pull requests or answer questions about the project.
from twinject.
Related Issues (20)
- Command processor does not suppress enter key HOT 1
- th11: DirectInputDevice8 handles are invalid and cannot be used HOT 1
- Adapt twinject to other games HOT 6
- Move IMGUI renderer to separate window
- Implement virtual collision testing system
- Overhaul collision testing system
- AI is not working HOT 3
- TH15 EXCEPTION_ACCESS_VIOLATION HOT 1
- Replace all usages of Win32 API with WIL
- Modify documentation to reflect configuration changes to TOML
- Modify documentation to require recursive clone of submodules
- Implement universal loader and TOML configuration
- Move hardcoded dimensions in twinhook to TOML configuration
- Replace macro logging framework with spdlog
- Feature to hide overlay / extra windows? HOT 1
- Does not work on Windows 7 due to XINPUT_1.4.DLL dependency HOT 1
- Using `twinject` to tweak bullet and player movement speed? HOT 6
- support for th16,17,18
- Keys do not work; Z, X and C are all active in the GUI HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twinject.