Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - nabz32

#1
Next step in development is dynamic houses.

I am in the process of creating a house editor, where you can lay down the foundation of the house which is stored in an array of 2D lines, the end point of the last line needs to connect to the start point of the first line, so the loop is closed. You can also add a negative foundation for creating houses with an inner yard.
The foundation of the house is grid based with the possibility of diagonal walls ( basically the editor just snaps to the grid for placing the points of the houses foundation )
Then I render walls from these 2 foundations for each story of the house there will be one generated wall ring.
A floor will be rendered for each floor ( flood filling the house foundation ), only interrupted by openings that can be placed on the floors.
I will actually build the wall rings 2 times, the second time the walls will be inverted ( also with different texture offsets to allow different inner wall textures ) those two walls will be rendered at the same time, because only front faces will be rendered they will not z-fight each other. When the player enters the house, the
outer wall ring is not displayed anymore, so you can only see the inner walls, also only the floor the player is on will be rendered, when the player enters the next floor, the floor will slowly blend in as the player transitions to the next floor.
Doors and windows can break the wall rings and will be left as openings when creating the models, meaning that you can only exit a house by doors and windows. Also you can see the inside of the houses through the window from outside and vice versa.
The only problem in this concept i am facing is finding a nice algorithm to automatically generate a roof for a build house. I have already created the outside line loop for the roof, so it will leap a bit over the walls by just translating the lines of the foundation outside and calculating the cut points to the translated, enlarged lines with their direct predecessors and ancestors.
Now I am thinking of doing the same, but translating the enlarged lines of the houses foundation to the inside of the house, also defining them finally by their cut points like the outer loop of the roof. This will be my first layer of roof, from this I can do the process again, till everything is filled with roofs. The only problem with this is, that some points can lay directly on other walls and have to be recalculated and also some points
will be removed ( duplicates that sit on top of each other ). With some points removed, the whole loop of points needs to be reordered correctly.
Also i need to keep track of the outer loop of roof to the inner loop, basically for creating the triangles correctly between the two loops. I hope to be able to resolve this, but it should be doable.
The final step will be to add inner walls to the house, so you can create rooms inside.

So basically a house consists of floors, outer walls ( one for each story ), inner walls ( specific to each story ) and the roof, which can easily be blended in and out.

This will have the great advantage of being able to seaminglesly enter houses on a map without loading times, the player could directly relate their position inside the house to the outside world.
 
Right now, the foundation editor is ready and outer wall rings can be rendered ( without the option to place doors and windows yet ), also the outer loop for the roof is created automatically.

I will keep you informed of the progress I make here and hope to be able to show something soon.

#2
Yes light is a problem in GLBasic, I also have the shadow routine working, but with a dynamic map model there is always the problem with shadows popping in suddenly, also the shadow effect from glbasic is still a bit buggy. I just wish we had proper ambient light in GLBasic, this would be a nice start to be able to set the color of the darkest parts of the models.

I finally added wind:

Also I fixed some bugs, added some more constants, encapsulated some repeating code in functions and the object hiding now takes two coordinates into account, before all objects where hidden, when they where behind x or z of player, now only the ones that really obscure the view of the player will be hidden
#3
It looks way better with point lights with attenuation,
but you have to place the lights strategically for this to look good
#4
I also changed the tree design, now with dynamic leafes.
I plan for the leafes to be affected by the wind and player also.
Just finished the editor and the basic drawing.
#5
Yes i also scale the lawn, i could instead rotate it on another axis, but i hate 3d rotations when there are to many angles involved, I need to get more into quarternions.
#6
ok, I made a short video so you can see it in action

#7
thanks for the help,

I am still in the process of reinventing the character and story.

I have worked a bit on the lawn engine, so i thought i share some progress ( has it allready been 10 years?  :o )

I have implemented shaking grass when you walk over it ( value from 1.0 multiplied with 720 degrees and sin and asin aftwerwards, looks really nice ), I can also use it for making a wind effect on the whole lawn, also really not that ressource draining ).

I have also fixed some bugs, like teleportation could in special cases lead to one row of tiles not loading.

And I also finished the lawn editor, lawn tiles can now be edited by some clicks in the editor.

I have attached a screenshot of the new effect, but I think a video would do it better justice.
#8
Hi, I fooled around a little more with my engine during this year.

* Added some lawn back into the engine.
* Rewrote the engine to support n layers instead of only 2 ( plan is to use this for caves in the future )
* Improved collision with diagonals, now friction is correctly applied here.
* Enemies which should not go over cliffs now detect this always correctly, before those enemies could get stuck on cliff edges and block edges.
* Improved collision with spheres, now friction is correctly applied here.
* Coins collected are now remembered for each map in the save files, saving takes a little longer now.
* Improved transparency check when camera moves ahead of the player while running.
* Reduced inertia for player when turning.
* Increased acceleration for player when running.
* added new available view ranges ( huge and very huge ), so you can see more of the map. Thanks for removing the object limit in the latest steam release Gernot.

Currently in Progress:

* Player editor for configuring player basic behaviour, selecting models etc.
* Support for multiple Campaigns.

Also I am in the process of rebranding this game ( new player model), new storyline, maybe new features, If anyone has some ideas I would gladly look into those, maybe someone
on this forum wants to collaborate on this? ( Just looking for ideas, not something like "plz make all models and sprites for my game"  ;) )
 





#9
Write a save function in your type,
This function writes all the variables of the type
Then call this function n times for the size of the array you want to save.
If n is variable than store n before saving the n lines of data.
This way you know the array size for the loading algorithm, or you could save a special
ending block after the array has been saved to determine the array ending.

When saving subtypes just call the save function from this subtype inside the save
function of the parent type.
Of course a load function wouöd be needed as well
#11
Blender is really cool for GLBasic, as you can Import almost anything and export it nicely to obj,
you can also export the frames of your models animation to seperate obj files with ease ( perfect for the .ddd conversion tool ),
should you want to add animated Objects to your games ( Be sure to use smoothanimation when animating, or else there is no interpolation between frames ).

Feel free to ask here anytime should you run into trouble.



#12
I like the idea of possible ascii art connections between Nodes for better readability. :good:
#13

I recently had some time to work on this again:

  • maximum drawing distance increased
  • Several improvements to editor layout
  • Improved the camera system, the camera now shows more of what is ahead of the player
Also New actions for events ( like manipulating a block )
And of course bugfixing.

The editor has been improved, but there is still so much left to improve
in terms of layout and useability.
Aside from that all this game needs is content.
The improvements on the editor should allow me to
Produce new maps faster.

If someone wants to try the current state send me a pm
and i will send you a download link for the win version.
A gamecontroller or a good keyboard is recommended for testing.








#14
I would love to be able to raise that macimum obkect number for my game.
Where is that source code?  :enc:

I need many objects, because i want to be able to ghost individual parts of my map, whichbis made of polygons.
I even have mechanisms in place, that parse the entire map and looks which polygons are the same ( vertex and texture coordinate wise) so i dont need to store duplicates in memory.
But in the worst case, no polygon on the map is the same.

Would love to crank the tile count up to 60x60 tiles but it is not possible at a limit of 4200 objects.


#15
Hi,

I just bought the new glbasic in steam yesterday.
I noticed, That my game runs a bit slower than before,
Also debug mode is choppy.

But a recursive function that crashed the game only when debugging
Works now in debug mode.

Any new funtionality in v15?

I only noticed That you can build 64Bit executables and That the IDE
Looks a Bit weird at 4K resolution.