• Advertisement

Merick Zero

  • Content count

  • Joined

  • Last visited

Community Reputation

151 Neutral

About Merick Zero

  • Rank
  1. Realm Crafter

    I'm part of a group working on an mmorpg. We're still in the very early stages, working out the back story, what we want for the skill system, etc.. As none of use has ever worked on anything like this before, we are planning to base this on an already existing game engine. The current favorite is Realm Crafter, but I'd like to get some opinions on it before we commit to anything.
  2. sending tables to a lua function

    I just figured it out with some help from the people in #lua on freenode. Because the function I'm calling is a method, the first table was getting put into the "self" argument, so to fix it I had to push the originating table onto the stack before pushing my argument tables
  3. I'm trying to call a lua function from freebasic, constructing two temporary tables as the arguments. The problem is that the function is only receiving one of the tables. Can anyone help me out? in this code, "ref" is a reference to the lua table that contains the function, created earlier in the program with the lua_ref statement, the table created from the "inputs" array gets passed just fine, but the table created from the "desiredOutputs" array is ending up as nil on the lua side sub neural_net.backwardPropagate(inputs() as integer, desiredOutputs() as integer) lua_getref(L, ref) if lua_type(L, -1) <> LUA_TTABLE then Print "error with ref" sleep system endif lua_pushstring(L, "backwardPropagate") lua_gettable(L, -2) lua_newtable(L) for i as integer = lbound(desiredOutputs) to ubound(desiredOutputs) lua_pushnumber(L, (i+1)) lua_pushnumber(L, desiredOutputs(i)) lua_settable(L, -3) next i lua_newtable(L) for i as integer = lbound(inputs) to ubound(inputs) lua_pushnumber(L, (i+1)) lua_pushnumber(L, inputs(i)) lua_settable(L, -3) next i If lua_pcall(L, 2, 0, 0) <> 0 Then print "ERROR:" Print *lua_tostring(L, 1) Sleep system End If end sub
  4. *SOLVED* [SDL] Help with Map-Editor

    have you tried looking into mappy? http://www.tilemap.co.uk/mappy.php
  5. Removing from Lua dictionary

    ahh! I hadn't realized that, I had been thinking that a key which was explicitly set to nil would still remain in the table
  6. Removing from Lua dictionary

    you can do "mytable[index] = nil", it won't remove the index key from the table like table.remove would, but as long as there are no other refrences to the data at that index then it will be removed from memory by the garbage collector.
  7. Cross-platform open/save function

    If all you want it something to create a file selection dialog that returns a string with the selected filepath/filename and then use that in your own save/load code, then check out IUP, on windows it acts as a wrapper to the winapi, on linux it can wrap either gtk or motif. http://www.tecgraf.puc-rio.br/iup/ An example from the iup manual: /*IupFileDlg Example in C Shows a typical file-saving dialog. */ #include <stdio.h> #include <iup.h> int main (void) { Ihandle *filedlg; IupOpen(); IupSetLanguage(IUP_ENGLISH); filedlg = IupFileDlg(); IupSetAttributes(filedlg, "DIALOGTYPE = SAVE, TITLE = \"File Save\""); IupSetAttributes(filedlg, "FILTER = \"*.bmp\", FILTERINFO = \"Bitmap Files\""); IupPopup(filedlg, IUP_CENTER, IUP_CENTER); switch(IupGetInt(filedlg, IUP_STATUS)) { case 1: IupMessage("New file",IupGetAttribute(filedlg, IUP_VALUE)); break; case 0 : IupMessage("File already exists",IupGetAttribute(filedlg, IUP_VALUE)); break; case -1 : IupMessage("IupFileDlg","Operation Canceled"); return 1; break; } IupDestroy(filedlg); IupClose(); return 0; }
  8. font lib for opengl

    I've already got the Freetype dll, and it works with FreeBasic. What I want now is something like FTGL - http://ftgl.wiki.sourceforge.net/ But the only download link is for the C source code, and I don't know enough about C to be able to compile it into lib
  9. font lib for opengl

    I don't know enough about c to compile a lib
  10. font lib for opengl

    I've been looking for a truetype font lib for drawing text in opengl. My problem is that the language I'm working with is FreeBasic and although it can link with libs compiled by other languages, all the font libraries I've been able to find are available only as C or C++ source code. Does anyone know of any opengl font libraries that have pore-compiled binaries available?
  11. 2d tile map

    For displaying a 2d tile map what would be faster, a display list or a TexCoordPointer + VertexPointer combo?
  12. SOIL: new lightweight image loading lib

    What I was thinking about was just something to remove solid-color background from images to make sprites for 2d. I'm not too familiar with how the gimp function works, but why not do both and have it accept an array for the argument? Then you could determine which method to use by the structure of the array something like myarray = (255,0,255) or myarray = ( (123,50,45), (100,200,200), (0,0,155))
  13. SOIL: new lightweight image loading lib

    When using the SOIL_LOAD_RGBA flag, how about adding another argument that can let you specify a color value for a transparency mask for images that don't normally have transparency like bmp?
  14. Unless you're doing some kind of multi-threading, Lua executes commands one at a time -- when you call a function from lua it doesn't go on to the next line until the function returns
  15. SOIL: new lightweight image loading lib

    when using soil to load an image, is there any way to get the alpha value from a certain pixel inside the image, either from the image buffer created by SOIL_load_image or from the gl texture itself? Basically what I want to do is create an array with 0's and 1's to use as data for pixel perfect collision in 2d games
  • Advertisement