Jump to content

What stops us from reusable code?


Rick
 Share

Recommended Posts

Clackdor : Preparing code to be reusable for the community is a chore. Documentation, flexibility, etc are all things that you must consider when sharing your code, whereas when you write it for yourself, the lazy among us (everybody) can take shortcuts.

 

 

I agree that we can all be a little bit lazy, but I feel as a inherently lazy person myself, that actually writing documentation can save you a lot of time. Making your code modular, refactoring it so it works with other code, commenting your code and even going to the trouble of writing documentation can help you make it more manageable and extendable. Going for a quick fix that works at the time, might get it working for a short while, but it can lead to problems down the line. I personally found writing tutorials and making a wrapper for Java to be a very valuable learning experience. If you try to teach someone else you learn a lot yourself.

I have been getting in to Lua a lot more recently with making characters and have found there to be a lack of tutorials on how to script objects for use in the editor. This has meant that I had to do the hard work of actually working it out using the code that is in the script folder and some examples in the asset store. Ricks Pi things are very well put together and really show how powerful the Lua scripting is. It would be good if more people shared there code in Lua as it is useable by each language. If there were more code examples of how to do simple things it would really help. Not fully working large libraries that take a while to learn and are hard to maintain, but code snippets that do a simple thing that you can learn from and use in your own code.

Link to comment
Share on other sites

I personally found writing tutorials and making a wrapper for Java to be a very valuable learning experience. If you try to teach someone else you learn a lot yourself.

 

Agreed I find tutorials more useful than code sharing and I'm way more comfortable sharing my knowledge of integrating RakNet into Leadwerks through tutorials rather than simply spoon feeding code. Especially with networking because you simply can't copy past.... all games are different. Some things are just better to learn.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

I've often thought a lot but this topic and I'd long come to the conclusion that the solution is...somewhere in the middle. You simply cannot package up every part of a game ready for plug 'n' play for another programmer. There is, however, a sweet spot - Each major component isolated and given a nice API. This is what you want. They provide the bricks, you provide the mortar. Its also more or less what LeadWerks 2 seems to have always tried to be, and succeeded in many ways.

Personally I think most take for granted the lib's we're all already using - rendering, physics, controllers, etc. LE3D sounds like it'll include many more isolated package such as AI to make it all feel much more complete.

It remains to be seen, but between LE3D and a maybe Boost you would have a pretty damn nice set of packages to pull together to develop some nice clean cpp code.

 

The next step for me would be logic examples - The mortar inbetween those bricks. This is the stuff I think we struggle to share as its often laden with our own style of coding and language. The only way I see this improving is better tools to support the sharing. This has already been discussed very recently in another thread so I don't go too far with it, but in my opinion the key a modern community wiki that supports code snippets for various languages.

Programmer, Modeller

Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64

Visual Studio 2008 | Photoshop CS3 | Maya 2009

Website: http://srichnet.info

Link to comment
Share on other sites

What I mean is that in C++, you have to include headers, add .cpp files into a project, then you usually have a lot of dependencies, macros defined in the project, and probably some other things I am leaving out

 

I have never once in my life included a single .cpp file in a project.

 

I get that, but adding 3 headers and 3 source files is just as easy as adding 1 source file in my view. Now you can still say you haven't done that either, BUT I would say that's because libraries are solving much bigger problems. Small snippets of code are solving much smaller problems. If the design you are doing with Lua is more for people to make these smaller scripts that solve smaller problems and be able to combine them to solve a bigger problem, that same thought process can be transferred to C++. Just because it's C++ doesn't mean I have to treat it differently in functionality. If I write a Lua script for LE3 that just takes an entity as input and rotates it, if the same structure is setup for C++ I can write a class in C++ that does the exact same thing. It'll be 1 header and 1 source and probably 10 lines of code. A person would take that, include it in their project, then in the sandbox editor define that they want that functionality (defined by name or whatever) to be attached to x model and now it works.

 

This is basically how Half-Life works. The Hammer editor, just like 3DWS, has functionality entities. These entities are directly mapped to C++ classes in code and these classes are often self contained and small. In the editor you pick 'tie to entity' assign that entity the entity functionality you want, fill out parameters, and when you run the game it passes that to C++ in which the objects get created and ran. This is almost exactly what you are doing in Lua and so it can be done in C++. I get that you haven't experienced this in C++ before but it does exist and can be done.

 

 

Pathfinding and AI are normally a big system that interacts with lots of different parts. Guns shoot enemies, paths have to be loaded or calculated when a map is loaded, AI has to interact with the path data.

 

I have both of these in the works using thingoids directly with the current LE editor. It won't be perfect, but I'm trying to show that these components can be separated out and smaller and that they don't require external editor dependency. As long as a common interface is defined people can write their own AI script that use that common interface to get pathfinding data. In LE2 one of the drivers for this is the target system (a common interface). It's sort of clumsy to work with but it's all we have in LE2.

 

I also think Zaphos is a great example of what I'm trying to get at and understand why more people don't do or join in on. He has defined bones and their names for all characters he's doing. That is the common interface for his character models. Now think if everyone accepted that and would create 3D accessories for his models that follow his bone and naming conventions (his interface). People could sell their models and advertise that they work with Zaphos character models right out of the box and make money indirectly from Zaphos. It would benefit the community in such a fashion I can't even imagine.

 

The only way I see this improving is better tools to support the sharing

 

I believe a common interface for coding is a logical tool that can be provided by us or LE.

Link to comment
Share on other sites

For the last couple of months I have been working a program that will create the framework for you. The framework will be built based on what you need or want. It will ask you a series of questions and how you answer will determine what is included in the framework. Then it will guide a non-programmer through taking input and adding it to the framework. It will be nice for the advanced programmer also. If you do not wish to use the main framework for a video game you could pick from the library of blocks of code.

Link to comment
Share on other sites

  • 2 weeks later...

Most of the problem, people do not write code for anyone else applications, so their code usually isn't portable. This would add extra time to them, and most do not want nor have the time (if they want to complete their own projects) to maintain a "lib" ..

It can be done, it just takes a dedicated community to decide that their success can be part of a group success...

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

Most of the problem, people do not write code for anyone else applications, so their code usually isn't portable. This would add extra time to them, and most do not want nor have the time (if they want to complete their own projects) to maintain a "lib" ..

It can be done, it just takes a dedicated community to decide that their success can be part of a group success...

I couldn't agree more, that sums it up nicely. The only thing I would add is the developer can aid this process greatly by providing things like a plug-in architecture for the engine tools, something that tends to act as a catalyst and encourages community development.

 

I have to say I do have sympathy with Ken's point of view, which basically boils down to ... those who can do, those who cant b_i_t_c_h until someone else does it for them :P Too many people want it handed to them on a silver platter these days and as Ken points out (and I've previously stated) you learn little to nothing from that; assuming anyone is generous enough to do it for you in the first place!

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

I have to say I do have sympathy with Ken's point of view, which basically boils down to ... those who can do, those who cant b_i_t_c_h until someone else does it for them :P Too many people want it handed to them on a silver platter these days and as Ken points out (and I've previously stated) you learn little to nothing from that; assuming anyone is generous enough to do it for you in the first place!

 

 

+1

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Woops I deleted my post by mistake instead of editing it... oh well. you summed it up well enuf pixel.

 

For all those that didn't read it It can basically be summed up as:

1. Screw Sharing :P

2. Tutorials and Examples are better. People actually learn something that way.

3. I don't want to give my code that I worked my bum off to create away to just anyone. I'm not a charity.

4. Yes I will bloody well reinvent the wheel but my wheels are not made of stone or all-terrain wheels... my wheels are mag wheels with blue rims and low profile tyres because that's what I need for my game dammit so I'm going to bloody well code it myself and re-invent the wheel 10000000 times if I have to, to get it the way I want it.

5. I don't want to copy paste other peoples code... as I said I don't want an all-terrain wheel.. give me an example or a tutorial and I'll run with it.

6. Good riddance to this thread.

7. If we didn't waste so much time talking about stupid topics like this some games might actually be made. (ahem.. Guess a Number and Simon Says don't count)

8. Quit your B_I_T_C_H_I_N_G people and get on with making some games. You are pissing off the majority of people that can actually use this engine properly and scaring them away. More than a few have left to other engines already.

 

I'm probably going to get flamed for this but you know what they say "The squeaky wheel gets the oil". And dammit the wrong wheel has been squeaking for too long! Time for me to squeak.

 

Peace ;)

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Woops I deleted my post by mistake instead of editing it... oh well. you summed it up well enuf pixel.

 

For all those that didn't read it It can basically be summed up as:

1. Screw Sharing :P

2. Tutorials and Examples are better. People actually learn something that way.

3. I don't want to give my code that I worked my bum off to create away to just anyone. I'm not a charity.

4. Yes I will bloody well reinvent the wheel but my wheels are not made of stone or all-terrain wheels... my wheels are mag wheels with blue rims and low profile tyres because that's what I need for my game dammit so I'm going to bloody well code it myself and re-invent the wheel 10000000 times if I have to, to get it the way I want it.

5. I don't want to copy paste other peoples code... as I said I don't want an all-terrain wheel.. give me an example or a tutorial and I'll run with it.

6. Good riddance to this thread.

7. If we didn't waste so much time talking about stupid topics like this some games might actually be made. (ahem.. Guess a Number and Simon Says don't count)

8. Quit your B_I_T_C_H_I_N_G people and get on with making some games. You are pissing off the majority of people that can actually use this engine properly and scaring them away. More than a few have left to other engines already.

 

I'm probably going to get flamed for this but you know what they say "The squeaky wheel gets the oil". And dammit the wrong wheel has been squeaking for too long! Time for me to squeak.

 

Peace ;)

 

+quite a few

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

1.

2.

3.

4.

5.

6.

7.

8.

 

Peace :P

 

LOL. someone piss in your cereal? I prefer tut's myself. I wanna learn, not just copy/paste. That doesn't do may any good either.

 

Of course there as some "libs" that are worthy of maintaining.. ;)

 

OOOO.. and tank you VERY much for your RakNet tut. I really appreciate it.

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

Too many people want it handed to them on a silver platter these days and as Ken points out (and I've previously stated) you learn little to nothing from that

 

I just don't understand where the line can be drawn then I guess. Who are we to judge others when we aren't creating all our own shaders to use in our games? We didn't make our own deferred rendering system. We didn't make our own physics library. Why is it OK to share that code and not learn how that code works but not OK if someone wants to use a 3rd person script and doesn't fully understand how it works? I know you said before you aren't judging but with that comment you are. I think it's a slippery slope to be drawing lines in the sand saying someone wants it handed to them when we are getting things handed to us by Josh and other 3rd party libs like RakNet, OpenAL, & Newton.

 

People come here to make video games. There are an endless number of ways to make a video game, why would we care about how someone goes about doing that so much? If the method works, and the game is fun, should we really care how that person went about it?

 

I would venture to say the person who made a small mobile game in Unity that used predefined components (because Unity has a decent amount of them) has learned more about completing and shipping a game than any of us here. I doubt he really cares if he doesn't know how that pathfinding component exactly works.

 

 

That being said Roland has a cool system he's working on and some people are giving input. There is no harm in that and it does not affect someone who doesn't want to use it. I believe letting people talk about design is no harm and only helps the community.

 

 

(ahem.. Guess a Number and Simon Says don't count)

 

I would encourage anyone to finish a game. Practice finishing games, no matter how lame and stupid they are, is good practice and time well spent. I've read over and over again from experienced game developers that say start small and FINISH a game. There are a number of reasons why finishing a small game helps. The main one being does one have what it takes to get past the boring stuff. In every game there is the boring stuff that has to get done. I would venture to say if one can't get past the small amount of boring stuff that is involved in a simple game then there is no way one could do it in a complex game (which of course we all want to make). If a game has actual gameplay components I would never make fun of someone for completing it because I know how hard it is to do such a feat and many people here have never done it. Which helps explain why there are only 5 games in the Asset store. Lum's first tetris game on the old forums doesn't count of course :P

Link to comment
Share on other sites

I just don't understand where the line can be drawn then I guess. Who are we to judge others when we aren't creating all our own shaders to use in our games? We didn't make our own deferred rendering system. We didn't make our own physics library. Why is it OK to share that code and not learn how that code works but not OK if someone wants to use a 3rd person script and doesn't fully understand how it works? I know you said before you aren't judging but with that comment you are. I think it's a slippery slope to be drawing lines in the sand saying someone wants it handed to them when we are getting things handed to us by Josh and other 3rd party libs like RakNet, OpenAL, & Newton..

 

 

Thats a straw man argument given the clear context in which Ians comment was framed which was not about the API or Libs, but the code to make use of them.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I am really trying to figure out what/who he is really mad at? Is it because we all haven't made a AAA game from an engine he is using, so that some how affects him, or is it, that he didn't get enough input on one of his questions about code, so now he is mad at the whole LE site?

 

I still think sharing code with each other is fine. No one has to maintain huge libraries or controller classes or any of that, but if you want to be a part of a Game Engine community and your not selfish and only out for #1, then share. If not then I feel bad for you...

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

The "handed to them" comment is often brought into the argument when one tries to make libraries and systems that don't require direct coding but perhaps configuration of predefined components (ie something like FPS which clearly is the butt of many jokes). Predefined components that we share is what the topic at hand is about. So therefore when that comment was made I figured it was around the topic at hand. If it was just a general comment and not directly related to the topic then I apologize. If it was, them I'd say my "who draws the line" is still valid. Unless someone is saying that just because of the act of programming (typing out code) is required to use API's makes it mean it's not being handed to them, because I'd argue that point. I'm clearly being handed networking to me on a silver platter because of RakNet.

 

 

 

I still think sharing code with each other is fine. No one has to maintain huge libraries or controller classes or any of that, but if you want to be a part of a Game Engine community and your not selfish and only out for #1, then share. If not then I feel bad for you...

 

I don't know if that's fair. If a person wants to share or not is their decision and I won't hold it against them. The system I'm talking about in this thread allows sharing for free or for a fee. If the infrastructure is in place and solid and everyone is using it, then programmers will code for it and can sell their code components and people would be more willing to buy it because it plugs right into the system they are using. A strong community doesn't always have to equal free in my eyes and honestly I think some of the strongest communities charge because it makes a market and people are generally more motivated in doing something if they know they'll get a return from it.

Link to comment
Share on other sites

Your right its not fair. I am merely trying to point out, what we do as s community should not directly effect any one member. His comments, I took as that it has affected him, and that is out fault somehow. Maybe I'm reading it wrong.

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

I'm confused by his anger as well and just going with he's frustrated with something else so not taking it personally. I'm trying to make the argument that if there were a common interface in this game engine it would open the door for programmers to make some money from their hard work. I'm a programmer and I want to make money from making components for this community. The market just isn't there because this engine is so fragmented and/or Josh doesn't want to come up with a system because he feels he'd be forcing people. I'm even saying it doesn't have to be the only thing he goes with. I say keep the API as it is for those who want free range, but build a system on top of it for those who want these common components because there is a market for it, but only if the system is in place and nobody is going to buy code created for a user created system because tomorrow that programmer will be gone and then you're stuck (yet to see if LE3 will be that system and some might say wait and see, but that's what everyone said about LE2, combine with Josh's hesitation to let code be sold on the asset store).

Link to comment
Share on other sites

I agree with you. I would love to see a code store. There is simply things I have not been able to get past yet, and a lot of that would help me.. And yes, I don't mind paying for it either. I have never asked for a hand out, and I never will.

 

:P

 

on a plus side, I think that might actually bring more people, not less, as there are some that are scared of coding from scratch a game, and frankly, that's pretty much what you have to do with LE... I love what this engine can do, but it can be intimidating.

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

I have never asked for a hand out, and I never will.

 

I think the truth of the matter is nobody has really asked for a handout to the extreme level some think. Nobody here is asking from someone to write their entire game for them. I've never seen a comment like that at all that maybe wasn't from the very first and last post of a new member. That's why I point out comments like "people these days are asking for handouts." Those comments are in line with "things were better in my day" or "kids respected adults in my day".

 

Thinking that asking for a handout directly relates to creating a common system so that there is a market for programmers to make money and artists and designers to make games just doesn't make sense to me. I'm sure that's what people said before there were grocery markets. I mean why can't you grow your own corn and raise your own cows and chickens to make your dinner? No thanks, but I do grow my own corn, but I would rather buy the chickens and combine the 2 to make my meal (game).

 

I honestly think anyone who thinks they'll make the next WoW or Crysis by themselves without a huge amount of help is kidding themselves. If finishing that game is what really matters to you, then take the help of components both in the code area and art. If you just want to learn how things work then by all means code every system yourself in your spare time. Just don't get mad when you don't finish that game.

Link to comment
Share on other sites

The comment was not aimed at you Rick or the basic premise of having community content or re-usable code, but more a response to what Ken was hinting at, that there are those who no matter what you do it will never be enough because they basically don't want to code but on the other hand don't want to team up with a coder. Sure we all rely on other peoples code, Leadwerks itself relies on the OpenGL Libraries and Newton Physics Libs, that's not the issue. If people want to get together and produce shareable code then that's great and admirable, but no-one can expect that as a basic right. If it happens it happens, if it doesn't it doesn't. That's life! That was all I was saying really.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...