So After 3 months or so of hacking away at C, I finally have something I think is a mostly complete as a game. I know there are still stuff I need to add but I'm posting it here to somewhat get a feel of the direction I need to go so I can finish it in 2 months time. I am going for a more arcade style centipede feel to the game so I'm not going to try and replicate EVERY feature becauby owen - Testing Corner
well its live. no turning back now. All 8 stages in Lua script in game, loaded from game directory:by owen - Coding
Pretty hard, in my opinion but I do see browsers in development on the wiki but I'm not sure they will go as far as implementing javascript. How are you with Lua? Its pretty simple to set up. It is a scripting language but it is not javascript. What what exactly do you want to do?by owen - Coding
RIght now I'm working a function to keep the variables in Lua insync with the variables in the game engine (especially since registering new functions is so tedious). Once that is done, I won't be touching the code again! lol. Lua cost me the ENTIRE month of February. Hopefully the benefits out way the start up costs. :)by owen - Coding
Its working now. I should be using luaL_checknumber(L, 2) instead of luaL_checklong(L, 2) when retrieving the Hex value. Thanks for you help. now I can finally move on. :)by owen - Coding
My conf.h file has the LUA_NUMBER set to double, still doesn't work. here is the file that I am currently using:by owen - Coding
My Luaconf.h file has the LUA_NUMBER set to double, still doesn't work. here is the file:by owen - Coding
So i can just change the type of LUA_NUMBER defined in luaconf.h OR do I have to re-install the entire LUA library into devkitpro. I am not at my computer right now.by owen - Coding
So I'm am pretty much on track for my next update/release except I have discovered another issue. I cannot seem to pass hex colors from lua to C correctly. Every color I pass from lua to C comes across as Cyan or Black. here is how I declare and use the color in the LUA; --primary colours GRRLIB_SILVER =0xC0C0C0FF GRRLIB_RED =0xFF0000FF GRRLIB_LIME =0x00FF00FF set_oby owen - Coding
well every thing is nice and separated now and I am no longer getting the macro redefined error. The shape stretching bug is still in there but now I suspect that it is as a result of some kinda loop bug in my code. Thanx for your help. :) All I have to do now is loop through the directory and pickup the Lua files. For those interested here is a nearly finished stage in Lua code: (one tby owen - Coding
LOL, I am totally sorry for that faux pas. I have been coding for a while but the library conflict is new to me, especially since I avoid using external apis. lol, I really never had to use them before. I will try that tonight. One question though, why do you have that empty include in the first line of your example code? #include #include "file2.h"by owen - Coding
Once I declare a function with Lua_state static int test2(lua_State *L) { return 0; } then the stretched shape error occurs. @Diad I tried that this morning. I copied all the LUA references into a lua_api.c and included a lua_api.c into main.c but the artifact is still occuring. Now I'm confused. lua_api.c looks like this; Even if I include it in separate source files Iby owen - Coding
Getting weird stretched shapes when I include Lua. @diad do you use it with GRRLIB?by owen - Coding
Got a marco conflict between Grrlib and Lua. Apparently they both have a macro called G(). I renamed the one in Grrlib since it had the least code. My lua script seems to be running, I ignored your advice and wrote a long ass Lua script which was a pain to debug but I got it working. I have one stage running now and all I have to do is beef up the API and figure out how to dynamically load tby owen - Coding
Getting it installed in devkitpro was the initial headache but it seems to be working now. I've managed to get one function to be called straight from the lua script. That should be enough for now. All I will do is call a Lua function once before the stage starts (to set up the scene) and another Lua function while the stage is running. I plan to expose as much as is needed to Lua and thby owen - Coding
I am looking into using it for initializing and animating the levels in my game. Presently I have the levels hardcoded in C. Lua seems offer some flexibility as oppose to having fixed levels. Hopefully by the time my game engine is finished I will be able to get some people add levels using the Lua interface. I saw the astronomy project. Anybody else currently using Lua for any wii homebreby owen - Coding
wait @Daid I have a questio, so how do you know where the new top edge of your object is? Say for instance I draw a cude in GRRLIB and I rotate it by 45 degrees/radians on the Y. How do I find out the new coordinates of the corners? especially when it comes to collision detection.by owen - Coding
Cool thanx, looking forward to see how efficiently it worksby owen - Coding
Anybody interested in porting is? is it usable? It seems to have allot of code and files. I'm not familiar with compiling so, somebody take a look at it and tell me how easy it would be to use this in my devkitpro project. I code in C. First saw it referenced here: Source: I also did a search and could not find it here or on the wiki. I may be useful to other people.by owen - Coding
Here is the final, buggy, unopimised C code that I hacked together. All it does is draw several triangle strips to form a nearly flat surface with random bumps. It will not work in every scenario so use at your own risk. NO COLLISION DETENTION - just in case it isn't obvious. generates something like this (except not scrolling/moving ) int terrain_color_threshold=100; //how bby owen - Coding
There seem to be missing some code there but it seems like you are not calling DibujaBaldosa() the correct number of times. I think you can only call it once after each GX_Position3f32().by owen - Coding
Pretty epic. I wonder how hard it would be to simulate some kinda progression or fast forward to a certain date in time. It cool though.by owen - Homebrew Applications
Well I did something, its not quite the diamond square technique but its passable for sand dunes or high flyovers. I may try to do some colision detection on it but it looks doubtful cause it may slow my framerate down to nothing. Video (I really need to try doing screenshots):by owen - Coding
Yeah I saw that page but I was having a hard time figuring out what the diamond cube was doing and then converting that to GX. I wanted to see if anybody has attempted it in GX. I guess I will have to write my own simple formula.by owen - Coding
I'm writing a flying GAME which is on rails and I want to use GX_TRIANGLESTRIP (or anything) to draw a simple landscape that I can fly over. I'm having a hard time getting the triangles to line up correctly. Anybody tried generating random terrain like this? is there a easier way? (without loading a model )by owen - Coding
Considering the amount of time I spent on it you would think that the fog would be a critical feature but its really cosmetic at this point. This is a early version of my project: (no fog) rest of the info is on my wiibrew page.by owen - Coding
RESOLVED!! After what feels like months of painful trail and error I finally found out what was wrong with my code. I had misinterpreted what the parameters ment. The fog seems to work based on the draw distance of the camera as opposed to my "real world" coordinates. here is the code that seems to work now; Note that the copyclear color call really makes the effect work, so don't goby owen - Coding
something like this (without the snow particle effects): if looks basically like that I;d be ok. still haven't gotten a chance to test out the above code yet though.by owen - Coding
hmmm yes I never had that GX_InitFogAdjTable() and GX_SetFogRangeAdj() call but I have seen that white tint effect during some of my experiments and it doesn;t look pretty at all :(. Its going to be tricky with the fact that I have absolutely no polygons in some areas of my screen (and i was hoping that the fog function would be ideal to hide this fact) but I will give this a try. thanx for youby owen - Coding
I've tried setting it to the correct matrix settings (0, -10000) but I'm going to try using positive numbers and see how it works out. Do you remember how the fog is supposed to look? is it like WHITE TINT on the whole screen or does it look like real fog/mist with volume? If you have any videos with how the end results looks that would be helpful.by owen - Coding