|
862
|
Developer / Technical / Re: General thread for quick questions
|
on: December 24, 2017, 08:01:41 AM
|
Do you mean class inheritance?
I don't (Which makes me think I'm using the wrong term). What I'm looking for is inheritance of serialised data, so for example if I have Class1 that has the variables "Name" and "Health". I have objects A & B both of Class1. ObjectA sets it's name and health respectively and 'inherits' from nothing. ObjectB however inherits from ObjectA, so both the name and health are inherited meaning changes to health in ObjectA would also change health in ObjectB. Hope I'm explaining it well enough  It I understood correctly, in your example you said that A and B are of class Class1. So B can't inherits from A, inheritance is when Class1 has a child class. If you want B to set the same value of A, that it is a copy constructor. Or you can create a function that get A and creates B with values from A.
|
|
|
|
|
863
|
Player / Games / Re: What are you playing?
|
on: December 23, 2017, 05:16:36 AM
|
nioh lacks memorable landmarks and suchlike. there's also just a distinct lack of "unique" features about the level design. it recycles the same enemies and assets a lot and the "secrets" you find tend to be the same kind of shit you find in the non secret part of the level anyway. i feel art wise it may have worked better if there weren't so many night levels? the night lighting makes everything look samey.
still a fun game however.
I thought the landmarks were cool because a lot of those places are real and fairly well done recreations. The bridge with the multiple bumps is spot on. I agree about the night stuff though. Awful lot of night levels in that game. If the game showed those places at the beginning of the game, instead of the castle, the village and the cavern in thr first 6 hours of gameplay, maybe the levels could had been more unique from the start. I think probably caused by problems with the development (Nioh was shown as a PS2 game for the first time) and repetitive assets were a trade-off to solve gameplay longevity.
|
|
|
|
|
864
|
Developer / Technical / Re: The grumpy old programmer room
|
on: December 22, 2017, 01:16:14 AM
|
It's a relative thing, isn't it? Someone else would say that DirectX and OpenGL do not allow you to talk directly to the GPU. If you want to talk directly to the GPU, they will say, you'd have to talk to its registers. Not to mention that using GPU's that you didn't create on your own is already a form of dependency. You didn't create these GPU's on your own. Instead, you're taking advantage of the ones that were created by other people. If you did not build the electronic circuits you are using on your own, and especially if you don't know how electronic circuits work, then you're still being dependent. Furthermore, if it is true that modern GPU's perform all sorts of graphical computations on your part then the dependency is even greater. I do not know how GPU's work but I believe that they do many things on their own such as vertex processing, culling, clipping, rasterization, shading and so on. Basically, I think that most of the conversion from 3D space to 2D space is done by GPU's. If that's true, then you're dependent to a considerable degree.
Though I am not creating anything physical and though I am not interacting with ready-made graphics processing units through API's such as DirectX and OpenGL I am still doing all of the conversion from 3D space to 2D space on my own. I do all of the computations on my own. I also make sure that I understand thoroughly all of the mathematical functions that I use in the process. In other words, I make sure that I can come up with these functions on my own. I think that's still some kind of "doing things from scratch".
I don't know. It is relative to the single, but the majority could think in another way maybe. Probably that, if you say in an job interview that you created a 3D engine from scratch, they think that you created using DirectX/OpenGL. 
|
|
|
|
|
865
|
Player / Games / Re: What are you playing?
|
on: December 21, 2017, 01:14:58 AM
|
why Nioh artsyle is bad and how dark souls better
Dark Souls have a composition of the scenario that, expecially when you enter a new zone, shows you the new area with a lot of particulars: a castle in a distance, mountains on background, vegetation that frames all togheter:  Essentially it is a show of knowledge of the art style of the old centuries in Europe, rigid, hierarchical social structure, like this image in Kubrick "Barry Lyndon":  All to say that it is all very well thought and nothing left for granted. In Nioh I could say for sure that this structure is completely left, maybe for too many compromise with the level design, that it is very well done and a very good taken from the Souls (the "spaghetti" level design). But added with just a few scenario (village, cavern and war zone), there is even less way to iterate all that. I think Nioh might be in my top 3-5 games of the year. Took about 15-20 hours to really get into it. It throws a lot of systems in your face and it takes a while to sort them all out.
Good! But for me, I would not suggest to buy full price if you need 20 hours to get in (for me that it is a cons and not a pro) Just to say  I would definitely add Nier:Automata as one of the best action game of the year.
|
|
|
|
|
866
|
Developer / Technical / Re: The grumpy old programmer room
|
on: December 21, 2017, 01:02:33 AM
|
Today writing a 3d framework it is very hard, it is not like years ago, a couple of friends programming in a garage, because now the complexity increased so much that you need to divide each sub-system (graphics, audio, physics etc.) to different people.
As you can see, it's complicated. Some things are harder, and some things are easier. Trying to directly compete with big budget AAA games as an individual of course doesn't make sense, but why would you want to? There's a huge amount of space to carve out a niche someplace else. Minecraft is a perfect example of a game that was absolute garbage both technically and aesthetically, but went on to be one of the most successful games of all time. It demonstrates that you don't need a whole team of experts on cutting edge technology to create something that reaches your audience. I agree, you right, Minecraft is an example. I thought that Maximillian was very interested in the low-level side at first, reading his implementation in QBasic. But if you want to write a game engine from scratch you need to know how the hardware works, and that it works like that even 20 years ago. If you writing the rendering you should know how the graphics pipeline works, or you will not have nothing on the screen, or if you write an input system have an idea of how the processor are acquiring this input from the keyboard. Do I? I think it depends on my needs. I can write a software emulator of my fantasy machine using nothing more than HTML5 Canvas and JavaScript. I don't have to know anything about hardware in order to use these two technologies. Of course, I understand, such a software emulator would be slower than the one written in C++ or assembly. And software emulators in general would be slower than hardware emulators. But the question is: do I care about this performance difference? How significant such a difference would be in relation to my needs? If it is insignificant then HTML + JS is the best choice. But if it is significant, say because I want to create an engine that can be used to create video games that can compete with AAA titles in terms of graphics, then sure, HTML + JS wouldn't be the best choice. Thankfully, my needs are modest. I want to create a 3D engine but I do not want to create an engine that you can use to create cutting-edge video games or even games that consumers can play on their own machines. My goal is to acquire understanding, not to create commercial games. Mmm, IMHO I am not even sure if I could consider that example of an HTML5 + JS an engine... when I think about a game engine from scratch I think about all or most of the implementation directly connected to the hardware using a library: rendering talking directly to the GPU using DirectX/OpenGL, input using XInput etc. I do not know if you are making a game in HTML + JS, you have to use a library that itì's wrapping some framework that, essentially, it could be the same as using an already architecture (aka game engine).
|
|
|
|
|
867
|
Developer / Technical / Re: The grumpy old programmer room
|
on: December 20, 2017, 01:29:37 AM
|
I want to write a 3D engine from scratch. However, I have no interest in learning how necessary physical components such as monitors, graphics cards, processors and so on work. I don't want to create these physical components myself. Fortunately, I don't even need them. I'd be happy to write such an engine on a fantasy machine -- a machine that is entirely within one's imagination, akin to that of Alan Turing -- so as long it meets certain requirements. I want a machine that has simple rules but complex consequences. A machine that can be programmed using simple instructions, instructions that are preferrably declarative rather than imperative; a machine that has a simple fantasy computer screen attached to it that can be addressed on per-pixel basis; and a basic fantasy keyboard would be a plus. That's all I need. A software emulator might be useful to test programs that aren't simple enough but perhaps a better approach would be to break them down into programs that are sufficiently simple to be run entirely within one's mind.
But if you want to write a game engine from scratch you need to know how the hardware works, and that it works like that even 20 years ago. If you writing the rendering you should know how the graphics pipeline works, or you will not have nothing on the screen, or if you write an input system have an idea of how the processor are acquiring this input from the keyboard. Today writing a 3d framework it is very hard, it is not like years ago, a couple of friends programming in a garage, because now the complexity increased so much that you need to divide each sub-system (graphics, audio, physics etc.) to different people. It is like in a movie making: it is very hard to be the Director, the Screenwriter, the Actor, plus all the other positions that are behind the camera. If you want to make a game, just use Unreal, Unity. To learn how to use it, read the documentation for the theory + the video tutorials for the practice. You will definitely create stuffs on this way. Different if you want to learn more, how things work under the hood. That you need to study what a programmer must study indipendently from the specialization he/she will do: see what computer science university courses are doing, or this books to get an idea: http://mrelusive.com/books/books.html If you know these things, it is higly probable that you can solve problems in other specialization, that could be englineering, video games, networking etc.
|
|
|
|
|
868
|
Player / Games / Re: What are you playing?
|
on: December 20, 2017, 01:03:54 AM
|
Playing Nioh. Souls-like, the loot and spaghetti-level design is very good, but it is very repetitive on the enemy type encounter + Dark Souls was not only challenge but great art design, visuals that rewards you when you explored and find a new area, place or just a secret passage. The graphics is very bad, not only technically but also the art style. 
|
|
|
|
|
869
|
Developer / Technical / Re: General programming discussion
|
on: December 15, 2017, 01:07:14 AM
|
I want to write one fluid simulation eventually. I've found some example codes, already, it seems simple.
Neat. This is something I'm going to be working on soon. If you have/find any other good resources, please share them! This was the most simple example I found: https://www.mikeash.com/pyblog/fluid-simulation-for-dummies.htmlCertainly has caveats. It is surprisingly few code but depending on what you wanna do it's not necessarily simple. Shallow water surface sim is pretty straightforward, full body simulation is a bit more complex (and expensive).
I'm aware it's expensive. I will do just for fun.  More fun videos: The last one is by Matthias Müller-Fischer. There are the name of his papers in the description of his videos. Very interesting to watch, I am wondering when all that good we will see in an actual game. Someone suggest this book: https://www.amazon.com/PHYSICAL-FLUID-DYNAMICS-D-Tritton/dp/9579437017, explains without going too much on the maths side and more on how things work.
|
|
|
|
|
871
|
Developer / Technical / Re: The grumpy old programmer room
|
on: December 14, 2017, 01:19:02 AM
|
DosBox runs games such as Wolfenstein 3D and Doom pretty well. In DosBox configuration file, the CPU type is set to auto (which it is said is the fastest option.) Cycles, which is the number of instructions DosBox attempts to emulate each millisecond, is also set to auto. I tried using CTRL + F12 to increase this value while running DosBox but there isn't much difference when it comes to my QBasic program. Note that I am calling PSET in a double FOR loop to draw a square on the screen. Maybe this is a slow approach? I tried using FreeBasic and it runs the same code just fine. The only thing that has worked in QBasic is the approach that uses page-flipping. This code runs fine: DATA 00,00,00,00,00,00,00,00,00,00,12,12,00,00,00 DATA 00,00,00,00,00,00,00,00,00,00,15,15,00,00,00 DATA 00,00,00,00,00,00,00,00,00,15,15,15,15,00,00 DATA 00,00,00,00,00,00,00,00,00,15,15,00,15,00,00 DATA 00,00,00,00,00,00,00,00,15,15,15,15,15,14,00 DATA 00,00,00,00,15,15,15,15,15,15,15,15,15,14,14 DATA 15,00,15,15,15,15,00,15,15,15,15,15,00,00,00 DATA 00,15,15,15,15,00,15,15,15,15,15,00,00,00,00 DATA 15,00,15,15,00,15,15,15,15,15,15,00,00,00,00 DATA 00,15,15,15,15,00,00,15,15,15,15,00,00,00,00 DATA 15,00,15,15,15,15,15,15,15,15,00,00,00,00,00 DATA 00,00,00,00,00,00,15,15,15,00,00,00,00,00,00 DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00 DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00 DATA 00,00,00,00,00,00,14,14,14,00,00,00,00,00,00
SCREEN 7, 0, 1, 0 CLS
FOR y = 0 TO 14 FOR x = 0 TO 14 READ DotColor PSET (x, y), DotColor NEXT NEXT
DIM imgDuck(15, 15) GET (0, 0)-(15, 15), imgDuck CLS
done = 0 speed = 2 x = 0 y = 0
KeyRight$ = CHR$(0) + CHR$(77) KeyLeft$ = CHR$(0) + CHR$(75) keyDown$ = CHR$(0) + CHR$(80) keyUp$ = CHR$(0) + CHR$(72)
WHILE done = 0 CLS PUT (x, y), imgDuck PCOPY 1, 0
k$ = UCASE$(INKEY$)
SELECT CASE k$ CASE KeyRight$ x = x + speed CASE KeyLeft$ x = x - speed CASE keyUp$ y = y - speed CASE keyDown$ y = y + speed CASE "Q" done = 1 END SELECT
WEND But the code that only makes PSET calls does not? The PSET-only approach looks like this: duck: DATA 00,00,00,00,00,00,00,00,00,00,12,12,00,00,00 DATA 00,00,00,00,00,00,00,00,00,00,15,15,00,00,00 DATA 00,00,00,00,00,00,00,00,00,15,15,15,15,00,00 DATA 00,00,00,00,00,00,00,00,00,15,15,00,15,00,00 DATA 00,00,00,00,00,00,00,00,15,15,15,15,15,14,00 DATA 00,00,00,00,15,15,15,15,15,15,15,15,15,14,14 DATA 15,00,15,15,15,15,00,15,15,15,15,15,00,00,00 DATA 00,15,15,15,15,00,15,15,15,15,15,00,00,00,00 DATA 15,00,15,15,00,15,15,15,15,15,15,00,00,00,00 DATA 00,15,15,15,15,00,00,15,15,15,15,00,00,00,00 DATA 15,00,15,15,15,15,15,15,15,15,00,00,00,00,00 DATA 00,00,00,00,00,00,15,15,15,00,00,00,00,00,00 DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00 DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00 DATA 00,00,00,00,00,00,14,14,14,00,00,00,00,00,00
SCREEN 7
done = 0 speed = 2 x = 0 y = 0
KeyRight$ = CHR$(0) + CHR$(77) KeyLeft$ = CHR$(0) + CHR$(75) keyDown$ = CHR$(0) + CHR$(80) keyUp$ = CHR$(0) + CHR$(72)
WHILE done = 0 CLS FOR i = 0 TO 14 FOR j = 0 TO 14 READ DotColor PSET (x + j, y + i), DotColor NEXT NEXT RESTORE duck
k$ = UCASE$(INKEY$)
SELECT CASE k$ CASE KeyRight$ x = x + speed CASE KeyLeft$ x = x - speed CASE keyUp$ y = y - speed CASE keyDown$ y = y + speed CASE "Q" done = 1 END SELECT
WEND Correction: FreeBASIC runs it the same just a little bit better performance-wise. I guess the problem is PSET? Probably that double innested FOR loop is causing some indirection everytime you read a new column. Try to use a single For loop? Wolrfenstein 3D, for the particular 4 bank VRAM of the hardware of that time, draws 4 pixels at the time, reducing cpu cycles. Also the switch case could be very slow for branch prediction reasons... did you try to remove the switch case for the keys, to see if that is the cause?
|
|
|
|
|
873
|
Developer / Technical / Re: The grumpy old programmer room
|
on: December 12, 2017, 01:18:05 AM
|
I guess I am grumpy. I have a question. Does anyone here know -- I hope someone does -- whether it is possible to create a DOS game, say a single level of Bubble Bobble, using QBasic? I know it is. But my question is, can I make it run fast enough on a PC 486? I'm using DosBox and whatever kind of graphics I try to draw using QBasic runs so slow I can see it "unfolding" on the screen. The image does not appear instantly. Rather, it literally "unfolds" in front of me. I can see it being drawn. And it does not matter whether I am using an interpreter or a compiler. It is the same either way. Do I have to use something else? Borland C++ with assembly? Google didn't help me much.
IMHO, you can make a Bubble Bobble clone using QBasic, there are games made in Basic so it is possible. 486 is more than enough for this kind of game, the 386 ran Wolfenstein 3d (even if there were a lot of performance wise design choice). If it is slow, did you check if in DOSBox you setted the correct Mhz emulation? Did you have previous experience in making a game from scratch, without using an already made engine like Unity? Because maybe the game is slow because there is something in the code that it's iterating too much.
|
|
|
|
|
874
|
Developer / Technical / Re: The happy programmer room
|
on: December 11, 2017, 01:08:29 AM
|
 dash and jump implemented B) Next is probably grabbing items. I have other stuff implemented, but I don't want to give away the kind of game it is at the moment.  Very nice!  It reminds me a dance floor, you could add some disco ball, and you have the game of Saturday Night Fever! 
|
|
|
|
|
875
|
Community / DevLogs / Re: Ordnas 2D platform ideas. Contains: prototypes, humor, extravaganza.
|
on: December 08, 2017, 10:32:20 AM
|
During the Middle Ages, the King ate an exotic food that legends called Enchilada, and now he cannot stop farting. Help him to find the Magic Stone, deep into the forest, and to reclaim his butt!
The game has some humor, trying to make a laugh to the player and incentivate him to continue to play. The double jump is made with particle / sound fx to simulate a fart, to make something unusual and funny. I took in ming every player skill, but intended for hardcore platform gamer mainly for the treasure positions. The treasure are there for a purpose: the player will discover that he/she needs to have 7 treasure chest to see the secret room, so it is a way to try to incentivate the player to push his/her skills in more harder moves to collect the missing treasures. With this method the game can be expandend, blocking the player in moving to the next level if did not collect enough treasures (I took inspiration to The End is Nigh of Edmund McMillen ). Probably the prototype is not challenging enough for various reasons, mainly because I found during playtesting with friends that starting a game with an hard difficulty could be a bad design to incentivate to continue to play, and also the rooms were a bit too small to place nice level design ideas, probably a Zoom Out of the camera could be beneficial. I made it at home in a month during free times (in about 16 hours). To play it, right here: https://ordnas.itch.io/fart-king-in-the-forest
|
|
|
|
|
876
|
Community / DevLogs / Ordnas 2D platform ideas. Contains: prototypes, humor, extravaganza.
|
on: December 08, 2017, 09:55:29 AM
|
I opened this Devlog as a place to show some platform game ideas, only here on TIGsource forum, trying to post a small game idea every month. At my daily job I work as a programmer, but I want to experiment my game design ideas on my free time. I believe making prototypes to test and iterate small ideas is a right way to start, so here I am!  At the moment, only platform games (I love them!  ) Everyone is free to post suggestions, ideas, tell me to go to hell, everything is accepted  To support please follow me on Twitter: https://twitter.com/CaprioloOrdnasJune 2019 - Conformity: https://forums.tigsource.com/index.php?topic=63415.msg1407624#msg1407624April 2019 - Don't Drop The Cake: https://forums.tigsource.com/index.php?topic=63415.msg1404552#msg1404552September 2018 - Rocky Knight: https://forums.tigsource.com/index.php?topic=63415.msg1392313#msg1392313July 2018 - Pixel Dungeon: https://forums.tigsource.com/index.php?topic=63415.msg1387895#msg1387895May 2018 - Travelers: https://forums.tigsource.com/index.php?topic=63415.msg1382774#msg1382774April 2018 - The Enchanter: https://forums.tigsource.com/index.php?topic=63415.msg1377845#msg1377845February 2018 - Atomic Cathode: https://forums.tigsource.com/index.php?topic=63415.msg1374102#msg1374102January 2018 - Alone: https://forums.tigsource.com/index.php?topic=63415.msg1368706#msg1368706December 2017 - Fart King in the Forest: https://forums.tigsource.com/index.php?topic=63415.msg1365746#msg1365746
|
|
|
|
|
877
|
Player / Games / Re: What are you playing?
|
on: December 06, 2017, 12:53:44 AM
|
Dragon Quest V is very good and distracting me from playing games I should for GOTY coverage.
it is! are you playing the ds version or snes or ps2 (latter two fan translated)? DS! i just married debora, who is very shitty in a fun way I played the 5th long time ago (DS version), but never completed it. I think I will go directly to XI 
|
|
|
|
|
878
|
Developer / Technical / Re: The happy programmer room
|
on: December 06, 2017, 12:46:17 AM
|
Are you drawing back to front? I remember a while back i hit a nasty perf bug on PowerVR because I used the depth buffer with discard and that apparently disables a tone of hardware optimizations.
Probably not a big deal but I thought I'd mention it. I shouldn't have been using the depth buffer for a 2d game anyways.
Depth buffer could be useful even in a 2d game, for example in lighting (determining the correct position of the sprite) and also for rendering the shadow geometry with depth testing, to properly layer the shadow between other objects.
|
|
|
|
|
879
|
Developer / Technical / Re: The happy programmer room
|
on: December 05, 2017, 12:45:24 AM
|
When I kept valuable code on a laptop I would use a dedicated encrypted partition. That way, if things were stolen, nobody would get the code, they'd just get a laptop that they'd probably end up wiping. I would then periodically sync to a trusted machine (in my case at the time, Subversion commit to another machine). If things got damaged (laptops bounce around a lot) then I'd just lose my work since last sync. It also saves messing about with encrypting individual items. All you need to do is decide whether a particular file or asset belongs on the encrypted partition or not, which is usually based on its importance and size. Also, the primary origin for everything stored on the laptop was elsewhere. Apart from perhaps my last few hours work, everything else had its primary origin elsewhere, and was copied *to* the laptop. The loss of the laptop at any time would have been unfortunate, but never devastating to the project I was working on. I hope this helps, and perhaps inspires some other approaches you might take in the future.  It is helpful. Currently I don't have a paid server that I could use to make something so smooth like that - which is why I'm thinking about using MEGA. Sounds fair enough. Some other options are a PC in a secure location, or even just an external drive that you sync to that you store securely. As long as the data is in two locations, you can withstand the loss of one. IMHO, I would not trust too much on MEGA, it is being used heavily for piracy high-speed sharing like the old Megaupload, and also it is from the same proprietary Kim Dotcom. I will not be surprised if it will close all of a sudden.
|
|
|
|
|
880
|
Developer / Technical / Re: How I wrote my own 3D game engine and shipped a game with it in 20 months
|
on: December 04, 2017, 01:17:41 AM
|
I see open-source as being a free teacher. You don't have to support anything! If you want to use the code you'll have to figure it out. Closed-source is like hiding free knowledge though... it's bad! And gaming is full of it.
Software you are praising of releasing open-source software are just that companies that you are pointing that finger, releasing before closed-source programs, and are able to distribuite free their source code just because they already earned the money (directly from it or from other sources) and/or the software is already an old technology / not competitive (aka not profitable). Firefox is open-source, but they earned $421.3 million just in the 2015. id software released Doom source after many years, with one of the reason that it was an old tehcnology. Wordpress is one of the most famous open-source software, the company is a non-profit organization, so they are eaning revenues through donations made by individuals, that could be a person like you, or a large corporation that are making money from the platform through advertisements. I do not think there is someone that released an open-source software without the intention to earn money from it in the first place (of course not counting the little copy-paste software you made in just a weekend). Who are these people that released open-source software and did not make any profit?
|
|
|
|
|