Jump to content

ChrisMAN

Members
  • Posts

    174
  • Joined

  • Last visited

Everything posted by ChrisMAN

  1. ChrisMAN

    iOS 6 Blues

    Some guy left a comment on that stackoverflow link
  2. ChrisMAN

    iOS 6 Blues

    I wish i could help better... The googles does mention wierdness... http://stackoverflow...in-ios-6-0?lq=1
  3. 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. 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
  4. 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.
  5. ChrisMAN

    Left 2 Do

    For undos i use the command pattern http://en.wikipedia.org/wiki/Command_pattern
  6. 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.
  7. I don't really know opengl but this is the canonical leadwerks article. http://www.leadwerks.com/werkspace/page/tutorials/_/programming/using-opengl-for-drawing-r19 You might have to use a custom buffer and draw that onto the back buffer.
  8. I am in the middle of implementing a tweener in lua. However this tweener needs millisecond accuracy and lua doesn't have the mojo cross platform to do this. So I braved a little c++, which is way out of my comfort zone. #include <boost/chrono/chrono.hpp> #include <boost/chrono/chrono_io.hpp> #include <boost/chrono/process_cpu_clocks.hpp> #include <boost/chrono/thread_clock.hpp> #include <boost/chrono/ceil.hpp> #include <boost/chrono/floor.hpp> #include <boost/chrono/round.hpp> using namespace boost::chrono; steady_clock::time_point current_time; steady_clock::time_point last_time; void update_time() { last_time = current_time; current_time = steady_clock::now(); } long delta_time() { return static_cast<long>((duration_cast<milliseconds>(current_time - last_time)).count()); } voila a timer I was venturing down the road of doing a lua binding but trying to compile against leadwerks lua scared me so I made an empty gmf and send it a message on my main loop and attached a listener. The message gets sent before any of the stuffs happens. Main Loop update_time(); SendEntityMessage(timer, to_string(delta_time()).c_str()); Lua Listener require "scripts/class" local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:ReceiveMessage(message) delta_time = tonumber(message) end function object:Free() self.super:Free() end end Good enough! :shipit: P.S. Tweener+ Promise= Hawt Animations And if my c++ is offensive I wouldn't mind hearing; unless it has to do with the worthless adherence to Hungarian notation. Peace, Chris
  9. I am jazzed. Do'n the friday dance one day early.
  10. 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.
  11. Every object that you export needs to be unwrapped and textured. I don't know if UU3D will resolve the discrepancies but the command line tools that I use export a broken mesh when trying to export your character.
  12. Sorry fumanshoo I meant fbx. I have been theorizing a method using blender's commanline interface to get from blend to gmf. Where is the time?!?!?
  13. 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"
  14. 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
  15. When I recreate the buffer on every frame I get rid of all of the problems.
  16. 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?
  17. 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
  18. How did other people learn how buffers work?
  19. Would it sweeten the pot if I said I will release a lua based GUI kit as soon as I can use this for clipping stuff outside of a renerable area ?? pwetty pwease *kitten eyes
  20. ChrisMAN

    game over

    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.
  21. 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
  22. 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.
  23. SetBlend(1) does the trick http://www.leadwerks.com/werkspace/topic/3394-drawimage-and-transparency/page__hl__transparency
  24. This looks really promising https://github.com/Yonaba/Moses
×
×
  • Create New...