{Alpha Demo} The Garden - A barebones RPG

I think you may be a bit too specific for an RPG, most status buff or ailments are a bit more general, i.e. vitamin C is for immunity so the mushroom could give you immunity to disease effects. In any case, there several entries for neutral mushrooms in the encyclopedia, take a look at the current entries and come up with a description for the mushroom and I might use it. I should also note that this game will not make use of status effects just yet, it is simply an exploration game. After it is complete, I will be building a more traditional RPG based on the world we create, so thinking ahead and planning the plants and animals to have specific uses is not a bad thing, we just won’t use them yet.

I am using Goran’s 2.6x FPS base frame in my project and I could use a little help adding some features. It currently supports WASD movement and jumping with space. The feature I want to add is retaining velocity while jumping, i.e. running jumps that propel you forward. As it is, you can only jump while standing still and you will only go straight up. Any ideas would be appreciated. The other feature I want to add is to enable a flight mode, i.e. q makes you ascend and e makes you descend. I though about simply turning off gravity, but that seems to disable movement altogether. Again, any ideas would be appreciated. Here is the code;

"""Goran's 2.6x FPS base-frame


2011 - Goran Milovanvic - nilunder.com


"""


from bge import render, logic
from mathutils import Vector


class MouseLook:
    
    def __init__(self, cont, body):
        
        self.cont = cont
        self.camera = cont.owner
        self.body = body
        
        self.sen_mouse = self.cont.sensors["mouse"]
        
        x = render.getWindowWidth()//2
        y = render.getWindowHeight()//2
        self.screen_center = (x, y)
        
        render.setMousePosition(x + 1, y + 1)
        
        self.offset_accum = Vector((0, 0))
        
        self.main = self._blankRun
        
        
    def _getMouseOffset(self):
        
        vec_scrc = Vector(self.screen_center)
        vec_mpos = Vector(self.sen_mouse.position)
        
        return vec_mpos - vec_scrc
    
    
    def _blankRun(self): # allow self.sen_mouse.position to update
        
        self.main = self._mainAction
        
        
    def _mainAction(self):
        
        mouse_offset = self._getMouseOffset()
        self.offset_accum += (mouse_offset - self.offset_accum) * 0.2
        
        rot = self.offset_accum * -0.002
        
        self.camera.applyRotation([rot.y, 0, 0], 1)
        self.body.applyRotation([0, 0, rot.x], 1)
        
        render.setMousePosition(*self.screen_center)






class MoveWSAD:
    
    def __init__(self, cont_camera, own_body):
        
        self.cont = cont_camera
        self.body = own_body
        
        # Required sensors:
        self.sen_key_w = self.cont.sensors["W"]
        self.sen_key_s = self.cont.sensors["S"]
        self.sen_key_a = self.cont.sensors["A"]
        self.sen_key_d = self.cont.sensors["D"]


        self.sen_key_space = self.cont.sensors["space"]
        self.sen_col_onground = self.cont.sensors["onground"]
        
        # Attributes
        self.speed_ground = 100
        self.speed_jump = self.speed_ground / .5


        self.main = self._inAir




    def _getMoveVec(self):


        forward_back = self.sen_key_w.positive - self.sen_key_s.positive
        left_right = self.sen_key_d.positive - self.sen_key_a.positive
        
        velocity = Vector((left_right, forward_back, 0))
        
        return velocity
    
        
    def _onGround(self):


        vec_velocity = self._getMoveVec()


        vec_velocity.magnitude = self.speed_ground


        if self.sen_key_space.positive:
            vec_velocity.z = self.speed_jump


        self.body.setLinearVelocity(vec_velocity, 1)


        if not self.sen_col_onground.positive:
            self.main = self._inAir
    
    def _inAir(self):


        if self.sen_col_onground.positive:
            self.main = self._onGround

it also calls this;

from bge import logicimport fps


class Player:
    
    def __init__(self, cont, body):
        
        self.mouse_look = fps.MouseLook(cont, body)
        self.move_wsad = fps.MoveWSAD(cont, body)
        
    def main(self):
        
        self.mouse_look.main()
        self.move_wsad.main()
 
 
player = Player(logic.getCurrentController(),\
                logic.getCurrentScene().objects["00Player"])       


def main():
    
    player.main()

Please have a look and let me know what you think. Ideas, suggestions, or solutions would be appreciated.

I decided to try my hand at a low poly tree, and here is the result. I present the Winter Tree;


This is an early prototype and doesn’t include the flower or fruit, but I am really happy with how it looks. I will create the detailed version for close up viewing sometime later this week.

  • Winter Tree: A tall tree whose leaves, fruit, and flowers are made of Water Mana. It produces a clear, apple like fruit and a transparent, shimmering, snow flake shaped flower. The fruit and flower can be used to increase stamina. The flower only blooms during winter. It is endemic to its geographic location, where it grows moderately.

Your explanations sound good.

I now also understand why you need this LoadLib script. Very useful indeed.

Good progress on your map.

I think first I will test the AI in the pyrogenesis engine as I have done most work (1500 lines) in JavaScript and don’t want to port it in the current phase. I will have an eye on your efforts. Thanks for sharing!

Edit: Didn’t realize there is another page! Nice tree! Also in the script I can’t find the limitations you talked about … difficult, no comments, no explanations about the why what I believe is the essential point in programming - to tell why it’s done this way. Also my experience is too low with BGE. Have to take another look …

hi i am an artiest and i hope i can help you like everyone her this is some of my art works



blend file and demo video updated

You really need some wind on those trees.It would look better.

Here is a movement rig… it’s different than normal… but in a good way :smiley:
http://www.pasteall.org/blend/27112

Let me know if you like it, or want some things changed about it,

Q- flight
Space=jump
wsad -move
Mouse - aim head

@faerietree: Thank you for the support, I plan on making this project available to anyone as sort of a template world for anyone to use. I hope it can be used as a starting point for anyone to make their own RPG or world simulation. I definitely agree that code should be commented to help learn how and why it works, so I will eventually go back and comment everything I can.

@p.proj: I would be happy to have you help in some way, PM me and let me know what you would like to work on.

@3d solar system builder: That’s a good idea, I will work on a simple animation and update it when I get the high detail model complete.

@BluePrintRandom: Is that based off your levitar? I was thinking about using the same sort of method you did for that, but this works pretty good. The flight mode and jump system are near perfect, I would prefer to have the mouse control character direction and strafe with s and d. I am going over it now to find all the tweakables, hopefully I can come with a way to enable a walking with w and double tap to run method. Are the jumps based on velocity, or is it a set distance regardless of velocity? I am thinking it should be a short jump from walking, long jump from running, and a super jump after running for 10-20 steps (or after >5 seconds while running or holding space for still jumps) or something to that effect.

As a side note, I will be starting a work from home job mid march, which means I can spend every bit of down time from my job working on this. I predict at least 400% increase in productivity :). On the down side, I have to move house in the next 2 weeks so I will be pretty busy getting that done, which means I won’t have a lot of time to work on this until I start my new job.

It uses apply linear velocity acceleration

Space--------------and---------motion Jump
if “Ground” = true/

if collision with map----and-------property Ground = true
_________________—nand----property Ground = false

her is a simple example with a wall jump timer

Attachments

jumptimer.blend (451 KB)

I found a usable solution for creating a flight mode that keeps the current control scheme. I decided to use a state switch to replicate the walk mode controls and simply remove gravity while in the flight mode state. This was a surprisingly simple solution and I will be doing the same thing for all the other methods of travel. I also updated the blend file and demo video to show the flight mode in action.

The youtube video looks great.People will like flying like superman.

Very nice preview

altough didn’t spot any grasses. Are you planing to use meshes for grasses or using texture instead?

also :

Do you need people who can sketch fantasional 2d models and then you can make it into 3d model to your game, or you need blender 3d modelers to be part of the project?

this is a model I created after watching your vid, hope it help. :smiley:

preview :



blend : turtleMonkey.blend (1.22 MB) 254 vertices 264 faces 23 bones

:slight_smile: naah, I just got stuck and need to find some exercise. Then I found you need a lot of assets for your project and I think it is still within my skill range, so why not.

Another sugestion tho if you may.
I think you need to put how much vertices or faces target for your assets. Says, the world currently have 12k vertices and run smoothly. Then you try to add another 12k three times but after second try you find it got major lag, then your target vertices is arroud 24k. Any assets you add the sum of all must not exceed 24k vertices.

That the simplest way, i think.
If you can also calculate how much textures, bones, animations, or other things that aso may cause heavy lag(comp spec also :smiley: tho all of this is just optional), it is better. But to modeler it is better to know how much target model limit for assets.

I think I can make rough sketch, and positive I can model from sketch(es).

this is sample tree I made :



blend file : sample_tree_v1.blend (857 KB) 236 vertices 120 faces 1 (600x600px)png texture

I am happy to hear you want to be a part of this project, let’s discuss how you can help over a PM. Thanks for reminding me about designating a polygon budget, I have been meaning to update the original post to include that info. These are the guidelines this project will follow;

LOD/Polygon Budget
The Garden will make use of 4 levels of detail for the various Elements, Flora, and Fauna. The polygon budget for each mesh is as follows;

  1. Full detail: 400-700 tri’s
  2. Low detail: 200-400 tri’s
  3. Sprite: 2-100 tri’s
  4. Invisible: 1 vertex

These are simple guidelines, rather than strict criteria. Each mesh can have up to 700 tri’s for its full detail level, but using as few as possible is ideal. The tree you did is a good example of a “low detail” mesh, but could be the “full detail” mesh even though it is well below the guidelines. I will PM you with more info.

Sure. I will try to build some models to fit the enyclopedia description in the first page while you moving.

:confused: 1st and second attemp :



Winter Tree 1 : 330 vertices 233 faces 466 tris 1(600x600px) texture
Winter Tree 2 : 412 vertices 237 faces 474 tris 1(600x600px) texture

I am sorry, I should have explained that I wanted you to redo the current model instead of remodeling the whole thing. I should also have given you the model.

The leaves are meant to be a transparent blue, with a silver lining. It’s multiple limbs are meant to form an “orb”. It has visible, tendril like root structure.

If you don’t mind, I can use these as neutral Flora.

Ah, dang my connection so slow. Just reading it after finished uploading. :smiley:

OK, I will take a look. It is up to you to what to use it for.