Advertising (This ad goes away for registered users. You can Login or Register)

[NEW LUA INTERPRETER] ONElua v3

Most of the homebrews discussed in this forum can be downloaded here
Mills
Posts: 36
Joined: Sat Aug 02, 2014 10:09 am

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by Mills » Tue Oct 28, 2014 12:38 am

jkpwed wrote:bugs:
1. on .mtl files if their are space/spaces before map_Ka and map_Kd textures will not load
2. model3d.scaling (MODEL3D model, NUMBER object, TABLE scale) works fine with "normal" .obj it has problems with scaling stuff like "Suelo.obj" things that are "solid/can walk on top of"
3. .png alpha images show black background instead of clear/see threw
3. I am not sure if this works properly on 3D stuff var = nil; collectgarbage("collect")
Other: missing .tga support for 3D models
Some png images will show black colors on ppsspp if you change settings.. But the alpha channel always worked on real PSP.
Physics engine has some bugs, if you change size of physical objects, the engine will do strange things

Mario looks cool!. For the moment that's the best way to create a character and move it. You set a physics "ball", and set the character the same position as the ball. Then you should erase the line that renders the ball so that you don't see it.

Object = nil; collectgarbage() is working well. But it does not erase the physics. You'll have to use "deletephysics" for the objects.
marios92 wrote:What is possible with this? amazing! Maybe a 3D amazing Homebrew games, that seems as port of worms 3d? XD
You can do whatever you want, (I'm making a puzzle game,), although physics engine is a bit limited, it is enough for most games. That planet is indeed the worms 3D intro planet, it was just a test, not a port.

I finally can post some new images of the game i'm making:

Image

Image

Image

Image
Advertising

jkpwed
Posts: 8
Joined: Sun Sep 21, 2014 2:21 pm

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by jkpwed » Tue Oct 28, 2014 4:28 am

Thanks I will try that tomorrow but what I am looking for is to load the 3D model #1 completely unload #1 then load 3D model #2, unload #2 and so on. Later on I will delete the maze stage,ring and mess around with physics,lights and other stuff I am also just testing not porting.
Advertising

marios92
Posts: 73
Joined: Thu Aug 21, 2014 3:15 pm

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by marios92 » Tue Oct 28, 2014 8:55 am

I know abouth all this is a testing, but i want to ask if with this Lib is possible to rip everything to make "a like port" of games such worms 3d (not a full port, only a ripped parts with custom things XD)

Mills
Posts: 36
Joined: Sat Aug 02, 2014 10:09 am

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by Mills » Tue Oct 28, 2014 11:15 am

jkpwed wrote:Thanks I will try that tomorrow but what I am looking for is to load the 3D model #1 completely unload #1 then load 3D model #2, unload #2 and so on. Later on I will delete the maze stage,ring and mess around with physics,lights and other stuff I am also just testing not porting.

Code: Select all

 --Load object
Model = model3d.load("Object.obj") 

--Erase object
Model = nil
model3d.deletephysics(Model) --if the model has physics
collectgarbage() --This will remove object from RAM
I don't know if the textures are also deleted from VRAM.


marios92 wrote:I know abouth all this is a testing, but i want to ask if with this Lib is possible to rip everything to make "a like port" of games such worms 3d (not a full port, only a ripped parts with custom things XD)
Of course. I loaded a worms 3d map I found in a web called model resources, and it worked at 60 fps. But i could not rip more things from this game... I have the intro planet if you want it.

jkpwed
Posts: 8
Joined: Sun Sep 21, 2014 2:21 pm

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by jkpwed » Tue Oct 28, 2014 3:07 pm

Mills wrote:I don't know if the textures are also deleted from VRAM.
Unfortunately every attempt to unload Mario did not work for me, I did not add any physics to Mario so that code was always disabled in my tests ("Serenity now, insanity later").
Other: I disabled the ball render, so now the collision between the ball and ring is broken (scaling the ball might have worked but I did not try I''ll mess around with all that stuff at a later time, my interest still lies on 3D character movement I used "brresviewer" SSBB mods also work well).

Mills
Posts: 36
Joined: Sat Aug 02, 2014 10:09 am

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by Mills » Tue Oct 28, 2014 3:38 pm

jkpwed wrote: Unfortunately every attempt to unload Mario did not work for me, I did not add any physics to Mario so that code was always disabled in my tests ("Serenity now, insanity later").
Other: I disabled the ball render, so now the collision between the ball and ring is broken (scaling the ball might have worked but I did not try I''ll mess around with all that stuff at a later time, my interest still lies on 3D character movement I used "brresviewer" SSBB mods also work well).
Do not scale objects with physics.

Do not delete models if you are using then inside a while like this.

Code: Select all

...
...
model3d.render(BKG)
if buttons.released.start then
  BKG = nil
  collectgarbage()
...
If you press start the loop will try to load the object at next frame, and it will show error

I used a ball to move a character and it worked well without rendering the ball. like this:

Code: Select all

...
Level = model3d.load("Level.obj")
Ball = model3d.load("ball.obj")
Mario = model3d.load("Mario.obj")

model3d.setphysics(Level,1,{0,0,0},{0,0,0},0,__CONVEX)
model3d.setphysics(Ball,1,{0,0,0},{0,0,0},0,__SPHERE)
model3d.physics(Level)
model3d.physics(Ball)

--Config light and camera...
...
...

while true do

--Get ball position
BallPos = model3d.getposition(Ball,1)

--Give MArio the ball position
model3d.position(Mario,1,{BallPos.x,BallPos.y,BallPos.z})

--Render Level and Mario
amg.light(1,1);
model3d.render(Level);
model3d.render(Mario);
amg.light(1,0);

model3d.updatephysics()
amg.update()
end
Last edited by Mills on Tue Oct 28, 2014 7:32 pm, edited 1 time in total.

jkpwed
Posts: 8
Joined: Sun Sep 21, 2014 2:21 pm

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by jkpwed » Tue Oct 28, 2014 5:42 pm

Thanks I will try this

Mills
Posts: 36
Joined: Sat Aug 02, 2014 10:09 am

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by Mills » Sat Nov 01, 2014 11:47 am

This is an onelua sample using ball physics to move a character around the scene.

http://www.youtube.com/watch?v=F2O8FmOLJV0

jkpwed
Posts: 8
Joined: Sun Sep 21, 2014 2:21 pm

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by jkpwed » Sun Nov 02, 2014 1:42 pm

Awesome work on worms 3d! I am also working with camera moment and menu.

User avatar
Davis9278
Posts: 41
Joined: Tue Jul 15, 2014 11:34 pm
Location: Mexico :D
Contact:

Re: [NEW LUA INTERPRETER] ONElua v2 3D Module is here!!!

Post by Davis9278 » Thu Nov 06, 2014 2:04 pm

Please refer to me as DevDavisNunez,
I am looking for some way to change my nick on wololo!

Post Reply

Return to “Homebrews”