Jump to content

Josh

Staff
  • Posts

    23,232
  • Joined

  • Last visited

Everything posted by Josh

  1. http://cboard.cprogramming.com/cplusplus-programming/38020-vector-references.html
  2. I'm just joshing you, Roland. References seem good for classes like Vec3's, where you have a lot of temporary objects you want collected when they are no longer in use. Pointers seem more suited to objects that get created and deleted infrequently, like entities. Since references can't be NULL, it makes commands like TFormPoint() very awkward, where one of the arguments can be NULL. There is a way around that, by declaring an overloaded version that accepts an integer. However, my experience is memory management is more trouble than it saves when used for objects that have lots of connections that have to be manually removed when they are deleted. Oh yeah, and you can't make a list of references. Math classes like Vec3's, AABB's, Mat4's, etc. will not be exported in the library for use with external languages. The external language will be responsible for creating these, and they can either be a block of memory the appropriate length, or an actual structure. All the library cares about is that you send it a pointer to a memory position with enough space to read or write the number of floats it needs. This is how the DLL works now.
  3. Queering an object state? I will disagree in that public members are very useful, i.e.: x = entity.position.x; Some of Mika's suggestions are cool, but it's a lot of work to declare all those overloaded methods, especially since all functions have to be declared three times (the function, the header, and the luabind structure). I think the Get/Set method should be what we do everything in, and if we add other niceties for convenience, we will deal with it then.
  4. Agreed. The C# header is okay the way it is, but in version 3.0 I think the syntax should match C++. I will question a lot of basic design elements in the next few months. Keep in mind it is because I want to make sure we are designing 3.0 the right way. The command reference database I created is for version 2.x. A lot of it can be copied to a new database for 3.0, and we will make whatever changes are needed.
  5. We would not have an equivalent to this: entity.SetPosition(1,2,3) ...because we can only assign one value. We could do this: entity.position.x = 1; entity.position.y = 2; entity.position.z = 3; ...but this would involve a separate hierarchical matrix update for each line, so it would be very suboptimal. Yes, and unless I am convinced otherwise, this is the approach I intend to use in 3.0. I am not so concerned about the current C# header that anything has to be rewritten. I am more interested in determining a consistent design for the future.
  6. That's what I figured. Is there any way to pass an extra variable along with the assignment, that the get/set method can process? We can do the same thing in C++ and even Lua: http://www.rasterbar.com/products/luabind/docs.html#properties I am not sure this is the best approach in v3.0. I believe it eliminates the ability to have an extra argument, and thus changes our command paradigm a bit. What do you guys think? This should be decided and made consistent for everything in 3.0. We're either looking at: entity.SetPosition( 1, 2, 3, True ); ...or this: entity.globalposition = Vec3( 1, 2, 3 );
  7. So when you assign this value, there is a set method that gets called internally?: myEntity.Position = new Vector3(1.5f, 2f, 4.5f); Is it customary to call the base class "core"? If not, wouldn't "engine" be more appropriate? I don't like this approach because it splits the command into two commands that aren't really even commands: myEntity.Position = new Vector3(1.5f, 2f, 4.5f); myEntity.GlobalPosition = new Vector3(1.5f, 2f, 4.5f); I understand you know more about C# than I do, but I would like additional feedback from other C# programmers.
  8. Why doesn't the C# header do it like this?: entity.SetPosition( Vec3 position, int global ) Why is the .core prefix necessary?: Core.PositionEntity(IntPtr entity, float[] position, int global); Doesn't C# support objects from pointers?
  9. What is Leadwerks? It's an engine, but as we abstract out parts of the code in version 3 it's also a specification for how things should work, like OpenGL is.
  10. Josh

    smak

    Looks cool.
  11. Can you type what C# syntax documentation would look like for PositionEntity(), in this thread? That's what I am getting at.
  12. There are about three different ways of generating mipmaps on the GPU, and they all have their own individual driver issues. This is one the reasons I opted to support DDS textures exclusively, with their pre-calculated mipmaps. I recommend calculating your mipmaps on the CPU because I think the GPU-based methods are unreliable.
  13. I like the treeview too for command reference, but it's impossible for frames to work right without filling up the entire page. I wanted to make a treeview table of contents on the left, and the page contents on the right, and have it embedded within the page template, but apparently that is impossible.
  14. I know but if you know the C syntax, you know the BMX and C# syntax, right? Is there any significant way they are different?
  15. 1. Yes. You can release as many commercial or free games as you want. 2. Yes. A discount can be provided for multiple users. 3. There are no other entanglements.
  16. There is a Delphi header generator here: http://leadwerks.com/werkspace/index.php?/files/file/83-delphipascalpurebasic-header-generator/ Because it is a header generator, it should be able to produce up-to-date headers, but I did not make it and can't guarantee its accuracy.
  17. If C# syntax were included, would it need to look any different from regular C? Is there any compelling reason to add a dropdown box for C# syntax?
  18. This is what I was describing. C documentation: http://leadwerks.com/werkspace/index.php?/page/databases/docs?record=1〈=c C++ documentation: http://leadwerks.com/werkspace/index.php?/page/databases/docs?record=1〈=cpp Lua documentation: http://leadwerks.com/werkspace/index.php?/page/databases/docs?record=1〈=lua I'd like to have icons that clearly show what language you are looking at but I am having trouble finding a C icon.
  19. Josh

    set zip password

    Use this syntax: SetZipStreamPassword("pak_file_here.pak", "my_pw_here")
  20. What is a terrain brush? Do you mean the shape of the terrain tool effect?
  21. I am leaning towards using three databases: The reference database contains the engine command set. Each record entered has info for C++, C, Lua, etc. To change the info displayed a php variable will be included in the url, i.e.: http://www.leadwerks.com/index.php?/docs/commands〈=cpp http://www.leadwerks.com/index.php?/docs/commands〈=bmx http://www.leadwerks.com/index.php?/docs/commands〈=lua The database display will choose which syntax and examples to display based on the language setting. The combobox can be used to change the language. The second database is official documentation. This will be separated into categories and pages. This is for stuff that needs lots of pictures and explanations. Aggror will probably be hired to write most of this, if he wants to. The third database is the tutorials database we have now. A new template will be designed to display the tutorials in a nice neat format with the new site template. All the tutorials we have now will still be okay. The front page is where you will access all of this. We'll have some nice big images you click on to go to different area, broken up like this: Art Topics Programming Topics Tutorials C# Reference BlitzMax Reference C++ Reference C Reference Lua Reference ...or something like that. Sound good to you guys? I'm pretty excited about the command reference design, because it allows us to display docs tailored for each language, without it becoming too unwieldy.
  22. Shadow quality is basically the amount of shadow blurring, so it can cause an increase in shadow acne. The best thing to do is adjust your shadow offsets based on whether you think the light will be moving around or just sitting there, and how it is oriented to the room.
  23. http://www.leadwerks.com/wiki/index.php?title=Shadow_acne
  24. The parser is presently adding line breaks into the code text.
  25. Can you elaborate on that more?
×
×
  • Create New...