Creating A Text-Based Graphics Engine in C++ from Scratch in ReactOS

  Рет қаралды 18,933

Mashpoe

Mashpoe

Күн бұрын

Creating A Text-Based Graphics Engine in C++ from Scratch in ReactOS
Installing a dark theme: bit.ly/2UeZWfP
Line drawing algorithm: bit.ly/2XcOOSu
Source code: bit.ly/2V0BpQb

Пікірлер: 22
@sshado2
@sshado2 5 жыл бұрын
This is great and amazingly well captured and explained without using too many words. Nice job.
@TheKhakPakflyest
@TheKhakPakflyest 4 жыл бұрын
Have you ever thought about doing that 3D Text-based game idea? Those are so dope. Great video though!
@dariusduesentrieb
@dariusduesentrieb 5 жыл бұрын
How stable was ReactOS during development? (How often did it crash/freeze)
@Mashpoe
@Mashpoe 5 жыл бұрын
It only froze once, and that was because I made a program that loops with no exit condition. It's certainly not stable enough to completely replace windows, but you can get most things to work with some effort!
@illen9942
@illen9942 5 жыл бұрын
@@ExceedingRectified Unfortunately ReactOS' resource management isn't quite good yet, it oftenly happens even with normal priority. Lowering the process priority to lowest setting possible is a workaround for that, and actually tends to improve the performance of the process and system itself.
@Mashpoe
@Mashpoe 5 жыл бұрын
@@ExceedingRectified It froze when I tried to close the program, not while the loop was actually running. My guess is that the OS froze because my program was making a large number of api calls while being closed. It didn't always happen, but when it did freeze I was rendering content very quickly in a while loop. Considering all the stuff I did, ReactOS was performing very well compared to earlier versions.
@MatheusAugustoGames
@MatheusAugustoGames 3 жыл бұрын
Programmers have light mode since light attracts bugs.
@dropfish3109
@dropfish3109 2 жыл бұрын
And you’ll have less bugs if you’re in dark mode. They are actively trying to sabotage you.
@Xonasa1
@Xonasa1 5 жыл бұрын
Did you try to set the compatibility layer to Vista for the Git Setup.exe?
@magmachicken4402
@magmachicken4402 2 жыл бұрын
You inspired me, thank you
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
sir i did the same thing but when my texture touch each other they flicker very much does not effect fps but looks wired
@TheCobaltKnight27
@TheCobaltKnight27 2 жыл бұрын
You should do another video on reactos. They need the publicity.
@superarcherg5320
@superarcherg5320 2 жыл бұрын
I'd love to see a follow up :/ Great job though!
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
i want to know how to add trancepry effect because i loded text files as my textures please /_\ help me out
@Mashpoe
@Mashpoe 2 жыл бұрын
If you're doing this with the code I wrote, just create a texture object, load from a file, and set transparency to Game::TRANSPARENT_BG like so: Game::Texture tex; tex.load("example.txt"); tex.setTransparency(Game::TRANSPARENT_BG); You can also change the color of the foreground: tex.setColor(Game::FG_LIGHT_YELLOW); If you want more example code, check out the demo I made at github.com/Mashpoe/ReactOS-Game/. There are some good code examples in GameState.cpp. The default background character is space, so it will treat spaces as transparent pixels. You can change which character is ignored with the setBackground() method: // now the character 'A' will be ignored and treated as a transparent background tex.setBackground('A');
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
@@Mashpoe sir thats not what i meant making it from scrath in c++ please help me out i know you got the sol the thing is i made an whole cool graphics engine like yours has everything in ascii but i messed up and want to create transparent effect like and im not using any engine and i also want to know that how can i want to load tile set method for my textures for my game engine it will help me a lot or you can try to share your transparent code and the load tile set code it will not only help me but others too here an like and subcribe
@Mashpoe
@Mashpoe 2 жыл бұрын
@@FrostGamingHype This file in my GitHub project shows how I use the tileset functionality and the transparency effect: github.com/Mashpoe/Windows-Console-Game-Library/blob/master/Texture.cpp. The functionality for both of these features is implemented in the function Texture::render(). The tileset clipping uses a Rect struct to determine the clipping boundary. Here is the code for the Rect struct: github.com/Mashpoe/Windows-Console-Game-Library/blob/master/Rect.hpp. Rect objects store x, y, w, and h values to define a rectangle at the position (x, y) with the width (w) and the height (h). The Rect parameter for the function Texture::render() determines which characters from the tileset to render. Any characters that are within the bounds of the Rect are drawn (except for the transparent ones). You have to make sure the Rect fits within the bounds of the tileset Texture though. My program automatically clips the Rect to make sure it fits within the tileset Texture's boundary. All you have to do for transparency is pick a character to ignore (e.g. space) and just write code that skips that character when rendering a texture. In order for the transparency effect to work, you have to render the object with the transparent background after you render whatever you want behind it. All of the code for my graphics library can be viewed from the GitHub repo: github.com/Mashpoe/Windows-Console-Game-Library.
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
​@@Mashpoe thanks sir sorry for commenting but i done want your whole code because if i copy 1 thing so i will have to copy the whole code which i dont want to do since its just copying an game engine so i rather how to make it i just wanted 1 function can you comment me your texture load function by copying it because its your code not mine i dont know what your doing with functions so can you paste the tile set texture code right here i may have builded 2 game engine in 1 year but your game engine is good thats why i was building an 3rd one also because my game engine is pretty done so please if you want to write the sol please do and if not soo its your will so all i wanted to say that can you tell by writting the code
@Mashpoe
@Mashpoe 2 жыл бұрын
You don't have to copy my code, but you can read it and try to understand it so you can add the same features to your own code. Being able to read and understand other people's code is a very important skill to learn, and my console library is relatively simple and there are some useful comments in the code that are there to help you understand how it all works. I think most of the code you need is in the files Texture.hpp and Texture.cpp. The code for loading the textures is in the function Texture::load() and the code for drawing textures with transparency and tileset clips in the function Texture::render(). I'm not telling you to copy my code, but instead to try and understand how it works by reading it. My previous comment explains a little bit about how the render function works, but I can't explain every line of code to you or write your program for you. The simplest way to understand the code is to read it. Try looking through the files and through the different functions to see what's going on. I hope this helps. That's about all I can do for you. Good luck on your game engine!
@d4ny3l23
@d4ny3l23 4 жыл бұрын
tutorial!!!
I'm Coding an Entire Physics Engine from Scratch
9:19
Gonkee
Рет қаралды 1,6 МЛН
CAN YOU HELP ME? (ROAD TO 100 MLN!) #shorts
00:26
PANDA BOI
Рет қаралды 35 МЛН
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 22 МЛН
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 123 МЛН
Non-Euclidean Worlds Engine
5:15
CodeParade
Рет қаралды 11 МЛН
Making a Game With C++ and SDL2
8:14
PolyMars
Рет қаралды 1,6 МЛН
4D Miner Devlog #1: New Lighting and World Generation!
9:19
Mashpoe
Рет қаралды 110 М.
Let's Program Doom - Part 1
25:13
3DSage
Рет қаралды 390 М.
Fixing the Alphabet
7:25
Mashpoe
Рет қаралды 1 МЛН
How we fit an NES game into 40 Kilobytes
12:04
Morphcat Games
Рет қаралды 3,5 МЛН
Hacking Websites with SQL Injection - Computerphile
8:59
Computerphile
Рет қаралды 2,4 МЛН
How the C++ Linker Works
15:52
The Cherno
Рет қаралды 603 М.
⌨️ Сколько всего у меня клавиатур? #обзор
0:41
Гранатка — про VR и девайсы
Рет қаралды 643 М.
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
IPad Pro fix screen
1:01
Tamar DB (mt)
Рет қаралды 7 МЛН