Jump to content

ChrisMAN

Members
  • Posts

    174
  • Joined

  • Last visited

Posts posted by ChrisMAN

  1. The editor automatically converts textures from formats like PNG, TGA, BMP, JPG, DDS, PSD, etc.

     

    I am looking forward to this. I am about ready to use a system file watcher that hooks in to image magick that hooks in to the nvidia legacy dds cli tools.

  2. In Unity to get a persistent obj across scenes you needed to load a dummy scene and specify it to not get cleaned up by the next scene load and grab the data out of a hash. It is an endless fight with the crappy abstractions.

     

    Also, native code is faster and more flexible than the walled garden of managed code. 98% of AAA games (not an actual statistic, but probably accurate still) are built with native code, not C#. Even most iOS games are built on native code.

     

    I would also be hesitant to rely on a closed-source proprietary compiler like Mono. The company has a rocky past, and I don't know if managed code is very future-proof.

     

    So native code (C++) is where I would put my bets, with Lua for fast and easy scripting (still running in C++).

     

    Microsoft is working on Roslyn which will offer similar capabilities as mono's compiler as a service. I don't know if it will be able to emit byte code cross platform. My bet is that it will so that microsoft can transition the .net devs to other platforms.

     

    http://en.wikipedia.org/wiki/Microsoft_Roslyn

  3. Autocomplete is not posible with lua do to the fact that it is dynamic and has lots of hidden closures. There is a version which is achievable by finding words that are around the text you have written and using those. The actual functions built into the language can be autocompleted such as table.insert.

     

    Attempts can be made to try to use static analysys https://github.com/XuJiandong/lua-ctags and will get you further, but will always let you down.

     

    Unless your code editor shares the same lua state/context as the running application autocomplete is never going to be as good as you are used to in a static language.

     

    It is generally better to have good syntax highlighting and develop skills with grep/ack. This is the price you pay for using a dynamic language which I consider to be worth the exchange for speed of development and flexibility.

  4. Aggor's work is probably the best resource I have found. It is priceless.

     

    First: Read every script in the script folder. If you don't you are missing out.

     

     

    You can kind of assume that the Lua library has most of the c and c++ api. The more you use it the more little wired things you find. The wiki has quite a few errors in it but incredibly valuable. I don't think a lot of really advanced stuff has been published for lua so you will have to adapt the c/c++/blitz fragments to lua.

     

    The first lua challenge is to learn self and its OO model through metatables.

     

    The rest is programming soul. Lua is the 5th language I have learned. I have read the lua manual atleast 3 times. The have read the section on tables way too many times. I scoured github's most watched list and read probably 30 open source projects writen in lua. Lua is a very hackable language do to the fact that it has primatives, functions, metatables, and userdata. Looking at other people's code is very inspiring. If you don't care about productivity try writing a piece of reusable code around a problem that you have to solve frequently.

     

    I am in the middle of writing a gui library. I have 100 hours spent on that stupid gui. I have learned a ton from it. I am a web guy, and in web land if you are a senior web guy almost all of the coding problems are solved and you are only good if you can make a product that people like so a good gui library is very important to me since I feel it adds a lot of finesse to the user experience.

    • Upvote 1
  5. I use vim + syntastic catches some of my dumb mistakes. I also use assert a lot. For a manly .vimrc checkout https://github.com/f...r/vim-settings.

     

    Compilation doesn't save you from logical mistakes. That is what unit tests are for. For lua I have been using busted. I havn't gotten it to build on windows yet. It works out of the box with *nix.

     

    https://github.com/Olivine-Labs/busted

     

    There is definitely tooling to help manage the complexity.

  6. The bones are exported by default with gmf. If you save a obj you will lose your bones. You have to go from blend to gmf. Blender 2.64 redid a lot of there collada stuff but i havn't tried it out. Be sure that your material has skinning on.

     

     

    texture0="abstract::crawler.dds"

    texture1="abstract::crawlerdot3.dds"

    shader="abstract::mesh_bumpmap_skin.vert","abstract::mesh_diffuse_bumpmap_specular.frag"

    shadowshader="abstract::mesh_shadow_skin.vert"

    • Upvote 1
  7. Leadwerks ships with fbx2gmf.exe which is in the tools directory. Some words of wisdom / stupid mistakes I have made...

     

    Blender exports hidden objects

    Converted gmfs look for a dds texture with the same name you specified in blender

    If you are using Skinning be sure to set the material that supports it

  8. Not being good with c++ is a serious impedance to making a game. Not knowing the graphics subsystems is just about as bad. Can I trade in my l33t web skills for low level and compantency with math?

  9. I am drawing a buffer on to another buffer on to the back buffer. I could probably render all of the pieces on a flat higharchy.

     

    It's wierd because the colors are getting inverted based upon whether i am drawing on the same frame as its rendering

  10. i use events and promises for virtually everything.

     

    you can't block the thread which sleep will do.

     

    you need something attached to the update loop like an entity or you can make an object and call it every frame.

     

    this isn't very elegant but it works

     

    void endgame(callback) {

    this.end_game_callback = callback;

    this.start_end_game_animation = true;

    }

     

    void Update() {

    if (this.start_end_game_animation) {

    if (this.timer > 4000ms) {

    this.start_end_game_animation = false

    this.end_game_callback()

    }

    }

    }

     

    if you do megatron's idea just set a variable and poll them on every frame. when certain states are true change the actions that are happening.

  11. I posted a gist describing the effect. download as start.lua and run engine.

     

    https://gist.github.com/3971641

     

    I am switching buffers and issuing drawing commands. The output drastically changes based upon whether or not I am drawing on the current frame. When there is no drawing on the current frame it renders more how i would expect it.

     

    I am lacking intuition on how buffers work so any help is welcome.

     

    Thanks

    Chris

  12. I am not a computer scientist, but I am extremely cautious about saying javascript isn't fast. V8 is amazing. I don't think there is a VM that gets more love than V8 except for maybe Java. Ecma 6 is going to have type hinting and native map reduce. I think there going to be control over the GC too. Plus as a rule of thumb: never bet against web and javascript. A ton of languages are targeting javascript now.

     

    https://github.com/kripken/emscripten

     

    https://developer.mozilla.org/en-US/demos/detail/bananabread

     

    Granted being said I wouldn't bet on it right now. A couple years maybe. A game is something you can force a user to use a real browser(not < ie 9) to use. It is going to get interesting though.

  13. Can buffers have transparency?

     

     

    buffer1 = CreateBuffer(50,50, BUFFER_COLOR)
    SetBuffer(buffer1)
    SetColor(Vec4(1,0,0,.1))
    DrawRect(0,0, 50, 50)
    SetBuffer(BackBuffer())
    while AppTerminate()==0 doDrawImage(GetColorBuffer(buffer1),
     400,
     300,
     50,
     50)
    end
    

     

    The result is a fully red square.

×
×
  • Create New...