A big thanks to those who donated during the stream - it really caught me by surprise :D
@mabroorahmad21824 жыл бұрын
You are realy impressive. i wish i could copy paste your skills in my head.
@adammarkiewicz33754 жыл бұрын
Hi, I'm looking through content of your channel, great material, interesting to watch and very nicely presented. I haven't checked the code in the final version, but I've noticed you're using vector of unique_ptr to exploit polymorphism and that's absolutely fine, but you haven't done it immediately and later it skipped out of sight: if you want unique_ptr to do its work correctly, block should have virtual destructor declared. In your particular case this could just work, as you use only plain attributes that do not require their own destruction, which does not mean this is correct approach. This should be declared off the bat just when you decided such implementation. Thanks for the content you produce!
@benoitb.36794 жыл бұрын
I really like this (edited) quote from 17:03 (ish): "Okay, it's difficult to master, I won't argue with that, but getting it working for you... when you're starting out programming, one of the first t things you'll realise is 'hang on, everything seems like hard work'. But after a while, it sorta clicks and you go 'well, this is actually making my life much easier'. And you'll start developing tools that help you. Once you've hit that point, you know it's for you; it's going to be what you need to do for the rest of your life."
@Edzward4 жыл бұрын
4:37 I have fond memories of this! From the time I used to program DOS roguelike rpg games entirely from ASCII characters! Man, so much fun!
@benoitb.36794 жыл бұрын
17:03 Genuinely my favourite perspective on programming. Clearly heartfelt given the nature of the situation and what you were doing. Thank you.
@robertszacki16284 жыл бұрын
Thank you for this great video. Much helpful and great inspiration. What I wanted to note is that "Push()" method could be called "Pushable()", because it just returns true or false and as the "Move()" method is there. Also like your Block representation. As for Goals, It is possible to use two layers of Blocks to achieve Goals functionality (independent Blocks and Floors), which is similar solution to the one presented in your video. Like the idea behind Horizontal, Vertical and Countdown blocks. :)
@javidx94 жыл бұрын
Thanks Robert, yeah that's what I like about this approach - its highly extensible, and yes pushable() is much better XD
@akjir4 жыл бұрын
@@javidx9 This was even a suggestion in chat, moments after you wrote it. (41:42 kariboo84 "pushable" naming ?) :-D
@return60054 жыл бұрын
Reversing the direction (NORTH to SOUTH, EAST to WEST, etc) can be done by a xor with 0b10 (2) instead of adding 2 and mod 4 Block->Push(dirPush ^ 0b10)
@markpaterson22604 жыл бұрын
Thanks for taking your time to do this even while you're so busy. It's much appreciated!
@BudgiePanic4 жыл бұрын
I made this exact game in my first year at university, or more precisely, an undo and redo move feature. It’s actually very surprising just how similar OLC Pixel game engine is, to what we used in first year programming to start learning the basics.
@fburton84 жыл бұрын
Delphi is still very useful from a practical point of view and still well supported. I have used it to create commercial software that interfaces with laboratory hardware and does real-time data acquisition and analysis. It's less appropriate for games programming because most of the useful libraries and frameworks are designed for use with C/C++ (although Delphi can call them). You can also embed Lua in Delphi programs, and call python code. love the near instant compiles/builds.
@JurajOravecSGOrava4 жыл бұрын
When you press INSERT key in most text editors you can overwrite the string for the "map".
@akjir4 жыл бұрын
"X. X. X. Excellent." He he. Like your videos. Entertaining and educational.
@csgowoes63192 жыл бұрын
I did the timed tile like this, under the default: switch option: if (isdigit(tile)) { vLevel.emplace_back(std::make_unique((int)tile-48)); break; } Then I could put any digit 0-9 on the map and it would work. I know you said you were keeping it simple but I figured this was pretty simples, though I have a feeling there must be a less cheesy way to turn a string into its equivalent ascii integer!
@budman854 жыл бұрын
Hi, when I tried compiling on Linux, I was getting no operator!=, in the header file you're missing these: bool operator == (const v2d_generic& rhs) const { return ( this->x == rhs.x && this->y == rhs.y ); } bool operator != (const v2d_generic& rhs) const { return !( this->x == rhs.x && this->y == rhs.y ); }
@javidx94 жыл бұрын
Hmmm. Good catch. I was using 2.07 in the video, so i guess its time to upload that to the repo.
@sewkokot4 жыл бұрын
@@javidx9 Another linux user and new follower of your channel :) Update the github repo to 2.07, please! You do great job, thank you :)
@bruno_kid_4 жыл бұрын
thanks
@RetroCoderTV4 жыл бұрын
Hi Javid. I've been watching your channel for years and recommending it. But I recently started up my own Assembly Language coding live on Twitch. Anyway, was going to make you a recommended channel on my KZbin and Twitch just thought I would let you know haha :D Keep up the quality work. I love all your videos
@M1SMR4 жыл бұрын
Hey javid, what do you think about the features added in the new C++ standards C++14/17/20? Do you think they improve the language or do you think they are unnecessary and complicate the language?
@laureven4 жыл бұрын
So looks like the next project will be to simulate Gravity and Space :)
@richardj.rustleshyman20264 жыл бұрын
Javid, perhaps in the future could you do a video on 2D elastic collision for balls and non axis-aligned walls?
@javidx94 жыл бұрын
Hi Richard - Already did, check out Programming Balls #2
@danielesquivel31554 жыл бұрын
yes ywy
@T3RRY_T3RR0R2 жыл бұрын
Can't believe I've missed this video. Been meaning to make something like this with batch for a while.
@tiger125064 жыл бұрын
A couple of thoughts: 1) Rather than nullptr empty blocks, create a block override that handles the do nothing situations. 2) The iterative approach to determining whether blocks can push looked pretty scary. I think the recursive approach would have been a lot cleaner. Also would tie in well with thought #1. Also, thinking in a more functional programming mode for a recursive approach would clean up all the random bools you had to add to make your iterative approach work. Interesting that without solid blocks on the level boarders, your code would wrap-around the pushing. 3) Copy/pasting the renderable argument into every DrawSelf function smells. Would have been better to leverage the fact you have a base class, block. i.e. block constructor takes renderable, stores in instance variable that the subclasses could access. 4) This was really cool, regardless. :)
@agent-332 жыл бұрын
This is awesome. I will try to code it in javascript. Good luck to me.
@mansirrabiu74124 жыл бұрын
Thanks very much! I am dying for the networking video you promised in the rect collision video.
@javidx94 жыл бұрын
Promised??
@mansirrabiu74124 жыл бұрын
Oh I am sorry sir! I re-watch the video and here comes the correct version of my words, ( I doff my hat sir, programmer like no other in the whole universe(atleast to me). I am dying for the networking video you tipped us(not promised) on in the rect. collision video. May God help you again and again in all your endeavours). Your biggest admirer: Mansir
@pierreyao72214 жыл бұрын
Great work Javid
@isaiasdimitri41104 жыл бұрын
VCode: It cannot do this. David: Yes, it *does* ahhaha
@yhezelmabajen26277 ай бұрын
is this applicable on visual basic? i badly needed some source code to make as a reference in my school project, thanks!!!
@jayasribhattacharya20484 жыл бұрын
I missed the live stream due to History class :-(
@tijani31414 жыл бұрын
Class on a sunday
@jayasribhattacharya20484 жыл бұрын
@@tijani3141 yeah our school is kinda wierd
@iProgramInCpp4 жыл бұрын
In July?
@jayasribhattacharya20484 жыл бұрын
@@iProgramInCpp yeah bro I am in India :-)
@iProgramInCpp4 жыл бұрын
@@jayasribhattacharya2048 do you ever get summer vacation or something?
@iProgramInCpp4 жыл бұрын
The std::unique_ptr removes the need for deleting stuff, as it's being done already, right?
@backwardspy4 жыл бұрын
Yes, unique_ptr frees the underlying memory for you when it is deleted, assigned a different pointer, or reset.
@iProgramInCpp4 жыл бұрын
@@backwardspy nice
@ishc3ice4 жыл бұрын
yes, same for shared_ptr
@KC-vq2ot4 жыл бұрын
Javid, what are your thoughts on "best practices"? I started coding with Java, moved to C++ and Python in university, but use pure C for work. I am still learning and do (truly) professional stuff for less then a year with most of my expirience in small or personal projects. Code seems so much more clean, when you throw all that OOP/clean coder/never manage memory/whatever-best-practice-academia-farted-out-this-week garbage out the window. It is smaller because there are less then a million levels of abstractions, easier to understand because there are less dog-extends-table-because-it-has-four-legs gems and you can start developing a lot faster, because you don't need to spend a hundred years evaluating all the (theoretically) reusable components and passive agressive class hierarchy. I work nights as a bouncer, but that thing makes me want to cry. Also, I hope the guy who made unit testing a thing burns in hell. Don't get me wrong. I subscribe to the spirit (and not the letter) of SOLID and am big supporter of stuff like deep project planning so often ommited in methods like SCRUM. Being honest, I don't even know how people live(d) without polymorphism. It is such an obvious way of making games and other real time simulations. Overloading is also great and I really miss it. It is just that "best practices" seem perpendicular to common sense and fail to make case for themselves. With unit testing, if your functions are so complex that some non-obvious bugs emerge requiring unit testing to pinpoint them -- you failed as a person. If your function is actually complex (like a lot of graphics staff) you will need something of equal complexity to test it, defeating the purpose. With OOP, inheritance is just bad and "reusability" that gets shoehorned in because "don't repeat yourself" slowly corrupts whole project by adding unnecessary complexity via workarounds like factory pattern and inability to evolve code separately. All of them look good only next to some strawman code. Am I right to treat them more as general guidelines or are they called "best" for a reason that is not obvious unless you make something the size of "Witcher 3"?
@codeguppy3 жыл бұрын
You make C++ coding so fun ;-)
@russellabraham92084 жыл бұрын
How long have you been programming? You have a lot of great knowledge thank you for sharing.
@8lb6ozbabyjsus4 жыл бұрын
Don't you have a video of Arcus playing in the background?
@javidx94 жыл бұрын
I do. Arcus is great! Swag staaaaaaaaarrrrrrr! Its my 8bits of advice for new programmers video.
@8lb6ozbabyjsus4 жыл бұрын
@@javidx9 thanks I was on his stream today and was talking to someone about seeing him on a video but I couldn't remember for the life of me what one!!
@bonus58044 жыл бұрын
26:47 I am learning c++ and I don't understand why you captured everything in the lambda with '&', because I don't think you needed it, because the lambda doesn't use any external value ?
@Wosser1sProductions4 жыл бұрын
He used `(this->)vLevelSize.x` inside the lambda, which is from the scope of the lambda.
@ciaragarrity64254 жыл бұрын
Big question: Is java slower than C, C# and C++? Java is easier to understand in my opinion and I wouldn't like it if my game was slow Thanks for your channel!
@javidx94 жыл бұрын
Hi Ciara, technically yes, java and c# are slower than c++, but it doesnt matter unless your project is large, complicated, resource intensive.
@ciaragarrity64254 жыл бұрын
@@javidx9 oh well, whats the difference between C# and C++?
@Aramis Razzaghipour hey i heard that Minecraft ported to consoles, they used Java as their programming language. They apparently converted its code into C. If, I did make a game in Java, would my hard work go to waste? Could I convert the code, and how? Thank you.
@streetfashiontv91494 жыл бұрын
@@ciaragarrity6425 depends what platform your making it for. If its to deploy as a mobile app then no because Java is the official language of Android (although Kotlin is increasingly becoming popular). If your making a AAA title for console then C++ is the industry standard. Indie games for PC can be made in either although C#/C++ is the most common because these languages are indigenous to game engines like Unity and unreal engine.
@roamingcelt3 жыл бұрын
Seeing that all blocks are the same size and the block size is global; why did you need to pass the block size in the DrawSelf?
@philtoa3344 жыл бұрын
So nice
@vitacell14 жыл бұрын
javidx9 love your videos, those help me. Please more of those videos but written in C.
@_girnetix_3 жыл бұрын
Hi, can you make video about game timer with solution this problem for me? :)
@matttherat95334 жыл бұрын
javidx9 : using c++ to program . me : using Holy c .
@zystemd31724 жыл бұрын
Holly shit you made in 2 lines and some notes what i try to do since 2 month : some kind of polymorphisme. I am really a dickhead :(
@morball66684 жыл бұрын
I really wish we wouldnt be “learning” bloody scratch at school
@iteratedofficial4 жыл бұрын
Thankfully we have the internet :D
@puncherinokripperino25004 жыл бұрын
WE'LL DO IT LIVE! F*** IT!
@ZomB19864 жыл бұрын
Sokoban is a lazy spelling of Soukoban, Japanese for Warehouse Duty
@adamdux52164 жыл бұрын
nice
@RecycleBin03 жыл бұрын
net yaroze pushy 2
@danielesquivel31554 жыл бұрын
Yo te amo uwu, tas hermoso. Sigue asi.
@banabana46914 жыл бұрын
i coming
@vittorioromeo14 жыл бұрын
Good video! However, not a fan of the use of polymorphism here. For example, you could represent the blocks with a `std::variant` of all possible block types. You were forced to use dynamic allocation and introduced the complexity of dynamic memory management via `std::unique_ptr`, which I do not think is necessary for a simple game like this one.
@muhammadhaider56774 жыл бұрын
Go watch his channel trailer.
@robertszacki16284 жыл бұрын
From what I've seen the Blocks are constructed just once at the game beginning, and then they are just moving on the array, so I guess there's no overhead because of dynamic construction.