olcPixelGameEngine

Поделиться
HTML-код
  • Опубликовано: 8 сен 2018
  • Introducing the olcPixelGameEngine, a powerful, cross platform, single file and simple to use game engine aimed at pixel based applications and games, which requires minimal external dependencies or setup. It could be considered a successor to the olcConsoleGameEngine.
    Source: github.com/OneLoneCoder/olcPi...
    / discord
    Blog: www.onelonecoder.com
    Twitter: @javidx9
    Twitch: javidx9
  • НаукаНаука

Комментарии • 463

  • @javidx9
    @javidx9  5 лет назад +151

    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  5 лет назад +2

      MaGetzUb feeds me music and style XD

    • @sakuhoa
      @sakuhoa 5 лет назад +1

      maybe you can let olcConsoleGameEngine as a repo, so there will be a wiki of it

    • @guzman-do
      @guzman-do 3 года назад +1

      Found your channel yesterday... Thank God RUclips recommended it... I was praying for a channel like this for a long time 🌟🌟🌟🌟🌟

  • @inhaledeath3899
    @inhaledeath3899 5 лет назад +148

    I just recently discovered your channel. Something completely off the rest of programming channels on RUclips. It's relaxing, educating calming, to watch you speak. All the best for you and your channel.

    • @javidx9
      @javidx9  5 лет назад +35

      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!

  • @FROZENbender
    @FROZENbender 5 лет назад +194

    I love how the bitrate just shat itself at 11:45

    • @obinator9065
      @obinator9065 5 лет назад +12

      RUclips Compression At Its Finest

    • @Sparkette
      @Sparkette 4 года назад +1

      @@obinator9065 You mean encryption? (/s)

    • @MxCrompli
      @MxCrompli 4 года назад +4

      @@Sparkette It's not encryption, it's compression
      RUclips 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 3 года назад +4

      7.59-fm [Closed] for future reference, “/s” represents sarcasm

    • @MxCrompli
      @MxCrompli 3 года назад +1

      @@bob_kazamakis Glad i didn't get r/wooshed with r/ihavereddit replies flooding down my notifications

  • @241lolololol
    @241lolololol 5 лет назад +116

    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  5 лет назад +37

      Micheal, comments like that make it so worth while so thank you very much!

    • @MaledictGaming
      @MaledictGaming 5 лет назад

      I know the feels :(

    • @B2SProductions
      @B2SProductions 4 года назад +3

      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 ruclips.net/user/ChiliTomatoNoodle

  • @fckyo333ujhjjkrrrr
    @fckyo333ujhjjkrrrr 5 лет назад +105

    Oh my god Javid. This is amazing. I love it

    • @javidx9
      @javidx9  5 лет назад +4

      Thanks Dayyan! Code::Blocks compatible too! :P

    • @fckyo333ujhjjkrrrr
      @fckyo333ujhjjkrrrr 5 лет назад +1

      javidx9 don’t spite me Javid or else! Smh

  • @robertboran6234
    @robertboran6234 5 лет назад +62

    Fantastic. This is perfect for making small gridworlds for testing AI safety concepts. Your channel is paradise.

    • @javidx9
      @javidx9  5 лет назад +9

      Hi Robert, I'm pleased you may find it applicable to something practical.

  • @seditt5146
    @seditt5146 5 лет назад +76

    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 5 лет назад +9

      Lel I always thought my windows was bugged

    • @TimeoutMegagameplays
      @TimeoutMegagameplays 4 года назад +6

      It's not your brain that's erasing it, it's RUclips 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 года назад +6

      I can see the mouse if I focus on it but it disappears if I focus on the background.
      Edit: It's not a RUclips 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 года назад +2

      @@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 года назад +2

      @@laurinneff4304 I compiled it on Linux too!

  • @ExistenceV2
    @ExistenceV2 5 лет назад +7

    Wow... that level with the castles is just amazing

  • @chriswinslow
    @chriswinslow 5 лет назад +8

    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  5 лет назад +4

      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!

  • @crusaderanimation6967
    @crusaderanimation6967 3 года назад +1

    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.

  • @georgevasiliadis4228
    @georgevasiliadis4228 5 лет назад +4

    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  5 лет назад +3

      lol thanks George, Im hoping to get the message across that using simple tools well is just as powerful as using advanced tools.

  • @TheRealFaceyNeck
    @TheRealFaceyNeck 5 лет назад +2

    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  5 лет назад

      Hey thanks Facey, I really appreciate your support!

  • @cooperpilot8094
    @cooperpilot8094 5 лет назад +20

    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.

  • @justgame5508
    @justgame5508 5 лет назад +1

    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++

  • @imuny6579
    @imuny6579 Год назад

    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 😅😅

  • @petacrdi
    @petacrdi 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!

  • @QouteOfTheDay
    @QouteOfTheDay 5 лет назад +1

    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  5 лет назад

      Hi and thanks First Mill, I will!

  • @derekcope3803
    @derekcope3803 5 лет назад +31

    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  5 лет назад +8

      lol thanks Derek, and to your son!

  • @jesusjuarez1579
    @jesusjuarez1579 3 года назад +1

    Brillant! The explanation is clear and elegant. Congrats!

  • @MrSuamps
    @MrSuamps 5 лет назад +6

    Your channel is gold. Thank you so much.

  • @CosmicBrain21
    @CosmicBrain21 5 лет назад +2

    Hey Javid, just wanted to say thanks for the tutorials my friend!

    • @javidx9
      @javidx9  5 лет назад

      Hey cheers CosmicBrain!

  • @Oxxyjoe
    @Oxxyjoe 2 месяца назад

    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

  • @AnsityHD
    @AnsityHD 5 лет назад +1

    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  5 лет назад

      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

  • @jgartworld
    @jgartworld 5 лет назад +1

    I've been learning lots from your videos. Great content! Subbed.

    • @javidx9
      @javidx9  5 лет назад

      Thats great to hear, thanks Jessie!

  • @thereborne5219
    @thereborne5219 2 года назад +1

    i was literally playing spyro on my ps1 and you showed spyro. amazing

  • @steverichards966
    @steverichards966 5 лет назад +4

    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  5 лет назад +3

      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.

  • @DubiCube
    @DubiCube 3 года назад +3

    Absolute legend, thank you for doing this!

  • @simong7568
    @simong7568 5 лет назад +1

    I love your tutorials, you make it really easy to understand! :D

    • @javidx9
      @javidx9  5 лет назад

      Hi Roudey, cheers buddy, I try to just present the ideas, hopefully the viewers fill in the gaps and link things together.

  • @20thCB
    @20thCB 5 лет назад +1

    Great work, your channel is turning into a real treasure trove!

    • @javidx9
      @javidx9  5 лет назад

      lol, shucks, cheers 20thCB!

  • @WizardOfArc
    @WizardOfArc 5 лет назад +1

    This is awesome! I look forward to playing with this!

    • @javidx9
      @javidx9  5 лет назад

      Excellent Azi - it gets updated quite frequently so make sure you get the latest stuff!

  • @bryphi77
    @bryphi77 5 лет назад +1

    I'd be interested to see octree and collision demo. This is really REALLY great stuff. Many thanks for your effort!

    • @javidx9
      @javidx9  5 лет назад

      Thanks bryphi, I think trees are on the agenda - I like quad trees a lot, and havent done a video about those yet

  • @andreivlad6874
    @andreivlad6874 4 года назад

    That 3dDemo looks amazing!

  • @aptech2933
    @aptech2933 5 лет назад +4

    Awesome stuff Javid.

    • @javidx9
      @javidx9  5 лет назад +1

      Thanks APtech!

  • @nazmicancalk2415
    @nazmicancalk2415 5 лет назад +2

    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  5 лет назад

      Thanks Nazmican, I think it is an excellent prototyping tool for studying graphics.

  • @robsbros2
    @robsbros2 Год назад

    Can we just take a moment to appreciate that intro

  • @Ganondurk
    @Ganondurk 5 лет назад +1

    Please consider continuing your 3D graphics engine series, covering topics like normal mapping, lighting, and possibly raymarched and raytraced graphics. Thanks!

    • @javidx9
      @javidx9  5 лет назад

      Hi Maurdekye, I am, I will!

  • @SmashHighlights
    @SmashHighlights 5 лет назад +1

    This is fascinating, really enjoying the videos.

  • @Rraccd
    @Rraccd 5 лет назад +5

    You never disappoint!

    • @javidx9
      @javidx9  5 лет назад +1

      Hello!, Cheers :D It's nice to hear from the original Lone Coders once in a while!

  • @PaulSmith-gt2lm
    @PaulSmith-gt2lm 5 лет назад +2

    What an amazing project, love it!

  • @EldronGah
    @EldronGah 5 лет назад +1

    Wow, this is very amazing! Very nice job

    • @javidx9
      @javidx9  5 лет назад +1

      Thanks SuperSalvatore!

  • @phraggers
    @phraggers 5 лет назад +1

    This is awesome! Fantastic work

    • @javidx9
      @javidx9  5 лет назад

      Thanks Molivos!

  • @antoinefortin1386
    @antoinefortin1386 5 лет назад +1

    Man ! This is so fucking perfect! Thank you so much for producing such a high value content. :)

  • @js-alias
    @js-alias 5 лет назад +1

    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  5 лет назад +1

      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 5 лет назад +1

      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.

  • @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).

  • @Akniy
    @Akniy 3 года назад

    So much better than my lecturer's 2d graphics library!
    This one seems simpler too (to my trained eye)

  • @peter881
    @peter881 3 года назад

    i have been strugling with graphic i love you man

  • @gbrls_yt
    @gbrls_yt 5 лет назад +1

    great work as always!

    • @javidx9
      @javidx9  5 лет назад

      Cheers Gabriel!

  • @nicolaibergmann6613
    @nicolaibergmann6613 5 лет назад +6

    Nice!!! I'll check it out! :)

    • @javidx9
      @javidx9  5 лет назад +1

      Cheers Nicolai!

  • @ILGiullareDiCorte
    @ILGiullareDiCorte 5 лет назад +2

    Just amazing!

  • @russmack11
    @russmack11 5 лет назад +1

    How do you not have more subscribers!! I've watched every one of your videos and am constantly impressed!

    • @javidx9
      @javidx9  5 лет назад

      Thanks Russ, Its a little secret community, and you found us!

  • @nampukk6119
    @nampukk6119 5 лет назад +1

    This should be amazing for prototyping!

    • @javidx9
      @javidx9  5 лет назад

      Exactly, thanks Nam!

  • @user-gw4zg1bx8d
    @user-gw4zg1bx8d 5 лет назад +3

    It's really amazing!cool!Thanks for your video.

  • @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 RUclips algorithms are bonkers.

  • @TheGabrielMoon
    @TheGabrielMoon 5 лет назад +1

    This is so wonderful!

  • @danielharding3688
    @danielharding3688 5 лет назад +9

    My mind is absolutely blown.... AGAIN
    Just wow. At 16:04 I was floored

    • @javidx9
      @javidx9  5 лет назад +4

      Hi Daniel, yeah, I'm really pleased with how well the spyro demo performed

    • @danielharding3688
      @danielharding3688 5 лет назад +1

      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 :)
      ruclips.net/video/CPT4FSkFUgs/видео.html

  • @manuellehmann267
    @manuellehmann267 5 лет назад +5

    Amazing. Will give it a shot right now. :-)

    • @javidx9
      @javidx9  5 лет назад +1

      Thanks donnerbrenn!

    • @manuellehmann267
      @manuellehmann267 5 лет назад

      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?

  • @avvvqvvv99
    @avvvqvvv99 5 лет назад +1

    absolute legend

  • @captainufo4587
    @captainufo4587 5 лет назад +1

    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  5 лет назад +1

      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 5 лет назад

      Thank you for the answer!

  • @kingzeeb319
    @kingzeeb319 3 года назад

    Would be awesome if you made a tutotorial series on how to create our own engine.

  • @Tony_Goat
    @Tony_Goat 5 лет назад +1

    Damn, this is on par with SDL2 with the SDL_Draw extension, even slightly better.

    • @javidx9
      @javidx9  5 лет назад

      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.

  • @jean-naymar602
    @jean-naymar602 5 лет назад +1

    I'M ACTUALLY HYPED !
    (with 10 days of latency)

    • @javidx9
      @javidx9  5 лет назад +3

      Hey Jean-Nay, Cheers! (2 days of latency with reply XD)

  • @KEKL_
    @KEKL_ 5 лет назад +1

    your videos are amazing and inspiring

    • @javidx9
      @javidx9  5 лет назад

      Hey thanks RV, thats really kind of you!

  • @ddream296
    @ddream296 5 лет назад +2

    woah it looks nice :D
    gl

    • @javidx9
      @javidx9  5 лет назад

      It does doesnt it? :D

  • @mattbrewerton6884
    @mattbrewerton6884 3 года назад

    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++

  • @MrJackojc90
    @MrJackojc90 5 лет назад +2

    Fantastic!

  • @alfabetet7489
    @alfabetet7489 5 лет назад +1

    Amazing!!!

  • @seditt5146
    @seditt5146 5 лет назад +1

    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  5 лет назад

      I think people underestimate the power of their CPUs, there are things they can do much faster than a GPU

    • @seditt5146
      @seditt5146 5 лет назад

      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.

  • @nomoturtle1788
    @nomoturtle1788 4 года назад

    Thank you so much

  • @avananana
    @avananana 5 лет назад +1

    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  5 лет назад

      Well Avana, you could use this file to learn some C++ pretty rapidly (shamelss plug XD) Seriously though. thanks for your support!

  • @lozD83
    @lozD83 4 года назад +10

    ...Just realised, this was the last RUclips video I watched as an EU citizen 😮

    • @javidx9
      @javidx9  4 года назад +5

      You made the first comment to me as a non EU citizen 😔

  • @ChisponGroxo
    @ChisponGroxo 5 лет назад +1

    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  5 лет назад +1

      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

  • @frankjibe
    @frankjibe 4 года назад

    Javix9 it would be great if you could make a video explaining the code of PGE. I'm still struggling understanding some pieces and bits of the code and how you draw on the screen without using any of the commonly used library. Any hint from you or anyone in the community would be highly appreciated. Great job!

  • @focuseletronica
    @focuseletronica 5 лет назад +1

    CARAMBA!!! Muito bom Mesmo. Grato.

    • @javidx9
      @javidx9  5 лет назад

      Hey nenhum problema amigo e obrigado!

  • @kamran_aghlami
    @kamran_aghlami 5 лет назад +11

    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  5 лет назад +2

      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 5 лет назад +1

      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 5 лет назад +3

      @@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 5 лет назад +1

      Hello Kamran, did you get to compile on Mac? I would love to use this library on my Mac.

    • @kamran_aghlami
      @kamran_aghlami 5 лет назад

      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.

  • @astronime
    @astronime 4 года назад

    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  4 года назад +1

      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 4 года назад

      @@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 4 года назад +1

      @@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!

  • @shifter65
    @shifter65 4 года назад

    How can one go about adding text scrolling? I imagine you might need a text buffer, some on mouse drag/scroll event handlers...

  • @zajec11
    @zajec11 5 лет назад +1

    Wow WoW WOW. AMAZING

    • @javidx9
      @javidx9  5 лет назад

      Thanks Sebastian!

  • @cprn.
    @cprn. 4 года назад +1

    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..." ☹️

  • @dasten123
    @dasten123 5 лет назад +2

    awsome!

    • @javidx9
      @javidx9  5 лет назад

      Thanks dasten!

  • @pedrofam8302
    @pedrofam8302 5 лет назад

    Thats Great!!!

  • @yaroslavpanych2067
    @yaroslavpanych2067 5 лет назад +2

    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  5 лет назад

      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 5 лет назад +1

      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.

  • @lukenukem8028
    @lukenukem8028 4 года назад

    You're just a genius.

  • @bladewind0verlord
    @bladewind0verlord 4 года назад +3

    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.

  • @erdemozverenn
    @erdemozverenn 5 лет назад +1

    You're the best!

    • @javidx9
      @javidx9  5 лет назад

      aww shucks Erdem :D

  • @nabilandadamslaboratory3422
    @nabilandadamslaboratory3422 4 года назад

    Can you please make a video where you go over the implementation of the methods etc of the engine? Thanks!!!

  • @rockyrivermushrooms529
    @rockyrivermushrooms529 5 лет назад

    wow thats incredible.

    • @javidx9
      @javidx9  5 лет назад +1

      lol, I see you are working your way through the back catalogue? cheers FireFungi!

  • @carlosaugustogurgel6887
    @carlosaugustogurgel6887 5 лет назад +41

    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  5 лет назад +34

      Thanks Carlos, you are quite right, its Java-David-DirectX9, two of which do not seem very applicable anymore :D

  • @93davve93
    @93davve93 5 лет назад +1

    This is great

    • @javidx9
      @javidx9  5 лет назад

      Hey thanks David!

  • @erikuervo
    @erikuervo 5 лет назад +1

    This is gold

  • @psyjax2
    @psyjax2 5 лет назад +1

    cool!

  • @filipfilip1767
    @filipfilip1767 4 года назад

    A question:
    If I create resources in onCreate virtual function for example: int a;
    and then in update virtual function I can acces this variable meaby do: a++;
    then how is this possible? how can variable that is local be accesed from another function? what about the variable scope rules?

  • @dailyshadow
    @dailyshadow 4 года назад +2

    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  3 года назад +1

      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.

  • @BrianMendoza93
    @BrianMendoza93 5 лет назад

    Hey Javidx! Thank you for your great videos. I'm new in CPP and I'm able to get olcPixelGameEngine working on MacOs and Xcode IDE. Maybe this is a dumb question as you explained the main difference that you still use olcConsoleGameEngineSDL but: can I follow along your previous videos with PixelGame instead of ConsoleGameEngine? I'm asking because I can't get to work the SDL version on Xcode.
    I can build EngineSDL but in line 1207 (throw 1;) I get a "Thread 2: signal SIGABRT" error. Thank you again for your help!

  • @ScibbieGames
    @ScibbieGames 5 лет назад

    You can render bitmaps and then display them in the console

  • @giornikitop5373
    @giornikitop5373 5 лет назад

    very nice and undestandable, made me want to start coding again.....maybe. one question though, i also convert the engine 4th tutorial with olcpixelgameengine and here is my snag: how did you manage to deal with the quads in the spyro_level.obj file? the code does not take more than 3 faces into account. i could only display the level correctly if i import, triangulate and re export the file. overall really nice work, keep it up sir and thank you.

    • @javidx9
      @javidx9  5 лет назад

      Hi geo and thanks! A quad is just two triangles, so read the four face points and add two triangles to the mesh!

  • @JonnyRobbie
    @JonnyRobbie 5 лет назад +2

    ...multiply...texture...shading...grr... :D jk, keep doing the great work. I just wished you finally got free of those limitations :)

    • @javidx9
      @javidx9  5 лет назад +1

      lol, I know, I know! XD Will do, now I can cover lighting in detail at somepoint!

  • @burnedoils
    @burnedoils 5 лет назад +1

    well explained

    • @javidx9
      @javidx9  5 лет назад

      Cheers burned oils!

  • @jsflood
    @jsflood 5 лет назад +1

    Amazingly superb as always! Tank you! :-)

    • @javidx9
      @javidx9  5 лет назад

      Your welcome John!

  • @michelealessandrini3421
    @michelealessandrini3421 3 года назад +1

    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  3 года назад +1

      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.

  • @msugal
    @msugal 4 года назад

    Thanks for the amazing videos Javid. Is the olcPixelGameEngine works with Macs because I can't use the olcConsoleGameEngine because of the .

    • @javidx9
      @javidx9  4 года назад

      Thanks Mohamed! Yes it does if you know how to configure your build environment. The github has some comments and discussion about how to do that. However, there is also a link to a mac port of the engine which people have had success with.