Jump to content

  • Log In with Google      Sign In   
  • Create Account

Alectora

Member Since 19 Oct 2007
Offline Last Active Jul 28 2016 03:22 AM

#5300845 Vulkan Swapchain Unable To Create

Posted by Alectora on 15 July 2016 - 01:17 AM

Oh geez. Apparently I made a mistake on matching the image extent. Since currentExtent already exists, I just need to refer it to the currentExtent by default and it solves the problem.

 

I can only define the extent when the currentExtent dimension is -1. If I define the dimension myself while the current extent exists (or not -1), it throws that error because they don't match! (Well, as jhenriques' tutorial said)

 

So this one:

Window* window = Global::stage->getWindow();

VkExtent2D extent = {};

extent.width = window->width;
extent.height = window->height;

if (surfaceCapabilities.currentExtent.width == -1)
{
... 

Should be roughly like this:

VkExtent2D extent = surfaceCapabilities.currentExtent;

if (extent.width == -1)
{
    Window* window = Global::stage->getWindow();

    extent.width = window->width;
    extent.height = window->height;
...



#5297320 New Post about Gamma Correction

Posted by Alectora on 20 June 2016 - 09:39 AM

Hi Nikko, nice post. Can I ask a question related to this though? I'm new to this gamma correction and wants to apply it.

 

So, correct me if I'm wrong, if the consumer camera provides a gamma corrected picture stored in the hard drive so it can be converted by the monitor to obtain that linear space, what about the ones that are created with illustration tools like CLIP studio or Photoshop?

 

I am just wondering if I provide my own image/texture that aren't based from real camera shot, do I need to convert it first or something or what.




#5297108 Problem on referencing a vector of derived class

Posted by Alectora on 18 June 2016 - 01:34 AM

I'm not over-engineering. Actually I'm keeping it simple. I only use what I need to solve scalability issues I faced before. ECS is one example of good abstraction already for me. I started off without it on some small games. Time to time, the game gets a little bigger and the game objects become bloated with concrete variables cross-referencing to everybody, whether it's from various base classes or concrete class itself.

As it gets bigger, it gets crazier and difficult to maintain, faced by a deadline. ECS saved us, even though we may do it wrong a few times.

 

The abstraction doesn't come up out of nowhere. When I heard the advice about the concrete solution was seem to be the only option I can get, even if it solved my usability problem, I had to ask myself "What kind of problem will I get into later in the end?"

My mind is only filled with the fact that me and my colleague may end up working 24 hours just because things become tangled and difficult to maintain. We got a deadline to catch up, and by that we got to throw some hackish codes to make it seems fine. In the end we got into a lot of trouble when updating the game or reusing some parts of it for a new game.

My client can just email me and ask if this can be fixed/updated in X days and upload it, or ask what game I can make within X months after the last one. If we have no deadline and can publish anytime we like, we may not even think about it being difficult whatsoever.

 

If you worry that I'd keep abstracting things out, note that I am not making a game engine here, I'm making a game. I reuse anything from what I had before; game engine or not if anyone want to call it. Again, I don't address scalability I don't need or the ones that were not problematic before.

 

However, it's a broad interesting discussion about scalability that I'd rather open a new thread, since my use case on this one is already solved.

 

Thanks again everyone.  :D




#5294742 HTML5 / Javascript , box2dweb, createjs pitfalls?

Posted by Alectora on 02 June 2016 - 08:53 PM

If you're publishing HTML5 games with Cordova to mobile devices and not web, I highly, highly, recommend you to use Crosswalk. You can use CocoonJS as well.

 

The reason why I recommend you these is because normal PhoneGap/Cordova uses the default browser of the phone through WebView, and that every browser on that single phone may vary and most often can be broken. Those tools I recommended to you, wrapped your application along with a browser engine, which means you can say your game runs in the same browser, even though they are played on different devices. They usually focus on performance, but the downside is your application file size increases because there's a browser embedded to it; roughly around 25mb or so.

 

The other issue is processing power and memory usage as frob explained, but you got to test this on your own to make sure cause I don't know what kind of game you are making.




#5293990 Do you usually prefix your classes with the letter 'C' or something e...

Posted by Alectora on 28 May 2016 - 07:51 PM

The real question is, do you prefix your structs with the letter 'S'?

 

So far I also don't prefix struct with S cause I treat struct as an obvious collection of PODs ... something like EmployeeCard containing information about an Employee, instead of containing both information and behavior of what an Employee can do, which I prefer it as an Employee class.

 

So by that term alone, I have different naming for on struct or class, so I don't really need S or C prefixes on them.




#5293720 Do you usually prefix your classes with the letter 'C' or something e...

Posted by Alectora on 26 May 2016 - 10:53 PM

I'm doing exactly like Promit does, lol. But I have a habit to use lowercase on the first letter of every instance members, and uppercase on the first letter of every class members. This is because of JavaScript don't have static word in ES5 or less (you got to invent this yourself) and I've been with that language for quite a long time.

 

As for C for classes, no I never use it. Class names are pretty straightforward I don't have any trouble differentiating it from anything.




#5288466 Noob pointer question

Posted by Alectora on 24 April 2016 - 12:01 PM

Hi guys,

 

I've been in JavaScript for a very long time for work, and now back to C++ due to excitement of Vulkan. Of course, my hazy memory about pointers already got into me to lots of pointer errors. So here's a quick one...

 

Why is this working:

int* a = new int(5);
int* pA = a;
delete pA;

But this one isn't:

int a = 5;
int* pA = &a;
delete pA;

I may be wrong, but is it because I'm trying to delete a pointer (is it even a pointer I'm deleting?) allocated in reserved memory or something?

 

Thanks!




#5148147 My Custom Memory Pool Seems Too Slow. Need Advice.

Posted by Alectora on 19 April 2014 - 09:10 AM

After the clarification about the template issue, I tried to remove the map and decided to use the template instead. It removes the needs to find which pool I have to allocate (due to map), which increases the performance slightly (up to 0.1 sec) compare to the one that uses map and without template. If I reserve the capacity (by the total number of the test), it is reduced to 0.23 sec! The number of classes that would need this would probably at hundreds or less, unless doing such template that way is very expensive (I don't know).

 

EDIT: As Waterlimon suggested, I've changed the benchmark against the Car class to be quite a bit the same as Entity. The Car class now inherits Vehicle, where it has to pass a string through its constructor and save it to a name variable. Apparently this is the culprit. Now the Car increases up to 0.5x seconds!

Now everything looks quite normal, as a matter of fact, better!

 

Thanks a bunch guys!! you guys are very helpful. laugh.png




#5105976 Building a Modern 3d Game from the Ground Up a Realistic Goal?

Posted by Alectora on 31 October 2013 - 10:01 AM

Since you said you'll be very specific on your game engine, I think I don't mind for you to continue on. Of course, feature creep may get in your way so be careful for this, time will tell. I just hope it's just a hobby.

 

I think you should create a little risk management, but of course that depends on your goal. For example, if all you really want is the engine, you'll actually don't mind to give your life to make your specific 3D game engine. However, if your goal is the game, you'll set about X years phase for the game engine. If it's not quite feature complete/game development ready, you might want to switch to use current available game engines with extra 6 months of learning phase, or if the game engine is usable even at 50 - 75% completion, you can finally start the game development.

 

This way, since you've been dealing with the engine for a few years, fail or not, you know the scope of what specific graphics features are, and using someone's engine would be easier cause you know what you're looking for and you know how it works. So it's a win-win for you. Just set a deadline to motivate yourself on how long does the engine should be completed.

 

Trust me, no matter how many years/features you put on your game engine to be perfect, when you finally start creating the game using that engine, you'll always want to fix your engine where someone else could do the job. I've been there, and it's quite a long journey for one man's brain to go back and forth from engine to the game itself just to fix a little something (happens a lot and not to mention architectural/design failures; it's crazy, you might want to take a little vacation when that happen. which usually you'll end up letting it happen until the next big refactoring, the engine v2 roadmap).

 

Forgot: About Java/C++, since you want performance you might want to try C++. About the graphics API, that depends on your target platform.




#5105538 JavaScript literal object as C++ struct?

Posted by Alectora on 29 October 2013 - 07:18 PM

Technically, C++ structs are almost identical to classes (with just a minor difference in default visibility).  Realistically, C++ structs are typically used like C structs, or your Javascript Plain-Old-Data object above.  Limiting it to that is actually pretty valuable.

Cool Thanks! Now I'm more confident to limit my struct usage to just POD. :)




#5104684 Just how complex are AAA games?

Posted by Alectora on 26 October 2013 - 07:17 PM

 

I think it's getting complex as AAA when you put all efforts to push every single feature you need because you have money.

 

For example, indie devs usually don't have that much budget, so if you want to animate character, you use pixel art because it's easier enough (technically) than creating 3D realistic character as well as it doesn't matter since pixel art has its market as well, and sometimes can be done by the programmers themselves.

For me, it gets "AAA" when you want one 3D super realistic character to live by hiring one of the best 3D modeler, animator, fashion designer, weapon designer, facial expression designer, lighting designer, motion capture device, actor/actress, combat designer, etc just for that.

 

So if it goes to game code, see BioShock's case for example. They have money that they can hire one of the best they could as water programmer to solve complex water equations in a form of efficient code, and then integrate it to an already complex system within a heavily modified Unreal Engine based on the demand.

It is also when you want the best 3D sound ever that you have to make partner with one of the best sound synthesizer out there and code together with their technology (and their internal programmers) which increases the complexity due to integration and different way to deal with that partner's API.

 

So yeah, it's complex on demand.

 

Were an Indie, there's three of us in total. It's not impossible to make a AAA game, but it's near enough improbable.. It's taken nearly three months just to get the first scene set up, get basic animations and player characters / enemies, tessellation, shader system, Navmesh AI, basic DB, load save, a half working gui and buggy dialogue system and learn the quirks of the engine and start optimising everything so were not battling against it later in the pipeline.. That's doing 14 hours a day, at the moment we are trying to get the balance between graphical quality and performance which we have been scratching heads over for the last couple of weeks.. It's going to take a long time and our main concern is, by the time we've released the game (Probably two and a half to three years time) the bar will have been raised higher and it makes all this time and effort on graphics mute.

 

Don't get me wrong, we could do a simple indie type game in a week.. But were trying to go all out and make it the best we possibly can.

 

 

Yes I get you mean, the pixel art stuff was just one possible example. What I'm trying to say is, for me a AAA is since you have big budget, you'll use whatever means to make things happen. For example, when it comes to big budget like making a music video, hiring many choreographers won't be hassle instead of researching on your own.

 

I'm pretty sure even with a super small team can produce AAA graphics and gameplay quality games especially with current tool sets available, but the idea is the budget that you can reach all over the world to get your thing works to the edge. Another example is like GTA 5 pushes the dialogue as realistic as possible by hiring real gangsters out there. That costs money for sure, while we can watch YouTube, movies and stuff to save costs with a result that maybe a little close enough.




#5103996 How can I gain a deeper understanding of C/C++?

Posted by Alectora on 23 October 2013 - 10:20 PM

Do a lot of programming, and make it bigger and bigger too see how repetitive your code could become that you finally learn how to make stuff generic (generic programming). If you finally end up wanting to read about patterns and architecture books, that's when you realize you're getting deep. It won't be about C++ anymore, it's about the concepts, and only comes up when you face real problems every day based on your requirements.

 

Learning from other programmers make it quick as everyone always have opinion on the way they code, as coding doesn't always about right or wrong when it comes to patterns or architecture, it's what's fit on your current problem.




#5103705 Will it be C++ the preferred game dev language in 3 years from now?

Posted by Alectora on 23 October 2013 - 07:45 AM

I think C++ will stay. C++ is really like a sports car using manual transmission as you can always manage your memory without tricks like in Java, C#, or any other languages that uses automatic garbage collection which causes trouble on resource-intensive tasks. Since you're asking about game dev, it's a yes for me.




#5082457 Wisdom Of The Land (New relaxing World Map track!)

Posted by Alectora on 02 August 2013 - 06:17 AM

I really can't level my words with your works. All I can for this one it's greatly excellent. You were great and just getting even more, better-er.

 

I really like the transition 0:13 - 0:15, and 0:25 - 0:33. I like the flow, it's all at the same level, not too loud and not too quiet.




#5031418 Tales of Home - A Snippet

Posted by Alectora on 12 February 2013 - 08:26 AM

As a matter of fact, graphics can have a serious impact on performance, especially when you have a lot of floating windows with software and plug-ins not optimized for graphics performance. I quickly ran into this problem with my old MBP as it only had an integrated Intel HD GPU.
On my new machine, I disabled the graphics switching feature that would switch to the weak on-board GPU when the MBP feels it doesn't need the powerful GPU and can save some power. I have the power adapter plugged in most of the time anyways, and graphics performance shouldn't become the achilles heel with the powerful CPUs we can use today.

 

Oh my, I didn't realize that. I better get a new machine too then. I am currently in MBA with integrated Intel HD GPU, and its totally limited when it comes to East West orchestra (it is supposed to have around 3.5 GB memory but the graphic card takes up to 1.6 GB memory, leaving me around 2.2 GB ... sad).

 

Thanks for the correction Moritz!






PARTNERS