Jump to content

smashthewindow

Members
  • Posts

    136
  • Joined

  • Last visited

Posts posted by smashthewindow

  1. I highly doubt creating a weapon system is hard.

    Just create a class that holds information on damage, range, fire mode, etc.

    Then you would need to create basic state machine system for fire, reload, or whatever else you need.

  2. Mumbles & Pixel Perfect,

     

    Thanks for both of your replies!

    They were a great help.

     

    I've decided to save the funding for later use (maybe on 3D model assets) and right now focus on maybe even getting some crude levels on 3DWS.

    I've coded some various features (such as camera cut-scene system, trigger system, various traps... etc) that could be easily placed in the editor, but I've concluded that I should be planning on my maps and where I should place those things.

    And when I've got some basic layout set up, I guess then it's time for me to find modelers and level designers who can polish up from what I have to a higher quality.

     

    I guess I could search for a fellow student modeler who would like to gain some experience like me.

    I'm pretty sure I could find one at Blender or Autodesk educational forums.

     

    P.S: My goals are to finish the current game within a year, and release all it's code/art assets (if not possible I guess only code) to the public, so I probably won't be making any profit out of it :). This game was something like a project for me to get familiar with the development flow, and my next project would probably be a big one.

  3. Hello Leadwerks community,

     

    I'm a developer of a small game called "Round & Round". (Some people might know it as "ShinyMarble", but I decided to change the name after some people called it funny.)

    Right now, I've been developing the game on my own.

    Programming part was no big problem for me, as I've had some software development background (and also Leadwerk's ease of use biggrin.png ).

    The biggest problem for me was level design and graphics, as I've had zero experience on the 3d modelling field.

     

    Recently, I managed to get some "funding" to solve the art assets problem.

    I don't know exactly how much I'll be receiving, but if it's enough to hire a level designer I'm willing to do so.

    What I'm looking for the designer to do is to create several(around 5~7) maps for my game.

    If not, then I'll probably have to buy assets from various stores.

     

    I have no idea on how hiring an level designer would work as I never even bought a 3D art asset before.

     

    Can anyone shed some light on this?

    Maybe even where to start looking will be greatly appreciated.

     

    Thanks for reading.

  4. Just integrated the buffer-based system on GWEN... I'm having terrible FPS though.

    Maybe you aren't suppose to use buffer method extensively (for example, like a complete GUI, where you would do this process multiple times in a single frame).

  5. I've searched everywhere to achieve the samething while writing a GWEN Leadwerks renderer.

    I believe this cannot be achieved with only pure Leadwerks command set, although using OpenGL is an option.

  6. GWEN is a GUI system written by Garry Newman, creator of Garry's Mod.

    I was in the process of writing a GWEN Leadwerks Renderer using only native commands (unlike all the other libraries out there), but is leaving at it's current progress.

    The main reason is the inability to crop textures only using native Leadwerks commands. (Using OpenGL is a solution though.)

    Even though not all the features are converted to Leadwerks, below library is more than enough to write a beautiful imageless GUI in Leadwerks. (Which is basically what I want biggrin.png )

    I'm posting it here in hopes of someone benefiting out of this in some way.

     

    The Header.

    #ifndef GWEN_RENDERERS_LEADWERKS_H
    #define GWEN_RENDERERS_LEADWERKS_H
    #include "Gwen/Gwen.h"
    #include "Gwen/BaseRender.h"
    namespace Gwen
    {
    namespace Renderer
    {
     class Leadwerks : public Gwen::Renderer::Base
     {
      public:
    Leadwerks();
    ~Leadwerks();
    virtual void Begin();
    virtual void End();
    virtual void SetDrawColor( Color color );
    virtual void DrawFilledRect( Gwen::Rect rect );
    virtual void LoadTexture( Gwen::Texture* pTexture );
    virtual void FreeTexture( Gwen::Texture* pTexture );
    virtual void DrawTexturedRect( Gwen::Texture* pTexture, Gwen::Rect pTargetRect, float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f );
    
    virtual void LoadFont( Gwen::Font* pFont );
    virtual void FreeFont( Gwen::Font* pFont );
    virtual void RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::UnicodeString& text );
    virtual Gwen::Point MeasureText( Gwen::Font* pFont, const Gwen::UnicodeString& text );
    virtual void DrawPixel( int x, int y );
    virtual Gwen::Point MeasureText( Gwen::Font* pFont, const Gwen::String& text );
    virtual void RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::String& text );
     };
    }
    }
    #endif
    

     

    And the cpp file. Make sure to read comments biggrin.png.

    #include <GwenRenderersLeadwerks.h>
    #include <GwenUtility.h>
    #include <GwenTexture.h>
    #include <engine.h>
    namespace Gwen
    {
    namespace Renderer
    {
     Leadwerks::Leadwerks() {
     }
     Leadwerks::~Leadwerks() {
     }
     void Leadwerks::Begin() {
      LE::SetBlend(1);
     }
     void Leadwerks::End() {
      LE::SetBlend(0);
     }
     void Leadwerks::SetDrawColor( Color color ) {
      LE::TVec4 c;
      c.X = color.r/255;
      c.Y = color.g/255;
      c.Z = color.b/255;
      c.W = color.a/255;
      LE::SetColor( c );
     }
    
     void Leadwerks::DrawFilledRect( Gwen::Rect rect ) {
      Translate( rect );
      if( rect.w == 1 ) {
    LE::DrawLine( rect.x, rect.y, rect.x, rect.y + rect.h );
    return;
      }
      if( rect.h == 1 ) {
    LE::DrawLine( rect.x, rect.y, rect.x + rect.w, rect.y );
    return;
      }
      LE::DrawRect( rect.x, rect.y, rect.w, rect.h );
     }
     void Leadwerks::LoadTexture( Gwen::Texture* pTexture ) {
      BP tex = LE::LoadTexture( pTexture->name.Get().c_str() );
    
      pTexture->data = tex;
      pTexture->failed = (tex == nullptr);
      pTexture->width = LE::TextureWidth( tex );
      pTexture->height = LE::TextureHeight( tex );
     }
     void Leadwerks::FreeTexture( Gwen::Texture* pTexture ) {
      LE::FreeTexture( (BP)pTexture->data );
     }
     void Leadwerks::DrawTexturedRect( Gwen::Texture* pTexture, Gwen::Rect pTargetRect, float u1, float v1, float u2, float v2 ) {
      //Ignore this function. Right now you can't crop textures in Leadwerks.
      /*
      Translate( pTargetRect );
      LE::DrawImage( (BP)pTexture->data, pTargetRect.x, pTargetRect.y, pTargetRect.w, pTargetRect.h );
      */
     }
    
     void Leadwerks::LoadFont( Gwen::Font* pFont ) {
      //Uncomment the lines below if you're going to use Leadwerks fonts.
      //I personally prefer the default font better...
      /*
      TFont font = LE::LoadFont( Gwen::Utility::UnicodeToString(pFont->facename).c_str() );
      LE::SetFont(font);
      pFont->data = font;
      */
      pFont->realsize = LE::FontHeight();
     }
     void Leadwerks::FreeFont( Gwen::Font* pFont ) {
      if( pFont->data ) LE::FreeFont( (BP)pFont->data );
     }
     void Leadwerks::RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::UnicodeString& text ) {
      RenderText( pFont, pos, Gwen::Utility::UnicodeToString(text) );
     }
     Gwen::Point Leadwerks::MeasureText( Gwen::Font* pFont, const Gwen::UnicodeString& text ) {
      return MeasureText( pFont, Gwen::Utility::UnicodeToString(text) );
     }
     void Leadwerks::DrawPixel( int x, int y ) {
      Translate( x, y );
      LE::Plot( x, y );
     }
     Gwen::Point Leadwerks::MeasureText( Gwen::Font* pFont, const Gwen::String& text ) {
      if( pFont->data ) LoadFont( pFont );
      return Gwen::Point( LE::TextWidth( text.c_str()), LE::FontHeight() );
     }
     void Leadwerks::RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::String& text ) {
      Translate( pos.x, pos.y );
      if( pFont->data ) LoadFont( pFont );
      LE::DrawTextA( pos.x, pos.y, text.c_str() );
     }
    }
    }
    

    • Upvote 1
  7. I found a simple GUI library called GWEN (much more simpler than CEGUI.).

    It's been created by the developer of Garry's Mod (Garry Newman).

    Writing a Leadwerks renderer for this will be extremely easy as most of this is just linking Leadwerks's 2D API to GWEN.

    Below is the link:

    http://code.google.com/p/gwen/

  8. smashthewindow,

    Yes, there have been many times of economic growth in the past when employers were desperate to get people to work for them. I have lived in such a time.

     

    People tend to always look at times of a better situation than the current. Just saying, of course in numbers right now is pretty bad.

  9. I think that the Bodys are static(when you load a model a phy file will create) ,so you can't scale that.But you can try to make a physics hull in your game(in C++) with the Surface of the mesh und try to scale it.,

     

    Well if that's the case it's no problem for me, as I'm just trying to scale simple spheres anyways. Thanks for the reply.

  10. I'm trying to recreate something like the mushroom effect in Super Mario game. (Mario turns bigger.)

    But in my case, I have to scale a model entity.

    I began searching the API, and I found this page.

    Scaling should not be used with physics bodies.

    Is there any specific reason for this? (eg: the collision information does not get scaled, etc)

  11. I was actually very wary of implementing my own GUI. I looked at CEGUI and a few others and thought the learning curve was too high for what I wanted to do. I reluctently started to develop my own using Paint.net (for design) and the LE commands only. Turns out it was much easier to do it this way. I am only implementing push buttons and progress bars so far, but I think do-it-yourself is the way to go, at least until you get into some more advanced GUI usage.

     

    CEGUI doesn't have that big of a learning curve actually, but it's REALLY bloated library (CEGUI dlls are more heavy than Leadwerks dll...)

    All you have to do is design everything in the provided layout editor and only use C++ code to set callback functions.

  12. You remind me of the times when I was struggling with CEUGI... biggrin.png

     

    간단합니다. 마우스가 눌러져있지 않은 프레임에는 ButtonUp 함수를 호출해주어야합니다.

     

    Example:

     

    if( MouseDown(LE::MOUSE_LEFT) ) CEGUI::System::getSingleton().injectMouseButtonDown( CEGUI::MouseButton::LeftButton );
    else CEGUI::System::getSingleton().injectMouseButtonUp( CEGUI::MouseButton::LeftButton );
    
    if( MouseDown(LE::MOUSE_MIDDLE) ) CEGUI::System::getSingleton().injectMouseButtonDown( CEGUI::MouseButton::MiddleButton );
    else CEGUI::System::getSingleton().injectMouseButtonUp( CEGUI::MouseButton::MiddleButton );
    
    if( MouseDown(LE::MOUSE_RIGHT) ) CEGUI::System::getSingleton().injectMouseButtonDown( CEGUI::MouseButton::RightButton );
    else CEGUI::System::getSingleton().injectMouseButtonUp( CEGUI::MouseButton::RightButton );

     

    또한 이것도 나중에 막히실것 같아서 미리 말해두는데 CEGUI Animations 시스템을 사용시에는 CEGUI에 마지막 프레임에서부터 걸린 시간을 입력해 주어야합니다.

     

    Example:

    (CEGUI 렌더링전 매 프레임마다 호출해 주십시요.)

     

    CEGUI::System::getSingleton().injectTimePulse( (AppTime()-m_timestep)/1000 );

    m_timestep = AppTime();

  13. I'm thinking of a teleport function which moves an entity with exactly the same movement info and relative position to the entrance as it came in, which is why I need the normals and the force.

    Does the movement info ( velocity, force) get preserved after PositionEntity()?

    I don't have access to a Windows platform till next weekend so unfortunately I cannot test this...

  14. I think it's neither. It's the global position of the collision itself. For example if two spheres collide, it would be a point on both sphere's hull.

     

    But then how would the normal or force vector be expressed in global coordinate?

    Also is there a LE function to change position relative to entity0?

  15. 제가 원하는건 디버그를 하면 바로 플레이 하는게 아니라, 메인화면을 보이게 하고싶은거에요.

    리소스에디터로 scheme 파일을 수정하는건가요? 아.. 아무것도 모르겠습니다.ㅠ 예제가 필요합니다..흑..

     

    .layout 파일은 xml로 스크립팅하시고 기본 레이아웃을 불러들여서 각 버튼마다 호출할 콜백을 설정하시면 됩니다.

  16. (Excuse the foreign language, I'll reply in Korean.)

    저 한국인입니다만 저 그래프로는 무엇을 말하는지 모르겠네요.

    리소스에디터로 만들고, CEGUI 인스턴스를 게임내 생성하고 CEGUI 싱글톤 매니져에서 생성한 윈도우 찾아 콜백을 설정하시면 끝입니다만...

  17. yeah it's pre-rendered but I always imagined how they did it, is it like drawing ( as in animated movies such as: shrek (poor example) ) would be so nice to know how, not that I even try to make it myself... because I will use another method as: just use a green-screen and some advanced filters to make it appear such awesome.

     

    My OpenGL book shows how they made Shrek and 2012. A line summary: Create models just like you would for a game, animate them using 3d motion cameras or just by labor, and render them in high-quality in a massive render farm.

    Interesting to know that they used OpenGL for the renderer. :o

  18. I've used TinyXML and it works well too. If you don't know SQL then for sure stick with XML. I would recommend learning SQL at some point for any programmer because it's very handy in a million different ways. It's very powerful stuff and would serve you well in any corporate setting you may find yourself in. I can almost promise you once you learn it, you'll most likely never go back though smile.png It's that good, powerful, easy, & fun!

     

    Thanks for the replies.

×
×
  • Create New...