olcPixelGameEngine

  Рет қаралды 165,452

javidx9

javidx9

Күн бұрын

Пікірлер: 465
@javidx9
@javidx9 6 жыл бұрын
A massive thanks to members of the OLC Discord community who put up with my requests for testers, in particular big shout outs to Eremiell, Slavka & Dragoneye for Linux trials and suggestions.
@javidx9
@javidx9 6 жыл бұрын
MaGetzUb feeds me music and style XD
@sakuhoa
@sakuhoa 6 жыл бұрын
maybe you can let olcConsoleGameEngine as a repo, so there will be a wiki of it
@guzman-do
@guzman-do 3 жыл бұрын
Found your channel yesterday... Thank God KZbin recommended it... I was praying for a channel like this for a long time 🌟🌟🌟🌟🌟
@inhaledeath3899
@inhaledeath3899 6 жыл бұрын
I just recently discovered your channel. Something completely off the rest of programming channels on KZbin. It's relaxing, educating calming, to watch you speak. All the best for you and your channel.
@javidx9
@javidx9 6 жыл бұрын
Hey thanks Inhale Death(!) I just try to keep it focused and clear, I dont like watching tutorials where there is loads of extra stuff going on, and so if I dont like it, why should I expect anyone else to? Cheers buddy!
@241lolololol
@241lolololol 6 жыл бұрын
As a primarily Computer Science student, I am so grateful I found your channel so I can learn so much more than I currently am. Keep up the great work!
@javidx9
@javidx9 6 жыл бұрын
Micheal, comments like that make it so worth while so thank you very much!
@MaledictGaming
@MaledictGaming 6 жыл бұрын
I know the feels :(
@B2SProductions
@B2SProductions 4 жыл бұрын
Micheal i'm not trying to take you away from David. But I always watch this c++ plus there is chili who has tutorials on c++ Direct3d between the 2 you can become a c++ God here is his channel kzbin.info
@fckyo333ujhjjkrrrr
@fckyo333ujhjjkrrrr 6 жыл бұрын
Oh my god Javid. This is amazing. I love it
@javidx9
@javidx9 6 жыл бұрын
Thanks Dayyan! Code::Blocks compatible too! :P
@fckyo333ujhjjkrrrr
@fckyo333ujhjjkrrrr 6 жыл бұрын
javidx9 don’t spite me Javid or else! Smh
@FROZENbender
@FROZENbender 6 жыл бұрын
I love how the bitrate just shat itself at 11:45
@obinator9065
@obinator9065 5 жыл бұрын
KZbin Compression At Its Finest
@Sparkette
@Sparkette 4 жыл бұрын
@@obinator9065 You mean encryption? (/s)
@MxCrompli
@MxCrompli 4 жыл бұрын
@@Sparkette It's not encryption, it's compression KZbin has BILLIONS of 1080p and 4K videos on their platform. A 10 minute 1080p video is like 2 GB on it's own. Without their extreme compression they would have to have way over 1953125 TERABYTES worth of space just to store all these videos.
@bob_kazamakis
@bob_kazamakis 4 жыл бұрын
7.59-fm [Closed] for future reference, “/s” represents sarcasm
@MxCrompli
@MxCrompli 4 жыл бұрын
@@bob_kazamakis Glad i didn't get r/wooshed with r/ihavereddit replies flooding down my notifications
@robertboran6234
@robertboran6234 6 жыл бұрын
Fantastic. This is perfect for making small gridworlds for testing AI safety concepts. Your channel is paradise.
@javidx9
@javidx9 6 жыл бұрын
Hi Robert, I'm pleased you may find it applicable to something practical.
@seditt5146
@seditt5146 6 жыл бұрын
You wanna know a weird brain trick, When you fill the screen with Random pixels like that and move your mouse cursor over it, the mouse cursor vanishes. For the longest time I really believed it just went invisible until I realized my brain was just erasing it and I have found the oddest form of camo I have ever seen in my life.
@abdulahad200
@abdulahad200 6 жыл бұрын
Lel I always thought my windows was bugged
@TimeoutMegagameplays
@TimeoutMegagameplays 5 жыл бұрын
It's not your brain that's erasing it, it's KZbin video compression, it just blurs everything on the screen because the bitrate is not enough, it blurs so much the mouse disappears because of the compression trying to take info from other parts of the screen, take a search on it, it's actually very interesting system.
@JohnDavidDunlap
@JohnDavidDunlap 4 жыл бұрын
I can see the mouse if I focus on it but it disappears if I focus on the background. Edit: It's not a KZbin compression affect. I compiled this example program on my computer and the mouse still disappears if I focus my eyes on the background.
@laurinneff4304
@laurinneff4304 4 жыл бұрын
@@JohnDavidDunlap The same happened to me. I compiled it (in my case on Linux) and my cursor appeared to disappear when over the window
@JohnDavidDunlap
@JohnDavidDunlap 4 жыл бұрын
@@laurinneff4304 I compiled it on Linux too!
@chriswinslow
@chriswinslow 6 жыл бұрын
I’ve almost finished binge-watching all your videos as I’ve had today off work. I found your spline videos very interesting, I feel it has given me an even greater insight of what techniques my racing game will need when I'm ready to create it. I can now see why you’ve chosen the console screen as the output over a GUI, it allows you to really focus on the core logic of the program without getting entangled with the OS GUI as well. I also liked the sound synthesiser videos too, very clever. I also wanted to create a sim city style game but it will be more of a simulation of the world and not a game, without points, lives, continues etc. It will take real-world data. I was going to start making a racing game using a game engine like Unreal, Unity or Cryengine armed with only procedural programming knowledge courtesy of PHP and learning OOP over time, what a fool I now feel! I will make sure to get to grips with OOP and make a clone of pong then move to something harder like Tetris and move up the difficulty ladder over months and years while also messing around with accessing hardware as you did with the Command Line Webcam Video - “Gray scales is good enough? No, of course you want colour!” (made me laugh). It will take a while to re-create a game like Zelda - Breath of the wild, but I think I’m crazy enough to give it a go one day anyway over many many years and within a team. The only sad thing now is we all have to wait patiently for your next video release. I feel very privileged to have access to these highly educational videos you are producing. Thank you for your time and effort. Oh and please more vlogs in the car (if it is safe to do so!). Sorry posted this in the community section as well!
@javidx9
@javidx9 6 жыл бұрын
Hi Chris, I'm really pleased youve found something good in the videos, It makes it all worthwhile - I was thinking of doing a few more car vlogs (for old times sake :D) but I'll have to think of some interesting topics now I know people may actually watch them! Thanks again buddy!
@derekcope3803
@derekcope3803 6 жыл бұрын
Extremely well done!! Thank God for geniuses like you! I have a son who is teaching himself how to code, He turned me on to your channel. He likes you and "The Coding Train!! Liking and subscribing now!!!
@javidx9
@javidx9 6 жыл бұрын
lol thanks Derek, and to your son!
@imuny6579
@imuny6579 2 жыл бұрын
There's something so calming in Javid's voice that i sometimes play a hard to understand c++ video and place the phone under my pillow to fall asleep 😅😅
@cooperpilot8094
@cooperpilot8094 6 жыл бұрын
That full color hd Spyro level running in a console kind of blew my mind a bit.
@cooperpilot8094
@cooperpilot8094 4 жыл бұрын
@@rswa well, either way, it was still a journey seeing the whole 3d engine being programmed with just c++ tools and finally have a product that's pretty decent.
@cooperpilot8094
@cooperpilot8094 4 жыл бұрын
@@rswa The console can only draw text which takes a certain amount of time on top of whatever you are rendering. Pixels are much faster to draw because you don't need to have the ability to draw every character and so you can eliminate a lot of overhead.
@TheRealFaceyNeck
@TheRealFaceyNeck 6 жыл бұрын
Wish I would've found your channel years ago. Glad I found it eventually. Thanks for all your hard work and sharing it with the rest of us. :-)
@javidx9
@javidx9 6 жыл бұрын
Hey thanks Facey, I really appreciate your support!
@ExistenceV2
@ExistenceV2 5 жыл бұрын
Wow... that level with the castles is just amazing
@georgevasiliadis4228
@georgevasiliadis4228 6 жыл бұрын
Man I love your work. I've just discovered your channel and it's outstanding. You literally turn some primitive tools into gold. Idk, i'm super hyped😁 Keep it up
@javidx9
@javidx9 6 жыл бұрын
lol thanks George, Im hoping to get the message across that using simple tools well is just as powerful as using advanced tools.
@Ronan077
@Ronan077 3 ай бұрын
First of all, Man I wished that I landed on your channel much earlier, Like 4 years earlier haha... You have such a great and easy to understand explanation on stuff. Im coding as a hobby and im trying to make a falling sand game, wish me luck:) Oh and I subscribed to your channel ofcourse, I feel like a kid in a candy shop with your video's hahah:)
@javidx9
@javidx9 3 ай бұрын
I hope you enjoy the vids, there's a large collection of us on the discord all hacking away at similar projects, do drop by!
@Oxxyjoe
@Oxxyjoe 8 ай бұрын
these videos should be put in a time capsule to indicate to aliens that we know the real swagger, which is, coding 3-d games. Although maybe we should require that they show they are peaceful first. And I know the purpose of this video isn't anything to do with 3-D, but to share with everyone the game engine you have so nicely provided. I am only just now discovering your content, and just finished watching the prior videos to this, where you are step by step showing how to transform 3-d objects onto a 2-d surface, and I'm all for it
@justgame5508
@justgame5508 5 жыл бұрын
I bought a massive book on C++, already basically fluent in C# and know the basics of C, pointers etc. Never had time to get stuck into C++ because of university work, but now I’ve finished for summer, these videos have inspired me to learn C++
@crusaderanimation6967
@crusaderanimation6967 3 жыл бұрын
Dear YT I was (more or less) 2 day figting with SDL2, WXwidgets to force them to work only for some simple playground to play with individual pixels and failed and NOW you recommended me this film ? Well better late than never.
@MrSuamps
@MrSuamps 5 жыл бұрын
Your channel is gold. Thank you so much.
@QouteOfTheDay
@QouteOfTheDay 6 жыл бұрын
That is absolutely astonishing. Thank you very much for sharing all these amazing videos. Please keep up the excellent work 2019 and beyond.
@javidx9
@javidx9 6 жыл бұрын
Hi and thanks First Mill, I will!
@CosmicBrain21
@CosmicBrain21 6 жыл бұрын
Hey Javid, just wanted to say thanks for the tutorials my friend!
@javidx9
@javidx9 6 жыл бұрын
Hey cheers CosmicBrain!
@nazmicancalk2415
@nazmicancalk2415 6 жыл бұрын
Everyone who is interested in computer graphics should watch this video :). Great work as always, you deserve much more appreciation for this channel and for your efforts. Keep up the good work :D
@javidx9
@javidx9 6 жыл бұрын
Thanks Nazmican, I think it is an excellent prototyping tool for studying graphics.
@DubiCube
@DubiCube 3 жыл бұрын
Absolute legend, thank you for doing this!
@jesusjuarez1579
@jesusjuarez1579 4 жыл бұрын
Brillant! The explanation is clear and elegant. Congrats!
@thereborne5219
@thereborne5219 3 жыл бұрын
i was literally playing spyro on my ps1 and you showed spyro. amazing
@20thCB
@20thCB 6 жыл бұрын
Great work, your channel is turning into a real treasure trove!
@javidx9
@javidx9 6 жыл бұрын
lol, shucks, cheers 20thCB!
@ambitious-turtle
@ambitious-turtle 6 жыл бұрын
My mind is absolutely blown.... AGAIN Just wow. At 16:04 I was floored
@javidx9
@javidx9 6 жыл бұрын
Hi Daniel, yeah, I'm really pleased with how well the spyro demo performed
@ambitious-turtle
@ambitious-turtle 6 жыл бұрын
I'm starting a programming tutorial series on the JPEG format, and I gave you a shout-out in the beginning for giving me inspiration :) kzbin.info/www/bejne/eYG3ZXmJoKuIndU
@steverichards966
@steverichards966 6 жыл бұрын
Awesome, just what I was looking for to expand my knowledge of OpenGL, and game engines in general. All compiled OK on my linux machine using Eclipse CDT. I did need to add in png.h, and due to include paths mess around a bit with sqrtf, abs, and malloc (noting that you didn't explicitly include stdlib.h or . All sorted and the examples run fine. Now if I can stop watching your other algorithm videos I could get on and program something.
@javidx9
@javidx9 6 жыл бұрын
Hey Steve, thanks for trying it out! The problem I face with linux is everyone has different default build environments and IDEs, so its good to get feedback like this. Could you possible link to your source somewhere so I can study the changes you made? I should then be able to absorb them into the build for others.
@aptech2933
@aptech2933 6 жыл бұрын
Awesome stuff Javid.
@javidx9
@javidx9 6 жыл бұрын
Thanks APtech!
@russmack11
@russmack11 6 жыл бұрын
How do you not have more subscribers!! I've watched every one of your videos and am constantly impressed!
@javidx9
@javidx9 6 жыл бұрын
Thanks Russ, Its a little secret community, and you found us!
@jgartworld
@jgartworld 6 жыл бұрын
I've been learning lots from your videos. Great content! Subbed.
@javidx9
@javidx9 6 жыл бұрын
Thats great to hear, thanks Jessie!
@Rraccd
@Rraccd 6 жыл бұрын
You never disappoint!
@javidx9
@javidx9 6 жыл бұрын
Hello!, Cheers :D It's nice to hear from the original Lone Coders once in a while!
@TNT9182-j1e
@TNT9182-j1e 2 жыл бұрын
Can we just take a moment to appreciate that intro
@AnsityHD
@AnsityHD 6 жыл бұрын
I'm looking forward to having a go with this, the thing I loved about the console game engine was it's simplicity and accessibility so this is super cool :)
@javidx9
@javidx9 6 жыл бұрын
That's great to hear Ansity, the simplicity is what I think I liked most about the console game engine too, I can't wait to see people coming up with crazy things here :D
@petacardi
@petacardi 3 жыл бұрын
Really nice work! The last version from GitHub is compiling just fine on Mac using the command from the header documentation. Now I can start with your videos! Thanks!
@JohnDavidDunlap
@JohnDavidDunlap 4 жыл бұрын
I appreciate the crap out of you for taking the time to make this work on Linux. :)
@JohnDavidDunlap
@JohnDavidDunlap 4 жыл бұрын
Successfully compiled on Pop!_OS 19.10(Ubuntu derivative).
@simong7568
@simong7568 6 жыл бұрын
I love your tutorials, you make it really easy to understand! :D
@javidx9
@javidx9 6 жыл бұрын
Hi Roudey, cheers buddy, I try to just present the ideas, hopefully the viewers fill in the gaps and link things together.
@SmashHighlights
@SmashHighlights 6 жыл бұрын
This is fascinating, really enjoying the videos.
@javidx9
@javidx9 6 жыл бұрын
Thanks Smash!
@js-alias
@js-alias 6 жыл бұрын
Awesome, thanks Javid. Not sure if others had the same problem but I couldn't run it until I added a #define OLC_PGE_APPLICATION at the top of my file.
@javidx9
@javidx9 6 жыл бұрын
Thanks Julian, yeah I had to make that change since I released the video. It doesnt matter how much I publicise it, it still catches people out, but at least you resolved it!
@IAmCorbin
@IAmCorbin 6 жыл бұрын
This finally solved my issue and got the engine up and running with Visual Studio Code! Thanks! It was throwing strange errors about ...\AppData\Local\Temp\ccbsCluO.o: In function `__static_initialization_and_destruction_0': ...undefined reference to `olc::Pixel::Pixel(unsigned char, unsigned char, unsigned char, unsigned char)' ...undefined reference to `olc::PixelGameEngine::PixelGameEngine()' ....rdata$_ZTV6Engine[_ZTV6Engine]+0x20): undefined reference to `olc::PixelGameEngine::OnUserDestroy()'? but simply adding #define OLC_PGE_APPLICATION at the top of the implementation.cpp file solved the issue.
@WizardOfArc
@WizardOfArc 6 жыл бұрын
This is awesome! I look forward to playing with this!
@javidx9
@javidx9 6 жыл бұрын
Excellent Azi - it gets updated quite frequently so make sure you get the latest stuff!
@antoinedevldn
@antoinedevldn 5 жыл бұрын
Man ! This is so fucking perfect! Thank you so much for producing such a high value content. :)
@carlosaugustogurgel6887
@carlosaugustogurgel6887 6 жыл бұрын
hehe, I am wondering a bit in why your nickname is JaviDX9 and you don't use DirectX 9 for the videos. just kidding, thanks for the video, another opportunity to learn new techniques...
@javidx9
@javidx9 6 жыл бұрын
Thanks Carlos, you are quite right, its Java-David-DirectX9, two of which do not seem very applicable anymore :D
@Ganondurk
@Ganondurk 6 жыл бұрын
Please consider continuing your 3D graphics engine series, covering topics like normal mapping, lighting, and possibly raymarched and raytraced graphics. Thanks!
@javidx9
@javidx9 6 жыл бұрын
Hi Maurdekye, I am, I will!
@captainufo4587
@captainufo4587 6 жыл бұрын
I've been following you for a while, and as a mostly self-taught programmer this channel has been very helpful, thank you. I have a question that is a bit off topic, as it has nothing to do with the engine, just your coding style. I can't help but notice that you happily use hungarian notation; in my early days as a self learning coder everyone and their mother in every internet community I came across to learn things talked me out of using it. Given that you're a professional coder and that this is your naming convention of choice, I'd like to hear your take on the topic, if you have time to share it.
@javidx9
@javidx9 6 жыл бұрын
Hi Cristian, I do use Hungarian notation (a little more loosely these days, but still...) as I find it very useful! I started coding in a time where there wasn't even syntax highlighting, let alone autocomplete and IDEs that tell you whats going on. I also work on large code bases, primarily embedded systems, which can have hundreds of variables in a single file. In order to code fluidly, I need to be able to read code very quickly, and Hungarian notation allows me to see precisely what a variable is doing, and reminds me of its type. This means I can focus on thinking about the solution rather than remembering what things are. Some argue that it makes code difficult to refactor, my counter argument is that you should not need to refactor in the first place (though it is sometimes unavoidable), but if you need to, I like to see and manage all the refactored locations myself, again, priming my mind with what I am doing to my program, increasing my awareness of the bigger picture. Ultimately its personal taste, as long as your variable names are somewhat meaningful, I think its ok.
@captainufo4587
@captainufo4587 6 жыл бұрын
Thank you for the answer!
@EldronGah
@EldronGah 6 жыл бұрын
Wow, this is very amazing! Very nice job
@javidx9
@javidx9 6 жыл бұрын
Thanks SuperSalvatore!
@andreivlad6874
@andreivlad6874 5 жыл бұрын
That 3dDemo looks amazing!
@PaulSmith-gt2lm
@PaulSmith-gt2lm 6 жыл бұрын
What an amazing project, love it!
@javidx9
@javidx9 6 жыл бұрын
Thanks Paul!
@bryphi77
@bryphi77 6 жыл бұрын
I'd be interested to see octree and collision demo. This is really REALLY great stuff. Many thanks for your effort!
@javidx9
@javidx9 6 жыл бұрын
Thanks bryphi, I think trees are on the agenda - I like quad trees a lot, and havent done a video about those yet
@manuellehmann267
@manuellehmann267 6 жыл бұрын
Amazing. Will give it a shot right now. :-)
@javidx9
@javidx9 6 жыл бұрын
Thanks donnerbrenn!
@manuellehmann267
@manuellehmann267 6 жыл бұрын
Oh, I have to thank you. ;) It's fun. I'm wondering, if i could use it for some sizecodingstuff on linux. I'm using SDL2 at the moment for GFX Stuff. A dependency, i don't like for some reasons. Maybe i will try to do a more slim version of your engine. At the moment the noise example can be squeezed in a 8.7K executable with some additional compilerflags, stripping unnecessary stuff from the resulting binary and using lzma compression with a script i wrote. That's a little bit too heavy for my taste. (I like to do 4K Games and demos. ;) ) I learned, when you make functions static, they won't be compiled. This doesn't seem to be a trivial job on this thingie. Does someone have any ideas, how I could this on olcPixelEngine?
@seditt5146
@seditt5146 6 жыл бұрын
You know Javid, I realized the Engine I was originally using that was SDL2 based was a Pixel engine, all my Primitives, Circles , Squares, Textures.... Everything... Was drawn pixel by pixel and it ran fast enough that I could fill a 640x480 screen completely with 45-50 FPS on my old 12 year old computer. Not to shabby and since it maps every pixel to a texture it should be relatively portable.
@javidx9
@javidx9 6 жыл бұрын
I think people underestimate the power of their CPUs, there are things they can do much faster than a GPU
@seditt5146
@seditt5146 6 жыл бұрын
I always wanted to convert the memory write of the Pixels to SIMD but could never really figure out how to divy up the work. I seen similar things done on CPU side and it seen a 2-3x increase in speed as long as it was done correctly, if it was not done correctly it actually decreased the speed of operation.
@phraggers
@phraggers 6 жыл бұрын
This is awesome! Fantastic work
@javidx9
@javidx9 6 жыл бұрын
Thanks Molivos!
@nicolaibergmann6613
@nicolaibergmann6613 6 жыл бұрын
Nice!!! I'll check it out! :)
@javidx9
@javidx9 6 жыл бұрын
Cheers Nicolai!
@lozD83
@lozD83 5 жыл бұрын
...Just realised, this was the last KZbin video I watched as an EU citizen 😮
@javidx9
@javidx9 5 жыл бұрын
You made the first comment to me as a non EU citizen 😔
@peter881
@peter881 4 жыл бұрын
i have been strugling with graphic i love you man
@gbrls_yt
@gbrls_yt 6 жыл бұрын
great work as always!
@javidx9
@javidx9 6 жыл бұрын
Cheers Gabriel!
@cprn.
@cprn. 4 жыл бұрын
I wasn't paying attention and misheard you referring to yourself as One Line Coder and thought to myself "Oh, what a freaking cool nickname!" and then I heard you right and I thought "Oh, what a sad sad lonely codeperson who I envy because he probably can focus on things..." ☹️
@Tony_Goat
@Tony_Goat 6 жыл бұрын
Damn, this is on par with SDL2 with the SDL_Draw extension, even slightly better.
@javidx9
@javidx9 6 жыл бұрын
Thanks Tony, its also much lower level, so requires a bit more work, but ultimately its only limited by your creativity, which is why I like it as a learning tool.
@cprn.
@cprn. 4 жыл бұрын
Also, I didn't know about your channel before and come here from the "Forbidden C++" video where I got to from list of videos related to one on coding a pixel level particle system which I was watching because I got stuck trying to implement persistent blood decals by drawing pixels on surfaces instead of adding new objects to memory. What I'm trying to say is KZbin algorithms are bonkers.
@mattbrewerton6884
@mattbrewerton6884 4 жыл бұрын
I'm a front end Angular Dev with a decent C# history doing bits of game Dev on the side with Godot/Unity etc.... But damn these videos inspire me to learn C++
@ILGiullareDiCorte
@ILGiullareDiCorte 6 жыл бұрын
Just amazing!
@javidx9
@javidx9 6 жыл бұрын
Cheers!
@jean-naymar602
@jean-naymar602 6 жыл бұрын
I'M ACTUALLY HYPED ! (with 10 days of latency)
@javidx9
@javidx9 6 жыл бұрын
Hey Jean-Nay, Cheers! (2 days of latency with reply XD)
@avananana
@avananana 6 жыл бұрын
I don't know any C++ at all, but somehow I am deeply impressed at this. Time to figure out how game engines work, yay.
@javidx9
@javidx9 6 жыл бұрын
Well Avana, you could use this file to learn some C++ pretty rapidly (shamelss plug XD) Seriously though. thanks for your support!
@Akniy
@Akniy 4 жыл бұрын
So much better than my lecturer's 2d graphics library! This one seems simpler too (to my trained eye)
@ddream296
@ddream296 6 жыл бұрын
woah it looks nice :D gl
@javidx9
@javidx9 6 жыл бұрын
It does doesnt it? :D
@ノアメ千本
@ノアメ千本 6 жыл бұрын
It's really amazing!cool!Thanks for your video.
@nampukk6119
@nampukk6119 6 жыл бұрын
This should be amazing for prototyping!
@javidx9
@javidx9 6 жыл бұрын
Exactly, thanks Nam!
@zleapingbear
@zleapingbear 6 жыл бұрын
*anoyed voice* hmpf! Well, there goes my evening... Thanks a lot!!! *anoyed voice over* No seriously, this is awesome.
@javidx9
@javidx9 6 жыл бұрын
lol, sorry leaping bear XD
@zleapingbear
@zleapingbear 6 жыл бұрын
@@javidx9 ah well, i cant stay mad... I dont have the time, i need to code before work!!! Again, thanks for all the great videos, still looking forward to the multithreading video (Talked about the one with the ball simulator) :)
@jimjohn2652
@jimjohn2652 6 жыл бұрын
Finally an olc game engine that respect muh freedums
@avvvqvvv99
@avvvqvvv99 6 жыл бұрын
absolute legend
@yaroslavpanych2067
@yaroslavpanych2067 6 жыл бұрын
At 11:40 You must user %256 so color channel value 255 also can be used in color. Also you should separate color constants to dedicated inner namespace COLOR (or whatever) like you did with key codes. Hm... since you added transparency, you probably should fix Z-buffer part of 3D engine. I mean if closest rendered pixel to camera is semi-transparent, you need to know colors of pixels behind. I mean, I have no idea how traditionally such situation is handled in 3D engines, probably there is more efficient way to do that. PS: oh,, it starts to remind me old game engine I used to play with 10 years ago. Apocalyx, can be found on sourceforge. You probably can find something interesting there.
@javidx9
@javidx9 6 жыл бұрын
Hi Yaroslav, yeah, schoolboy error on the %256 thing :D Regarding Z-Buffers, if you use transparency then you still need to sort your triangles/objects first
@SerBallister
@SerBallister 6 жыл бұрын
transparent surfaces need separate handling, and possibly sorting depending on the blend mode, they cannot be thrown into the z-buffer alongside opaque stuff. Typically depth-writes are disabled for transparent objects too. They are quite a headache for modern deferred engines.
@TheGabrielMoon
@TheGabrielMoon 6 жыл бұрын
This is so wonderful!
@javidx9
@javidx9 6 жыл бұрын
Thanks Gobes!
@ChisponGroxo
@ChisponGroxo 6 жыл бұрын
Now with the new graphics engine. Are you planning on adding gouraud shading to the 3d renderer?. Would be cool if someday you cover BSP maps too! Best programming channel I've ever found, praise the lord Javid!
@javidx9
@javidx9 6 жыл бұрын
lol thanks Chipson, I think I may do a video on simple lighting models now, and will probably consider trees and similar structures for spatial representations in the future
@jakovmarkovinovic7543
@jakovmarkovinovic7543 5 жыл бұрын
I've been using olc Pixelgameengine for about a week now and it is fun to do but, the window can't be maximized or when I set the resolution to my screen resolution the window does not open in the middle, bottom right corner is always out of the screen and you need to drag the window manually. Can someone help with that please?
@javidx9
@javidx9 5 жыл бұрын
Hi Jakov, you can specify the PGE to be full screen as part of the construct function. If you specify the resolution exactly to your display, and dont specify the full screen flag, don't forget windows will want to put a title bar on there, which makes it slightly larger than full screen.
@jakovmarkovinovic7543
@jakovmarkovinovic7543 5 жыл бұрын
@@javidx9 I've gotten it answered on your discord server a day go, but still tnx
@KEKL_
@KEKL_ 6 жыл бұрын
your videos are amazing and inspiring
@javidx9
@javidx9 6 жыл бұрын
Hey thanks RV, thats really kind of you!
@astronime
@astronime 5 жыл бұрын
Because of you I've actually started to develop a strong grip on C++, algorithms and even shown me why the maths I learned in school was useful. But...! I've run into an issue while trying to use the engine, mainly around abstracting the code. As an exercise and to mess around I tried to take the asteroids game you made and grow it, first I'm using the PixelEngine instead of the ConsoleEngine, and then I want to abstract things into classes like "Player" and "Enemy" which inherit from a "SpaceObject" etc (ultimately letting me make the game in a more robust manner). Issue is, for as something as simple as initializing the player to ScreenWidth()/2 and ScreenHeight()/2, I need "SpaceObject" to also inherit from olc::PixelGameEngine... I'm no professional at this stage :), but that doesn't seem ideal. I'm also a bit stumped when it comes to the drawing routine. I want to keep OnUserUpdate as clean as possible, and call something like Player.Update() which will draw the player (otherwise I'm not sure how to draw outside of the Player class) but that just doesn't feel right that every object is effectively inheriting from a base class "olc::PixelGameEngine". I'm sure there may be something that I'm just blatantly missing, but at the moment I can't figure it out. Any pointers? Side note, I've started reading about Composition vs Inheritance and I'm considering keeping my projects light on inheritence. But I think my questions above are still relevant to what's challenging me! You're a true coding hero to me and your generosity via these videos is inspiring!
@javidx9
@javidx9 5 жыл бұрын
Only your main game needs to inherit from PGE. After that, give your objects a DrawYourself method and pass a reference of the PGE into them.
@astronime
@astronime 5 жыл бұрын
@@javidx9 Thanks. I've spent a good few hours and stackoverflow exploring but I haven't figured out how to do this. Am I passing the game object I made into the DrawYourself(...) method itself, or into the constructor when I create the Player player(...); Another way I tried is like this, which is also not compiling: (sorry for the code dump!). If I could just figure out the correct line of code of the DrawYourself(...) method correctly I'll be able to figure the rest out! ============================engine.h #ifndef ENGINE_H #define ENGINE_H #include class Engine { public: void Draw(float x, float y); }; Engine::Draw(float x, float y) { std::cout
@astronime
@astronime 5 жыл бұрын
@@javidx9 I figured it out using your pass by reference advice. I had to fix the code below a little but afterwards I also had a header circular reference that was causing me pain! All solved now. Can't wait to experiment further, thanks for the help!
@JonnyRobbie
@JonnyRobbie 6 жыл бұрын
...multiply...texture...shading...grr... :D jk, keep doing the great work. I just wished you finally got free of those limitations :)
@javidx9
@javidx9 6 жыл бұрын
lol, I know, I know! XD Will do, now I can cover lighting in detail at somepoint!
@MrJackojc90
@MrJackojc90 6 жыл бұрын
Fantastic!
@javidx9
@javidx9 6 жыл бұрын
Cheers Jack!
@zajec11
@zajec11 6 жыл бұрын
Wow WoW WOW. AMAZING
@javidx9
@javidx9 6 жыл бұрын
Thanks Sebastian!
@kamran_aghlami
@kamran_aghlami 6 жыл бұрын
This is super cool! Have you tried compiling for mac? If you don’t need OpenGL > 4.1 it should be pretty easy considering you already have it working under linux. I really like the header only nature of it so I can just make new project for small tests fast and easy. Does it support custom shaders? It would make a really nice testing environment for people like me trying to learn GLSL. Amazing work as always, Keep it up! 🤟
@javidx9
@javidx9 6 жыл бұрын
Hi and thanks Kamran, in principle it should, but I dont have access to enough mac testers in the community. There are some changes I am aware need to be made things like gl/gl.h become OpenGL/gl.h etc As for shaders it does not, primarily because its still a 2D application, I just use OpenGL 1.0 of all things to draw the data to the window. If you want to give me some feedback on mac, then please do! Either via github or discord, I'd like to make it compatible.
@kamran_aghlami
@kamran_aghlami 6 жыл бұрын
I'll see if i can make it compile on mac as soon as I'm done with my tomorrow exam. I'd be more than glad to contribute.
@oj0024
@oj0024 6 жыл бұрын
@@kamran_aghlami if you whant to learn glsl and modern oepngl try learnopengl.com. If you don't know it already. Otherwise use it to.
@ricardoaponte1166
@ricardoaponte1166 6 жыл бұрын
Hello Kamran, did you get to compile on Mac? I would love to use this library on my Mac.
@kamran_aghlami
@kamran_aghlami 6 жыл бұрын
No unfortunately, I tried but since i don't have any experience working with native mac windowing system (cocoa and so on) and really don't have desire to learn those as they are exclusive to mac and also my working schedule being tight... uh, I failed. :) Needless to say I would love to see olcPixelGameEngine compile on mac too.
@erikuervo
@erikuervo 6 жыл бұрын
This is gold
@javidx9
@javidx9 6 жыл бұрын
Thanks Erik!
@bladewind0verlord
@bladewind0verlord 4 жыл бұрын
at first i was like, 60 fps isnt that great for the spyro map. then i realized that this is all rendered in software on the cpu. wow.
@alfabetet7489
@alfabetet7489 6 жыл бұрын
Amazing!!!
@erdemozverenn
@erdemozverenn 6 жыл бұрын
You're the best!
@javidx9
@javidx9 6 жыл бұрын
aww shucks Erdem :D
@dailyshadow
@dailyshadow 4 жыл бұрын
javidx9, firstly. I love your videos, and this is amazing. I'm a computer science student, so I'm really enjoying these. But I just have a question. When you are running the spyro demo at the end with a higher resolution, your FPS drops to 50-60. I'm super impressed obviously, because you made this from scratch. But this is still a simple 'game' with pretty low graphics. I'm just wondering, what are more established graphics engines doing that increase the efficiency? For instance, I can run a modern AAA game at 144 fps, which is a bit more complicated. Thank you for your time, and for sharing your knowledge.
@javidx9
@javidx9 4 жыл бұрын
Very late reply here, my apologies and I suspect you already answered your question - but in the demo shown here, everything is being computed by the CPU, it does not use the GPU at all.
@dasten123
@dasten123 6 жыл бұрын
awsome!
@javidx9
@javidx9 6 жыл бұрын
Thanks dasten!
@kingzeeb319
@kingzeeb319 4 жыл бұрын
Would be awesome if you made a tutotorial series on how to create our own engine.
@michelealessandrini3421
@michelealessandrini3421 4 жыл бұрын
Hi, first of all you are my new hero. I have a technical curiosity: in the simple example of random pixels, I noticed that it uses a CPU core at 100%, so it seems like a CPU-bound process. So I was wondering: would the frame rate increase if drawing from several threads in multi-core mode? Because another voice tells me: you are accessing the graphic hardware, so basically a single resource. What do you think? Thanks!
@javidx9
@javidx9 4 жыл бұрын
Hi Michele, the PGE is primarily a CPU bound software renderer yes, though PGE2.0 has some GPU assistance too. Splitting rendering tasks across multiple cores is tricky. Drawing a line for example, how would you partition that process across multiple cores? That said, some things can benefit from being multicore, and my video on fractals demonstrates this.
@Veso266
@Veso266 5 жыл бұрын
How did you squeeze cpp code into header file, isn't header file only for an interface which you then implement in your cpp file?can you do the oposite and squeeze everything in cpp file and include it?
@javidx9
@javidx9 5 жыл бұрын
The compiler just sees source code, it cares not about file types. Convention dictates that declarations exist in headers and implementations exist in cpp files, and there are sound reasons for doing this, but it is possible to avoid it if you're careful with how the system is constructed.
@havocdev
@havocdev 6 жыл бұрын
Hey, I recently updated to VS2017 and am receiving this error: LNK2019 unresolved external symbol towards olc::Pixel::Pixel
@havocdev
@havocdev 6 жыл бұрын
Oh nevermind I forgot to define OLC_PGE_APPLICATION oops :p sorry.
@TealJosh
@TealJosh 6 жыл бұрын
@@havocdev What's that definition? I don't think it's mentioned anywhere.
@focuseletronica
@focuseletronica 6 жыл бұрын
CARAMBA!!! Muito bom Mesmo. Grato.
@javidx9
@javidx9 6 жыл бұрын
Hey nenhum problema amigo e obrigado!
@hedwigacciari46
@hedwigacciari46 5 жыл бұрын
There's something I don't understand. It seems that you have your own implementation of shape drawing functions (lines, etc) but would it be beneficial to actually use OpenGL to draw these shapes directly on the GPU (with OpenGL functions)?
@javidx9
@javidx9 5 жыл бұрын
OpenGL isnt really set up for drawing pixels individually. Lets say I want to draw a circle, I would first have to approximate a circle with lines, populate a vertex buffer, then commission the GPU to actually draw it. Thats a lot of work, far more than just letting the CPU handle it. Also consider that OpenGL would require some sort of screen transformation too. There is always a trade off when rendering. If I had many circles, all similar, that I could batch render, then the GPU may become more efficient, but I'd need a lot of circles. I guess my point is GPUs suck at random access rendering, the CPU doesnt care, so for arbitrary drawing of pixels, most of the benefits of hardware rendering are lost. I do of course use OpenGL to render the final image to the screen, its effectively 2 triangles with the texture created by my CPU.
@hedwigacciari46
@hedwigacciari46 5 жыл бұрын
@@javidx9 Thanks, it clears things up in my mind!
@93davve93
@93davve93 6 жыл бұрын
This is great
@javidx9
@javidx9 6 жыл бұрын
Hey thanks David!
@danmoos3635
@danmoos3635 6 жыл бұрын
I've often considered doing a software engine "old school", such as you have. Do you use just enough DirectX to get a pixel on screen, or is there a way to avoid even that?
@javidx9
@javidx9 6 жыл бұрын
You can avoid DirectX (or OpenGL in this case) entirely using OS calls, but these may have some overhead. I like the old-school approach because it is a great thing to learn the why rather than just the how, which a lot of modern tutorials and tools tend to focus on
@zhyere
@zhyere 6 жыл бұрын
Does your videos using C++ compile on Mac? I would like to start using your tutorials to learn to make games.
@javidx9
@javidx9 6 жыл бұрын
Hi Zhyere, some members of the community have been experimenting with mac. I don't own one myself so its not something I can easily test. The code "should" be quite portable, but some of the include setup might be different. Join in on the discord as we're hurting for mac programmers!
@jsflood
@jsflood 6 жыл бұрын
Amazingly superb as always! Tank you! :-)
@javidx9
@javidx9 6 жыл бұрын
Your welcome John!
@cariyaputta
@cariyaputta 6 жыл бұрын
Hi, I would like to know your idea behind using float instead of double? How to limit the FPS (i.e 60 FPS cap) using olcPixelGameEngine? Thanks you for creating such amazing game engine.
@javidx9
@javidx9 6 жыл бұрын
Hey! I use floats because i dont think i need the precision, simple as that. Also i like that floats and ints are both 32-bit so if i want to i can play with memory a bit, also if I wanted to use SSE it may make things easier. Also I like that float is explicit about what type it is, which makes the videos clearer. To lock the frame rate, there are two options, accumulate felapsedtime, until you reach the period you need in your case 1/60, and then update and draw everything, or in the case of PGE, remove the line SwapInterval(0) for now. I would exercise caution building applications which expect a particular frame rate though.
@cariyaputta
@cariyaputta 6 жыл бұрын
javidx9 Thank for your clarification. I have another question: when I run my game, the game window always reset to weird position (part of the window hidden below the taskbar), so I want ask you the way to set the position of the window to (0, 0) whenever the game start. I added 'SetWindowPos(olc_hWnd, nullptr, 0, 0, 0, 0, SWP_NOSIZE);' under Construct function but it didn't work. And also, how to port m_mouse and m_keys to PGE?
@evanl734
@evanl734 6 жыл бұрын
Do you plan to do a networking tutorial for online gaming?
@javidx9
@javidx9 6 жыл бұрын
Hi Evan, I will definitely be doing a video about basic networking, and may use a simple architecture or game as part of that explanation, but each game type usually has unique requirements so it wont be a "one size fits all" solution.
@evanl734
@evanl734 6 жыл бұрын
Very cool. I look forward to your videos.
@centdemeern1
@centdemeern1 Жыл бұрын
11:34 this creates values between 0-254, not 0-255
@rockyrivermushrooms529
@rockyrivermushrooms529 6 жыл бұрын
wow thats incredible.
@javidx9
@javidx9 6 жыл бұрын
lol, I see you are working your way through the back catalogue? cheers FireFungi!
@booombaaam2370
@booombaaam2370 6 жыл бұрын
To run your programs I need Visual Studio 2017 with C++ desktop development right?
@javidx9
@javidx9 6 жыл бұрын
It depends. The quick answer is that is the easiest option, but the pixel game engine should work on most platforms and toolchains. The console game engine works in visual studio and there are a couple of variants for win7 and linux. I only use the free editions of VS.
@booombaaam2370
@booombaaam2370 6 жыл бұрын
@@javidx9 thanks for quick response I think I should opt for the VS 2017 Community Edition with C++ desktop development as this is the easiest way and furthermore I can also run more programs from different videos of your channel as you also work on VS 2017.
olc::PixelGameEngine 2.0
29:16
javidx9
Рет қаралды 188 М.
olc::AllSorts - Text/Commands/Sounds/Jams
21:55
javidx9
Рет қаралды 32 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Line Of Sight or Shadow Casting in 2D
50:23
javidx9
Рет қаралды 145 М.
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 7 МЛН
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 2,9 МЛН
Let's Program Doom - Part 1
25:13
3DSage
Рет қаралды 475 М.
The BEST Mechanical Display You've EVER Seen!!
13:51
Tin Foil Hat
Рет қаралды 609 М.
Code-It-Yourself! Role Playing Game Part #1
50:36
javidx9
Рет қаралды 210 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 855 М.
Programming Mazes
27:11
javidx9
Рет қаралды 199 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 1,6 МЛН