Hello! Members of this community have formed a blog community.onelonecoder.com about all sorts of technology, programming, games, tutorials, devlogs and showcases of your work! If you fancy writing an article or two, for now shout out on the Discord server and we'll get you set up.
@B4503D4 жыл бұрын
Great video as always!
@laureven4 жыл бұрын
Idea: Many of us are beginners, and if a beginner is trying to learn something new by himself normally it takes 10x more time. Your blog is an awesome idea and maybe it is possible to include a section for beginners, but designed by pro programmers because You guys know what is the best investment of our time. I can google and be able to find many C++ courses but I would have completely no clue is those are any good, and you know many shortcuts. Videos for beginners are super boring but if pros created a small section in Your blog :) for beginners it would be beautiful for many of us. And another question :) when a beginner is able to realize if he is not a beginner anymore ?? :). Personally, I understand objects, templates but till 3 months ago only program in mql5. Recently I decided to start learning c++ (career / health-related reasons) and this is like train in swimming pool and discover the ocean :)...Regards and sorry for long comment :)
@WHKnightZ4 жыл бұрын
I have made some games by C++ in my channel, Please give me some comments, Tks!
@MortyrSC24 жыл бұрын
It's very interesting, I've never seen UI done this way. But would you consider this a production-ready solution or just a protoype to iterate over? Because it bothers me that data is hardcoded. Surely, it would be better to decouple data from code (making generic buttons/submenus and loading specific menu items from file)?
@adamodimattia4 жыл бұрын
Hi, OLC, I'm a fan and a follower of your teachings. Have a bit of a problem though that I addressed elsewhere, but hasn't been answered... I'm using Windows 8 on Mac and everything is fine, except for when I'm using Pixel Game Engine or Console Game Engine the display window is squeezed along the horizontal axis by a half approximately and gets some stretch along the vertical as well. Any idea what might be the problem? PS. Hopefully, I'm gonna be able to switch to pc soon...
@AngryNasus4 жыл бұрын
I appreciate the time you take to produce these videos. They've taught me a lot of basics of programming from a person with no knowledge. Keep being awesome.
@javidx94 жыл бұрын
Hey thanks and my pleasure man, always pleased to hear they have been useful!
@Kaltinril4 жыл бұрын
So much more elegant than what I did 20 years ago in c.
@javidx94 жыл бұрын
Hi Jeremy, lol, the modern language things make the code smaller, but I wonder at what cost - this implementation is certainly far from performant XD. Thanks as always buddy!
@wojtekburzynski6544 жыл бұрын
@@javidx9 Smaller code usually perform better than longer. Also if fragment of code don't have to be as fast as possible i think it's ok to make it as elegant and easy to read/write/change as possible. But I'm still studying so i may have no idea what i'm talking about.
@javidx94 жыл бұрын
@@wojtekburzynski654 Well yes and no, I could write a very small program in the single line int main() { DoEntireGame(); } but that doesnt necessarily mean that function isnt millions of lines of code XD. However you are right as you get lower down the layers of abstraction, but objects like std::map, though optimised to a degree are still computationally slow, as are any structures which offer great abstraction of functionality, and you should carefully choose which tools you use. In my case, once the menus are configured, I don't need to rely on std::map again, and instead use std::vector, which is very fast by comparison.
@davidmcgill10004 жыл бұрын
@@javidx9 Showing off the final assembly code to show the bloat C++ adds might be educational.
@StarEclipse5064 жыл бұрын
@@davidmcgill1000 additionally a video on how to optimize the resultant assembly
@oscill8ocelot4 жыл бұрын
I like how you showed how the API is used before you built it. Sometimes when I'm building an API, I'll start by prototyping examples for how I want to interact with it, and then work backwards from there, shaping the implementation to fit the examples until it all works.
@javidx94 жыл бұрын
Thanks Scritch, it was a tough decision, because on the one hand it works as you describe, but on the other it could completely alienate people who are not as confident, and put them off watching the video.
@TheWeepingCorpse4 жыл бұрын
I think that's called "programming to an interface".
@johnvonhorn29424 жыл бұрын
I love your clinical, analytical analyse of the storm; * mention storm * show storm * storm dealt with, now back to the task at end Your handling of "Ciara" was god like. You dismissed that storm out of hand.
@javidx94 жыл бұрын
Ain't got time for storms, there's code to be written...
@LangleyNA4 жыл бұрын
_"If one of my children [has] children of its own, then I'm going to call the build function on that child."_ The world of out-of-context language can be humoring and fun. I need my child to return a pointer to itself so I may reference my child later. Until then, I will store my child into an array. -- with all the other children.
@superslayerguy4 жыл бұрын
No wonder the world thinks that all programmers have aspergers
@ArchaicVirus4 жыл бұрын
@@superslayerguy lol
@Salehalanazi-74 жыл бұрын
This feels straight out of a dream. Your work is insane. This is truly inspiring. I really do want to get good and want to explain and give back to the community. I want to be like you
@javidx94 жыл бұрын
lol, thanks for the complements, but I would suggest aiming a little higher... XD
@erikhendrickson594 жыл бұрын
Your videos have been fantastic! As a very-novice, hobbyist programmer It's really exciting to learn about some of the code (and the logic supporting it) that made so many of my fondest childhood memories possible!
@superslayerguy4 жыл бұрын
Just want to point out, you do an AMAZING job explaining what's going on in the code while you go over it & I understand everything very clearly, your teaching skills are phenomenal (which is not an easy thing to do, especially in c++)
@Whateverworksism4 жыл бұрын
Always exciting with a video, in this case a sizeable video, from Javidx9. You never fail to inspire me to work and practise harder. And I always learn something interesting or gain a new perspective to something, I've already learned. I suspect this video wont be an exception! Thanks for all your work buddy.
@javidx94 жыл бұрын
Thanks man, I think this video introduces lots of new things for people to google, so I hope it does prompt a few people to try and understand some of the more complicated techniques presented.
@oblivionronin4 жыл бұрын
great, now i have the FF7 songs stuck in my head for 3 months , Great video !
@javidx94 жыл бұрын
Thanks Chris! And that's a bad thing?
@oblivionronin4 жыл бұрын
javidx9 not at all !
@Asdayasman4 жыл бұрын
Last I heard, it was "Fire3" not "Firaga". :)
@ArchaicVirus4 жыл бұрын
@@Asdayasman I thought those spell names were from kingdom hearts
@desmondbrown55084 жыл бұрын
Not only is this incredibly interesting and nostalgic, but you used a ton of amazing rudimentary programming concepts and data structures. Very good usage and reasoning for specific data structures that sadly don't see as much use anymore these days (namely stacks). Also you taught me a few things in this video. Been using C# a lot lately and I do miss me some operator overloading. It's easily one of the best parts of c++. Sure it exists but is nowhere near as powerful as C++.
@javidx94 жыл бұрын
Thanks Desmond, its great to hear you say such things, as I hope my videos are more about the how rather than the end result, so pleased to get this feedback!
@skilz80984 жыл бұрын
Very nice and robust design. I had worked through a video tutorial series working with Modern OpenGL v3.3+ using shaders, and within that Shader Engine, we created a fully dynamic GUI system that can produce similar results to this. However, within that system, we also wrote two file parsers one in binary that would allow you to draw any renderable type object, the other was related to the GUI system that would allow you to specify where and how to draw different GUI elements including boxes, list boxes with different text alignment capabilities, scrolling, and even sprite objects including animated sprite sheets and more via the designed scripted language. What I liked about that design is that after the parser was completed you could modify the text file for the GUI loader and just run your application again without having to recompile or rebuild the project from changing values within the program. It does it dynamically for you at run time by loading in the objects and their values at runtime! If other viewers are interested more in that video series; I would highly recommend visiting www.marekknows.com and check out the Shader Engine Series! Marek's video series has taught me quite a bit about 2D and 3D Graphic-Game Engine design and many different techniques in programming in general! Don't get me wrong; I really like this approach too, but I'm always interested in seeing similar things being done from many different perspectives! It gives you great intuition when working on your own projects!
@allmycircuits88504 жыл бұрын
Thanks for the video! One little tip: instead of integer division and modulo and ternary operation, you could write: nTotalRows = (items.size()+vCellTable.x-1) / vCellTable.x; the result is the same.
@oqardZ4 жыл бұрын
Good that I checked comments before writing exactly this.
@speedyc884 жыл бұрын
Hello! Javidx9, Another great video I always find your videos are very enjoyable to watch, on a Sunday or when ever you post them on your channel. Keep up the great work. All the best from Speedy C
@javidx94 жыл бұрын
Thanks Speedy!
@Ferenc-Racz4 жыл бұрын
OMG! You are one of the few youtuber / programmer who creates really meaningfull and usefull contents. Thank you and congratulation for this! You are great!
@rikuchiha5404 жыл бұрын
Very Elegant way to do things ;) Keep up the fine work man
@javidx94 жыл бұрын
Thanks RiK!
@fredhair4 жыл бұрын
Wow that's quite lovely elegant interface well done.. I'm only 5 mins in and looks great
@javidx94 жыл бұрын
Thanks fredhair, yeah, I like the fact I dont need to explicitly maintain a hierarchy, nor do I need lots of intermediate stages in the menu's construction. This means its likely I will actually use this tool in future experiments.
@andrewjacobson69324 жыл бұрын
Another awesome video! Honestly don't get why somebody would dislike this.
@vitacell14 жыл бұрын
Man, I love your videos, you are showing amazing things.
@merlemuliem3774 жыл бұрын
Man this channel looks so awesome man why i didnt found u earlier =( but with which video should i start ? im rly confused on ur channel ^^ u have some order for me to learn and recreate ur projects for myself ? would be a real experience ! best channel ive ever seen for REAL PROGRAMMING !
@javidx94 жыл бұрын
Thanks Merlemulie, I somewhat intentionally dont have a video order, but most of those titled "Code-It-Yourself" are pretty much fully encapsulated projects that people appear to enjoy coding along to.
@merlemuliem3774 жыл бұрын
@@javidx9 Ok so u dont think i shouldnt do it in any logical order, just go on any "Code-it-Yourself" Series right ? ^^
@javidx94 жыл бұрын
@@merlemuliem377 Perhaps start with Tetris?
@merlemuliem3774 жыл бұрын
@@javidx9 Well for real i think i will start with it ^^ Just after ive finished my 1010 pages Book about C++ Programming ... well maybe site by site ... Yeah i know i have a looooong Way to go =)
@jsflood4 жыл бұрын
Awesome video, some great data structure gems you teach us in there, thank you.
@javidx94 жыл бұрын
Cheers buddy ;)
@laureven4 жыл бұрын
I'm curious how many times in a week You will be asked: "when You will release the extension to the game engine ?"? :):). Everything is looking absolutely awesome. As always thank You and Regards
@javidx94 жыл бұрын
Lol Marcin, I thought exactly the same thing, I'm gonna have to finish the GUI extension off now aren't I? XD
@mrsantana90944 жыл бұрын
I'm also making a 2d game engine myself, mine uses the Windows GDI.
@ItsHyomoto4 жыл бұрын
I got really excited, I thought you were trying to solve something I was working on. Unfortunately this was not the case. That said, it did give me an idea for a solution I might try out later so it was worth the watch!
@javidx94 жыл бұрын
Well that's all I can hope for! If it gives people ideas, then it worked, so thank you!
@vampiriclion11764 жыл бұрын
Omg sir, you are a genius ! You are really talented
@Borhamus4 жыл бұрын
DUDE, i just find you! Love the Panel of ff1
@enzymeboost83864 жыл бұрын
Just want to say thank you. i have learned so much from you. Great content
@javidx94 жыл бұрын
Thanks Enzyme, good to hear!
@davidbundgaard4 жыл бұрын
I was 501, haha good job @javidx9 on this video very nice and I’m looking forward to see the GUI uploaded and or video about it.
@elliottrecord55704 жыл бұрын
I think programming a system which uses a Visual Abstraction layer is so interesting because of the requirement to map data structures to pixels (in this video's context). I'm currently working with Machine Intelligence algorithms and that's all about finding a data structure which maps to your problem domain - so it's a similar challenge to overcome pragmatically. I was going to write about the process of implementing it at a high-medium level so it should be easy to follow along and I wondered if I could post it to the website if someone was interested? OLC, I use [C# + WPF + (Prism Library for MVVM pattern)] at work, and so I'm only able to see how much WPF abstracts away for me when looking at how you approached this problem. I find watching the implementation of your programming videos so beneficial because it helps find my feet when solving my own problems - and I can see that it's not as difficult to conceptualise as I thought, once you get your brain thinking in these ways. Now that I'm programming my own projects at home and taking design patterns seriously, these insights into your solutions help to expand my "problem solving repository" so to speak. Thank you for making these interesting and useful videos!
@javidx94 жыл бұрын
Thanks Elliott. If you want to devlog or write articles for the community blog, then register on the site (it takes a few moments to respond) and i'll see about you getting author credentials. It's even better if you shout out on the discord server, because we have a live chat just for authors.
@uvadroid4 жыл бұрын
I had been wondering about this very concept of GUI some time ago. I eventually found a solution using good old polymorphism. I didn't understand exactly how your approach works, but mine does exactly the same thing. I have to admit however, yours is respectably less repetitive in terms of syntax.
@Diamonddrake4 жыл бұрын
Another great installment!
@mr.roboter4 жыл бұрын
Thank you for your teaching
@bradleychristensen15744 жыл бұрын
Hey, I love your videos. Have you considered doing a video about making a flexible UI and menu system for a game from scratch? Or is that too tedious haha
@sevenedus4 жыл бұрын
Thank you very much for inspiring thousand of people
@victorlucki85864 жыл бұрын
Superb content as always. Thank you very much.
@gabrielferrer80614 жыл бұрын
Hi David. Cool stuff as usual! I point out some topics you could do a video about. * Linear, quadratic/cubic interpolation. * Bresenham line, circle, ellipse algorithm. * Anti aliasing with alpha channel. And I'm curious. What happened with the NES emulator? Will you do a follow up? Thanks.
@javidx94 жыл бұрын
Those are some good topics, its possible ive covered them before buried in other videos i suppose. New NES videos coming soon :D though there is not much left to talk about.
@spawnlink4 жыл бұрын
If the number of elements in a vector and the comparison function is fast it is likely more efficient to scan over the vector.
@javidx94 жыл бұрын
It could well be. For small menu systems perhaps using a map is overkill, but at the same time, I'm sure a few people have since googled std::map and std::unordered_map, which makes it worthwhile in the end.
@spawnlink4 жыл бұрын
@@javidx9 Certainly. I brought it up because you mentioned performance and it is not common for people to mention that with a small set of data vectors can be as fast or faster than maps even for random access due to the cost of indirection in a map/hash and it's lack of cache friendliness. That said if the string is dynamically allocating the data you'll still have some indirection. That all said... speed obviously isn't a primary concern with a menu.
@NoMercy80084 жыл бұрын
So, first of all, this is a great video on a great channel, thanks a lot for all of that! :) I really enjoy your videos and have learnt quite a lot from them, which is always super appreciated! I know I've been a very quite viewer so far, and I'm sorry for that, but this time I have a question/topic I wanna "discuss" :D In your implementation, every menuobject has a Build() function that basically calculates all the necessary internal values, etc etc, which the user has to manually call for the menuobject to be able to actually draw itself. I'm wondering, wouldn't it be (slightly) easier to use if the menuobject had some sort of "dirty" flag that would automagically be set to true whenever the menu somehow gets changed, so that the DrawSelf(...) function could just check that flag and call the Build() function whenever the dirty flag is true (and then the Build() function would set it back to false, of course)? I know that that would incur a slight overhead each frame, since every menuobject has to evaluate that dirty flag, but I feel that might be something you could live with for the sake of making it easier to use. I guess it would also eliminate a potential spot for errors, after all it is very much possible to simply forget the Build() function. So yeah, is that something you thought about? If so, why did you decide against it? Are there any downsides I am missing?
@javidx94 жыл бұрын
Thanks NoMercy and its a good question! It is quite common in GUI systems to have a dirty flag, or even as far as a dirty region rectangle, assuming the underlying principle is only draw what you need too. I would completely recommend doing this if you expect the menu system to have dynamic content. In the clip of my GUI framework shown at the start I do exactly this, and I go one step further, each window is effectively a new sprite, so I can move it around but I never have to redraw the contents unless something signals that they need changing. In this instance however, my needs dont require dynamism, so its a fire and forget menu construction with just the one call to build of the root menu. lol, one of the things I was trying to resist (and I learnt the hard way through my prototype) was adding to much! Originally I had check boxes, and progress bars, but the video would have become far too long...
@NoMercy80084 жыл бұрын
@@javidx9 Sounds like it would be very interesting to see a video (or probably way more than one since it seems rather complex) about that GUI framework :D But there's only so much time in the day and I imagine that producing these videos takes lots of time, so again thanks a lot, really appreciate it :)
@Booooomoyo4 жыл бұрын
Reminds me of Final Fantasy
@javidx94 жыл бұрын
Its from the series Final Fontusy, definitely not the franchise you mention XD
@KaosFireMaker4 жыл бұрын
@@javidx9 what? I could have sworn it was from "Last Legend" :p
@ArchaicVirus4 жыл бұрын
Please upload more videos, we are all hungry for more content! Thank you
@hugoboston4 жыл бұрын
You probably get this alot. I am a very beginner at cpp and i was wandering how hard it is to start making these cool console games you make. Do i need alot of experience or could i do it with just being able to make a calculator. Also how to i start. Thanks 😊 also i love you channel
@javidx94 жыл бұрын
Thanks ZZos, the key thing to remember is "everybody has gotta start somewhere" and you have, so that's great! Programming is one of those fields where you will get better only if you put in the practice and have patience. All programmers started off with simple calculators, and basic algorithms, its how you learn the building blocks to make more sophisticated things. Dont give up! Keep practicing!
@hugoboston4 жыл бұрын
javidx9 thanks that has really boosted my confidence.
@lucasmachado62024 жыл бұрын
The new ported theme from C# is so much better. Best update in Visual Studio for a while haha
@chrishulk13 жыл бұрын
I love this guy.
@roamingcelt3 жыл бұрын
So all the time I like the correct use terms. Part of the reason I like watching this channel. But this one set my ear on end. "In many ways, this could be considered a GUI"... No it is the literal definition of a GUI. It is the graphical front end that allows users access to functions written in code.
@chrislaing71084 жыл бұрын
Oooh just like that, er, 'First Reality' game on the NES... Very nice!
@javidx94 жыл бұрын
Exactly ;)
@Nikarus23704 жыл бұрын
On the "9 Patch palette". I wonder if any early games (specifically NES/SNES and their counterparts era) used a 4 patch palette to save space? IE, in a 4, you'd have 1 corner (that is then mirrored as needed to make other corners) a vertical border (mirrored for other side) horizontal border (mirrored) and a background. Or perhaps a 3 patch, where the corner is mirrored as normal, but then some diagonal mirroring is done to the vertical border tile to make it a horizontal tile (which is then mirrored to make a top or bottom as needed)
@javidx94 жыл бұрын
Hi Nika, on the NES its unlikely as the background tiles are not mirror-able. If the menus were rendered as sprites it would be possible, but this would be a sloppy way to produce a static rectangle of information. No doubt, NES artists had to be creative with how things are constructed though, and reuse as many tiles in different places as possible, Super Mario Bros clouds being the bushes for example.
@bashthecode75594 жыл бұрын
Hi, I wanted to report a bug on your website. Please head over to the projects HTML and scroll to the last one titled "Personal Stuff" and click on it. It throws a 404 Error! Anyways love your channel a lot, helps learn very comprehensive C++!
@slvrization4 жыл бұрын
Thanks for the video! Final fantasy
@Bonfra043 жыл бұрын
hey there, do you plan on releasing the windowing extension you showed in this video any time soon? it's just awesome
@artaway66474 жыл бұрын
Hello, I'm pretty new when it comes to Visual Studio (normally I do web dev and python. What are some stuff needed to follow your videos? Just default? or is there some "workloads" (as Visual Studio call it) I need to install first?
@javidx94 жыл бұрын
Hey! All you need is Visual Studio2019 community edition, and development for desktop applications installed. After that, check my other channel which shows you how to setup a new VS2019 project for olcPixelGameEngine. Its "javidx9 extra".
@artaway66474 жыл бұрын
@@javidx9 thank you for the reply!
@artaway66474 жыл бұрын
@@javidx9 by "development for desktop applications" you mean "Desktop development with C++"? do I install the optional stuff as well?
@rioarifando73054 жыл бұрын
You are amazing man
@thatsnuts89354 жыл бұрын
Cheers Javid! i am wondering if you'l make a live stream or a video about the release of C++20 this month. and we discuss new stuff in the standard. will be too much fun godamit! im so excited
@javidx94 жыл бұрын
I "might" do something like that over on Twitch, but don't hold me to that XD I dont want to start using the features until I thoroughly understand them.
@thatsnuts89354 жыл бұрын
Lol i just forget the fact that you have to learn new stuff too! well till then we catch up buddy. have a great week!
@TravelingMooseMedia4 жыл бұрын
Amazing! I'm having a great time using the pixel game engine
@ColossalMcBuzz4 жыл бұрын
You may have covered this elsewhere, but why do you prefer Hungarian notation?
@ogr24 жыл бұрын
Hi @javidx9, I would like to know if it is possible to share the GUI example program you show on the video. It will be interested in create one for the pixelgameengine, to don't use external libraries. Regards.
@javidx94 жыл бұрын
Hi Oscar, at the moment it isnt released, simply because it isnt finished yet.
@ogr24 жыл бұрын
@@javidx9 woah, are you planning on making some type of GUI for PGE?
@xtdycxtfuv93534 жыл бұрын
ah shit my dude i was wondering when u would next upload
@warmCabin4 жыл бұрын
When I need to round stuff, I like to use this trick: (items.size() - 1) / vCellTable.x + 1 This will always get you the number of rows you need, no extra divisions or logic.
@ogr24 жыл бұрын
Thanks javidx9 for this great tutorial. I am interested if you are planning on doing a tutorial to make the "widgets" applied to the pixelgameengine, like the code you show on the minute 6:17, or it is possible to upload it? Regards.
@tommy2nes4 жыл бұрын
hey javidx9, what do you make of handmade hero? I tried to follow it once but drove me crazy how fast the guy talked, i had to slow it down to 0.5 speed and even then it was insanely fast XD
@danwalker14944 жыл бұрын
This is beyond my comprehension as I’m new to coding; I recently started coding in python, and I wonder if I beat my head on the wall long enough if I could do the same thing in python. Is it even feasible?
@user-sd9ed8vz7p4 жыл бұрын
31:11 if the sName is "root" because we didn't constructed the menuObject with string, why it is not appears root, root, root, root, root, but Attack, Defend, Esacape, Item, Magic? Is it using key of the map instead of sName for drawing the string? (34:44)
@javidx94 жыл бұрын
For sub menus it uses key name, for leaves it uses the specified name.
@AndroidsReview4 жыл бұрын
It would be great if ui layout could be load from json
@javidx94 жыл бұрын
Whats stopping you? Go for it!
@1985stout4 жыл бұрын
Thankyou
@ratchet1freak4 жыл бұрын
I wouldn't mind seeing the same menu style implemented in an immediate mode style api. So you can do something like if(menu(magic)){ if(menuLeaf(fire)doFire(); }
@err69104 жыл бұрын
Hi OLC! There is a significant bug in your implementation. The issue is that you return references to objects stored in the vector and that you also increase the size of the vector when you add new menuobjects. At some time, the vector is resized and all references are then dangling. This can happen at any time when chaining the square brackets or when, as a user of the feature, you hold a reference to a submenu. A way to fix that would be to use a std::deque instead, or a list. Keeping references to vector elements must always be done very carefully.
@javidx94 жыл бұрын
Perhaps im getting old, but could you identify where im "keeping" references to vector elements?
@javidx94 жыл бұрын
I understand your argument, and im not trying to be awkward.
@err69104 жыл бұрын
Sorry I should have been more explicit. The implementation does not keep a reference but an index. That's ok. The problem is on the user side. For example: auto& m1 = mo["main"]["menu1"] auto& m2 = mo["main"]["menu2"] // may invalidate m1 auto& m3 = m2["menu3"] // ok auto& m4 = m1["menu4"] // UB The last line is undefined behavior and can do anything: work, crash, do nothing (but maybe leave a ticking bomb), add menu4 as a submenu of menu2, ...
@err69104 жыл бұрын
BTW on a second thought, I think the chaining of square brackets is probably Ok, so the issue is only with keeping a reference. And my apologizes for having been so direct, dont get me wrong, I'm not critizing, your videos are amazing and I really enjoy them.
@javidx94 жыл бұрын
Hey no worries man, im totally open to criticism, and i was scratching my head thinking "maybe if this", "what if that" I was completely second guessing myself. Lol, its what makes this hobby fun 😁
@SquidCoder Жыл бұрын
ChatGPT knows about your libraries. I just spent 3 hours trying to port these ideas to java without thinking to ask if it knew what i was trying to do... :P
@jorgengullstrand59883 жыл бұрын
How do you attach a action to it? Want to use it as main menu but I just can't figure it out
@samuelhulme83473 жыл бұрын
Have you got the download for the complex ui system or a guide on how to make it?
@oracleoftroy4 жыл бұрын
Re: code at 34:06 - I would not use _count()_ like that. The map has to find the element to see if it exists, then if it does, it has to re-find it to return it, or re-find where it should be to insert it in the correct location. Instead look at the _emplace()_ or _insert()_ member functions. They will return a pair with a bool indicating whether it added a new item, and the item (whether it was already existing item or a newly inserted item). One lookup, and does exactly what you want.
@BenderdickCumbersnatch4 жыл бұрын
Speaking of things not to do... He definitely should not hand-code the menu entries and item IDs the way he did. Very ugly code.
@oracleoftroy4 жыл бұрын
@@BenderdickCumbersnatch True, though it provides a good enough foundation for loading from a config file or or script or similar, so I didn't mind that bit as much. The double map lookup is a common anti-pattern when people use methods like _contains()_ and in the past I praised the stl for not having it, but alas they added it in C++20.
@muhammadhaider56774 жыл бұрын
He's explicitly said that he doesn't care about "best practices" and he'll never try to write optimal code.
@kacperkujawa2134 жыл бұрын
I have to ask, where do you get knowledge about all of this from?
@javidx94 жыл бұрын
Almost 30 years of messing about, experimenting, practicing, failing and having a whole lot of fun 😁
@kacperkujawa2134 жыл бұрын
@@javidx9 I really appreciate your tutorials sir, you've got very diverse content, from synthesizer to 3D engine. I would like to be like you someday. I wish you further success :D
@dsmeckt22834 жыл бұрын
Final Fantasy thrills.
@psyjax24 жыл бұрын
What Image editor are you using?
@BurningBlueFox4 жыл бұрын
I was just doing a JRPG battle screen for my game when I saw the notification.
@javidx94 жыл бұрын
Quite a coincidence!
@retnikt16664 жыл бұрын
Just a quick suggestion: invest in a pop filter for your microphone
@smashitround56804 жыл бұрын
Honestly I have to say thank you for your videos I just got my engineering degree and a big part of it is because of your videos :) thank u so much u have made me a better engineer. ..thank you :) (=^_^=)
@corretorortografico55344 жыл бұрын
Where can I learn more about your engine?
@vancemccarthy25544 жыл бұрын
It seems complex until you realise the final commands can be put into one long list.
@javidx94 жыл бұрын
Thats the beauty of this approach in my eyes - its worth going through the extra hoops to establish the data structure when rewarded with a really simple tool to use.
@RhoTrepaan4 жыл бұрын
Heh, we seem to have the same storm (well, sort of) going on.
@stomah98323 жыл бұрын
When will you releae the gui system?
@javidx93 жыл бұрын
When I finish it. Plenty of others available. Worth searching GitHub for PGE GUI.
@iProgramInCpp4 жыл бұрын
Woah woah woah, can't you make it a bit simpler? I may try I guess
@endowdly4 жыл бұрын
Tables in tables!? I smell Lua around the corner...
@ViralVibesReal4 жыл бұрын
W
@theternal4 жыл бұрын
15:55 Isn't it called nineslice?
@geminirebirth4 жыл бұрын
Only issue with this: not very usable for multiple languages. Probably not the most suitable solution, even if it's the easiest one to expand upon, but still this flaw is pretty big if you're thinking in future-proof terms.
@javidx94 жыл бұрын
International support is always tricky, and quite frankly, neglected by most hobby coders like myself. I guess I would adopt the approach that the older computer games take and have a character set with international symbols, they seemed to manage it back then. That being said, I would not construct huge user interfaces in this manner, its useful for limited quick selections but not a great deal else.
@geminirebirth4 жыл бұрын
@@javidx9 Besides the encoding for strings, an ideal solution would be to use string references, or maybe something akin to what QT uses for translations, with lookup tables.
@michaelmahn43734 жыл бұрын
@@geminirebirth You could also easily build those menus dynamically from files instead of hardcoding them into C++. And then just have files like gui_en.dat, gui_fr.dat, gui_de.dat, ... That's how I would do it.
@geminirebirth4 жыл бұрын
@@michaelmahn4373 Yeah, that's a solution. I would leave the text part separated from the hierarchy and behavior, even if it makes creating the structure a bit more intricate.
@aminebel41454 жыл бұрын
who is java dev but still watch the video and enjoy it
@aSameplayer4 жыл бұрын
could not find the big thumbs up button :p, so I just give an thumbs up. thats all i can do
@PixelOutlaw4 жыл бұрын
Game programming today is an absolute mess. I've seen people waste days on font rendering. Sometimes it's best to NOT use a AAA game engine. Single programmers need to focus on techniques like this that get them to the goal fast with time for embellishment later. It's unfortunate that game development is absurdly complex these days if you follow the "normal" path of complex IDE configuration, complex build system, complex code repository system, hand programming a texturing system from scratch (shame on Vulkan for making a graphics more verbose than even native ASM and buffer poking while providing no sensible defaults) and wasting 2 days just getting a camera set up in an engine that is way beyond the scope of anything a single person would have the time and attention span to finish. It's not C++, but man could I whip out a game FAST in Blitzmax. Even libraries like SFML and SDL are annoying because their drawing routines require additional objects to hold on to rather than just pushing to the screen buffer. Aaaaaanyway, great job with this menu system!
@OllieLK4 жыл бұрын
**watching after playing final fantasy VII remake** where are they?
@henrykkaufman14884 жыл бұрын
Imho it's overcomplicated. For instance, stack of flat menu structs instead of a tree would be simpler to implement and fill out. You could then, for example, make every menuable thing in the game implement IMenuable interface that would return such a struct, making solution extensible, dynamic and said struct would be a natural protocol between game logic code and user interface code. Just one example of how this can be made simpler, but it's just my opinion, I'm curious what you or someone else would think about this.
@ericisedgy34464 жыл бұрын
Ayy first bb
@jx42194 жыл бұрын
Oooooh. Windows based operating system... That's why it's called windows. Because you have windows in it. I always thought it was because it fits the logo.