hoorray

19 09 2006

YESSSS!! I have got it working. The engine is written in Nemerle. I recompiled the appropriate F# module had to apply the appropriate arguments by hand at a console eww. A special CLI independent version of the compiler was given, my version of F# was written when mono did not support generics. btw the people who wrote F# invented generics for .net…F# is like the C of .net – the next level after assembly in terms of performance. More on everything later.

Screenshot:Linux:

screenshot.png

Windows:

screen2.JPG

Mac OSX:

I dont have it but that is supported too


wooh 0 fps! Psych im running Ubuntu through VMPlayer with lots of background tasks both on Ubuntu and windows not to mention a few firefox crashes and leakages. Im quite certain if it can run at ~2 – 5fps here then i have little to worry about in terms of speed.

The windows one is running at 85fps on top of vmplayer.. There is a lot more going on than the simple screen would suggest. Graphics library allowing system independent code is Irrlicht.net CP.

Python script.

tex1 = graphics.scene_author.texture_pool.Load_Texture("Stone_Sample_002.JPG")

graphics.scene_author.Add_Sky_Box("sk5n.bmp", "sk5n.bmp",
                   "sk4n.bmp", "sk2n.bmp",
                   "sk1n.bmp", f = "sk3n.bmp")

plane = graphics.terrain.Create_Terrain_with_plane(width = 3000, height = 3000)
graphics.scene_author.Add_Terrain_to_scene_Plane(plane, tex1)

the bmps were originally in a textures subdirectory but i had to change the script and copy bmps to same dir as app. THe solution to this is quite easy thanks to .NET! More and how I was able to change my graphics layer in a way that didnt break scripting to later.. Ramble ramble

A more cohesive post tomorrow / later





More on the Script

9 05 2006

Not so much progress as I been spending a bit of time at dance practice. Nonetheless, Ive got basic random town creation. At the moment its very basic, you give a radius, center,number and disc thickness and it populates the scene with the selected model, filling the disc or if you chose rectangular the border the thickness limits it to. Right now stuff is being place on top of each other, I want to turn it off for some buildings as it dont look too good.

Im thinking that for each object being placed send a ray from its position and see if it intersects or picks some triangle in the scene, if so then check if the bounding volume of the picked object intersects its own. If intersection is not allowed then the building will not be placed.

import map_interface
t = map_interface.terrain()
o = map_interface.objs()

tex1 = t.load_texture(engine,"Stone_Sample_002.JPG")
plane = t.Create_Terrain_with_plane(engine, width = 3000,
                             height = 3000)

plane_node = t.Add_Terrain_to_scene(engine, plane, tex1)
engine.terrain.Add_Sky_Box("sk5n.bmp", "sk5n.bmp",
                   "sk4n.bmp", "sk2n.bmp",
                   "sk1n.bmp", "sk3n.bmp")

house = o.Load_Mesh(engine, "house1.x")
house2 = o.Load_Mesh(engine, "fachwerk12_LOWPOLY_TS.3ds")

o.Add_Animated_Entity(engine, handle = house)

engine.entities.Populate_Scene_with_object(house,5,
    1500,1500,40)

engine.entities.Populate_Scene_with_object(house2,20,
     1500,1500,0.4)

scr5.JPG scr7.JPG