Skip to content

Files to make ZinjaI functional with the Conio2 library

Notifications You must be signed in to change notification settings

cesarl94/Conio2ForZinjaI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conio2 for ZinjaI

All the setup needed to use Conio2 in C++ with ZinjaI. With this library, you can choose coordinates where to write and with what colors in the console, as well as the option to detect keyboard inputs, to make retro games. Or achieve results like these:

"Arkanoid Game" "Sopa de Letras game"


Compatible with version 20191006 of ZinjaI.
"ZinjaI Version"
Click on the image or here to go to the official page to download ZinjaI.

Instructions

Download the .zip file from "Releases" section and unzip it into the ZinjaI installation folder (which is usually C:\Program Files (x86)\ZinjaI), replacing the files if necessary. (The contents of that zip are the same as the contents of this repository, excluding the information from this README.md file)

The ZinjaI folder should look like this:
"ZinjaI Folder"

To use the library, simply create a new project and choose the Conio2 template, or just add #include <conio2.h> at the beginning of your C++ project header.

"Creating Simple Program" "Conio2 template"

And now you can start programming your retro games. Copy and paste the following code block to test that Conio2 is indeed working:

#include <iostream>
#include <conio2.h>
using namespace std;

int main(int argc, char *argv[]) {
	textcolor(LIGHTGREEN);
	gotoxy(20, 5);
	cout<<"Hello World";
	return 0;
}

And this is what we should expect as a result:

"Hello World"

Documentation

The documentation for Conio2 is available in the file conio.chm, located in the root of the project
"Conio2 Documentation"

Possible issues

Error creating process:

"Error creating process"

If this happens, ZinjaI itself might not be working for you when running any program, with or without Conio2. The solution can be found at the following link, but proceed at your own risk:

https://sourceforge.net/p/zinjai/discussion/errores_es/thread/9d7aa2c5/

In this discussion forum, you'll find the answer to the problem from ZinjaI's creator, Zaskar, who explains that some antivirus programs (including Windows Defender) might flag the compiler as suspicious and automatically delete the .exe files generated by ZinjaI. The solution is to add an exclusion for the antivirus.

In my case, I accessed Windows Defender and found that it was convinced this was a Trojan: Windows Defender "Threat"(Yes, my OS is in Spanish)

If you look closely, you can see that the path to the "infected file" is precisely the folder where ZinjaI creates the .exe before running it, in other words, the program we just created, and whose code could be as simple as a Hello World.

The following link explains how to add an exclusion in Windows Defender, where you'll need to add the path to the temp folder. For example, in my case, it's C:\Users\Pc\zinjai\tmp

https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26

Add Windows Defender Exclusions

Credits

ZinjaI:

Conio2:

Contact

If you have any questions, feel free to reach out to me. My contact data is in LinkTree. César Lorenzon, Game Developer.

About

Files to make ZinjaI functional with the Conio2 library

Topics

Resources

Stars

Watchers

Forks

Languages