Jump to content

Paul Thomas

Members
  • Posts

    339
  • Joined

  • Last visited

Blog Entries posted by Paul Thomas

  1. Paul Thomas

    Scavenge
    Hello!
    This blog was created in 2012, but here I am resurrecting it. The option to create a new blog disappeared when I deleted another old blog that had no articles.
    Anyways, please ignore the previous entries, because they are really old and outdated. The code shown in those blogs do not work with LE 4, and I don't even think I have the engine that was released around 2012.
    To catch up a bit; back then I ended up doing contract work with various game engines, then getting the job/career I have now, and I work on personal 2D/3D projects when I get the time. Time is expensive lately, and I'm sure it is for most.
    I had no work and a large web related contract fell through, and I ended up purchasing Leadwerks on Steam. I was in the middle of finding random new engines or rendering libraries I've never tried before. I saw Leadwerks during the sale, made my purchase on July 7th, and started reading the API.
    I got nostalgic reading the API and tutorials. Leadwerks 2 with BlitzMax. It was excellent. During those times I had a "Blogger" blog showing my progress learning the engine. I made a bunch of post-process shaders (which I actually need to do again), a day and night cycle, dynamic clouds, and so forth. Great times. So, I started another blog.
    Laziness and lack of time prevented me from also writing here. I wasn't sure when I started if I would even make a game. I'm still not sure. My day job is fairly relaxed right now, but it often jumps into 12 hour days at times during the Summer. Maybe I can get myself to keep returning even if I only have 30 minutes of time available.
    Now, to explain the map used as my Featured Photo. That is the result of my Biome Generator. Technically, it's just written in C++, but overall it's for a Leadwerks project. You can think of it as a Minecraft clone, but I don't like the word "clone." I will have custom gameplay, points of interest, and so on. I don't have a copy of Minecraft source code either, so my results are from trial and error. Procedurally generated terrain is the shared major difference, and the decision to use blocky art.
    The biome map shown is actually seed #18446744073709551614 (not joking) and is 2048x2048. This is roughly 8 regions worth (8 chunks, and each chunk has 16 blocks) and has 40 different biomes, which include mixed/blended biomes, and generated under the constraints of a temperature map. If you look closely, it includes rivers, ponds, even beaches and coasts.
    You can read more detail about those development days here: https://leadwerks-scavenge.blogspot.com/2023/07/biome-generation.html
    The attached images are the results from development yesterday into this morning (date of this blog posted - yes, I'm tired). It's entirely experimental, but it's basically what I want. I need caves under the ground, and in the end it looks like several layers of caves in a single 16x16 chunk.. I think. At the end I threw in some textures so it wasn't just white. I have a LOT of work to do to add all of the block types.
    Thanks to SpiderPig for the SimplexNoise library!
    If you want to read the details you can here: https://leadwerks-scavenge.blogspot.com/2023/07/3d-landscapes.html
    Starting on the next blog I will write it on Leadwerks first, and then copy & paste over to Blogger. I may just leave Blogger out of it from now on.
    Thanks for reading!
    P.S. The game name is "Scavenge." The name "Scavenge" is actually the name of a game I had designed on paper meant for a post-apocalyptic world. It's too ambitious for a single person with no extra budget. I'm stealing the name from myself for this project.
     



  2. Paul Thomas
    I figured I would finally write up an update. The plan was to juggle between my main project, which has been in development for three years now, and this Leadwerks project I had started. The idea was simply for the fun and experimentation of game development and programming. Which is great, was going great, as Leadwerks automatically gives that overall creative freedom; designing/programming everything from the ground up if you so desire. That is after all one of the reasons we all love LE.
     
    A couple weeks or so after my last blog here at LE my main project hit a milestone that put us into closed beta stage. A very exciting time, especially for a large project you've been working on for years, and the first time you gather valuable input from people that are new to the game as our view of it all starts to get stale. Their input leads to additional tasks which gain utmost importance, especially things accidentally overlooked, which are usually user friendly aspects of the game (easily accidentally overlooked by developers). This all would be the first curve of the curve ball for the LE project.
     
    I was then introduced to another curve of the curve ball; Hurricane Sandy. My area didn't get hit as bad as other area's, but we indeed had taken a beating with 60 to 80 miles per hour winds. The situation is escalated when, like myself, you're surrounded by tree's, or like me your house is right next to a forest. Perfect ammunition for a hurricane with a dose of some bad luck. Needless to say that curve ball had some interesting twists.
     
    Beyond damages caused I ran into other interesting circumstances such as flat tires most likely caused by driving over debris when heading out for building materials. Among it all I also lost my only PC which I use for game development, but at least I thankfully have my work on several backup mediums. My situations don't even come close in comparison to the people in New York and New Jersey, who got the real raw end of the deal, so I have no need to complain, and I haven't.
     
    I don't know how to end this blog. I, of course, plan to get my PC back into working order, but home repairs and bills come first. Once I have everything back in order I will continue where I left off. My main project comes first though and already had a list of tasks before which have only increased as expected. I'm definitely extremely anxious to get back to it all. I'm also tired of using my droid razor for everything.
     
    Thanks for reading and a huge thanks to my friends for all of their help.
  3. Paul Thomas
    I just finished uploading the framework so that some friends can help out with the content and scene. I already have the overall theme and game put together, I just have to make them, and in this case get help with converting models, creating materials, and so forth.
     
    The framework is going extremely well. I've been working on it more than I should be to be honest but I did spend most of the day on the important matters. Plus it's Sunday for crying out loud. Anyways, I've changed several things about the framework. Here is a brief overview:
     
    Configuration is now available in the engine. This provided the gateway to the rest of the features I had plan for the framework, such as key/mouse binds, and generic configuration information for both the "engine" and "game."
     
    The key/mouse bind configuration file looks similar to:

    forward=w backward=s left=a right=d jump=space leap=lshift+space crouch=c | toggle fire=leftmouse aim=rightmouse grenade_toss=middlemouse | release grenade_cook=middlemouse debugphysics=f6 | toggle use=e
     
    It's fairly straight forward but the configuration file can contain basic instructions, such as "release" and "toggle." The configuration class itself provides the rest of the support. Examine the following, which is now accessible to Lua:

    if input:hit("leftmouse") == 1 then -- fire logic end if input:hit(input.get("use")) == 1 then -- use logic end if input:toggle("crouch") == 1 then -- do crouch end
     
    The engine configuration is managed with: config.get("resx")
    The game configuration is managed with: game.get("difficulty")
     
    One last feature I've added is a way to change between behaviors. These behaviors are strictly Lua, a hybrid, and strictly C/C++/C#/BlitzMax. If you provide the file "engine.lua" into the root of the project, the framework will only execute that LUA file after creating the graphics context and managers (config, input, game, etc.).
     
    The "hybrid" is a mix of the two. The framework calls upon specific Lua files at specific times. They could be looked at like "hooks." The Lua files are located at: "/scripts/dice" Examples are "update.lua" and "flip.lua."
     
    The framework also now handles scenes. It allows Leadwerks to process the scenes at the moment but then each entity in the scene to turn into an actor by the framework. This way you can get any actor:

    local actor = engine:getactor("myEditorAddedActorName") actor:translate(vec3(0,0,0)) actor:setkey("health", 20)
     
    Actors have their own Lua files and due to the structure described above we should be able to swap Lua files on the fly. The plan I will be attempting is similar to the following:

    local actor = engine:getactor("myactor") actor:setscript("newscript.lua") actor:runscript()
     
    I assume it will work, but who knows. Since per entity/actor scripts work the flexibility with the framework is fairly polished. I'm starting on default controller mechanics, soon to get into third person characters, and so on. Once my buddies can help me out I'll have more to test mechanics.
     
    Everyone should also check out Scarlet Thread Studios work, it looks to me like an RTS/TPS style framework, similar to Diablo series. Slight modifications can turn that into an RTS, FPS/RTS, and so on.
     
    Same with Pixel Perfect's engine Neutrino, which utilizes EKI One, and is turning out fantastic. I've bugged him to lease it but he isn't budging. Sorry everyone, lol. Just playing, Pixel.
     
    MG, always awesome work. Thanks for joining up to help with the content.
     
    Macklebee, hoping you'll come aboard and help me out with Lua. I'm really not in the mood to fully learn Lua at the moment. I plan to stick with hard-coded mechanics, lol. Read the above, it explains how to force the framework to let Lua control the main loop. Figured that would be your expertise.
     
    Awesome hangout session. I never planned to make it, thought it was out of my schedule, so it was kind of unexpected, lol. I had to register with Google+ and everything. It was fun, meant to talk about more, and to everyone else instead of just Josh, but I had to go AFK; turned out to be too long. I hope I'm invited to the next hangout but I don't have a camera.
     
    Thanks for reading.
  4. Paul Thomas
    Actors are now in place and working correctly. I actually made a small mistake yesterday and made meshes part of the actor. This incorrect because a mesh should extend an object and be it's own actor type (i.e. class EMesh : public EActor{};). This is fixed and therefore the actor creation has slightly changed, but the shortcut (EActor::Add("ActorName", "mesh.gmf")) still works as expected.
     
    Timer
    I need to start adding actors so there are multiple in-game types of entities. First, I need a timer, because I just love timers. Even if it was just a single timer I'd be happy. They are extremely useful.
     
    ETimer::SetTimer(1.0f, TRUE, FUNCTION);
     
    A better example:

    // .. function to execute by the timer void TickSpecial(void) { printf("Tick Special\n"); } // .. looping timer Timers.SetTimer(1.0f, TRUE, TickSpecial); // .. void EGame::Unload(void) { Timers.StopTimers(); }
     
    There is still more I want to add to the timers but this is a good start. I'd also like to move them to threads to support multiple timer tasks.
     
    Cameras
    Cameras are interesting and always seems to be a topic around Werkspace. Cameras in this engine/framework are Actors and this should be interesting. Since cameras will extend actors I already have translation and rotation.
     

    // .. automatically done but an example[/i] - 0 is the framework camera layer to fetch Cameras.Add("Camera_1", 0); Cameras.Rotate("Camera_1", vec4(0.0f, 1.0f, 0.0f));
     
    Next was to just add helper functions that are provided by LE, such as zoom, project, unproject, etc:

    // zoom with interp Cameras.SetZoom("Camera_1", 1.0f, 1.0f); // project vector project = Cameras.Project(vec3(MouseX(), MouseY(), 1000.0f);
     
    I shouldn't have a problem from here having any type of camera "mode" I would like to have. I will begin working on these once I get to detailed mechanics.
     
    Cameras are now working, along with timers, and now it's time to take a break. I may keep pushing forward but shortly I have to return to my other projects until I have time to return.
     
     
     
    Until next time, and thanks for reading.
  5. Paul Thomas
    There are several here who already know me, but for those who don't, my name is Paul Thomas. I've been programming for a long time now; I started when I was 16 (I'm now 30) with HTML, CSS, Javascript, and CGI/Perl. Hell back then there wasn't a lot of people who even used the internet at home, lol. At least in my area, I'm sure others, especially in California, were a lot further ahead at that time in terms of technology and the interest in the technology.
     
    Through the years I've learned multiple languages from strictly web-based to software based. My interest in computers when I was 16 was to make a game, but at the time I thought it would have been much easier to prototype the whole idea in a web-based browser game. I had completed the browser game, which was the original "Eternal Crisis," and worked nicely. My plan was to update the entire web-based system, polish everything, and officially advertise (I had invited friends to play the game). That's when I learned about a "fried hard drive" and eventually learned about "backup" and how to install a hard drive.
     
    Those whom already know me, know what Eternal Crisis is, and my Blogger shows some of the history on that project. I had taken that project, along with another, over to Unreal Engine 3 because it best suit the project. Along the years of learning that engine I was using LE for prototyping ideas and so forth.
     
    While I'm not working on my own engine (temporarily titled "3D Dice"), FPS/RPG framework for UE3, or R.A.T.S., I work on my framework for Leadwerks Engine 2.5. I've never shared this framework before, in fact it always felt like I had to pull it out of a shallow grave each time I added to the framework design and programming. I'm a notebook junkie, I plan out mechanics, structures, and so forth on paper, before going over to digital. Old habbits that die hard I guess.
     
    Now I felt like sharing the progress, which isn't a lot, but it's a great start to me. It's a great start to me because it actually runs, lol. The state of the framework isn't even close to the final planned and written design, but progress is progress. Always move forward until it's finished, even if you can only pick that project up once every two weeks (by then I/you should probably take a look at your workload and fix it instead of attempting such project schedules; however this isn't vital to me and rates low on my importance scale), if it's updated then progress is moving forward. This is also harder to work with if you don't plan your software before actually programming (unless it's routine for you with available libraries for shortcuts in development).
     
    As most programmers should know, the programmers "update" isn't as glamorous as an artists "update" as it's not about visual stimulation but overall program/software flow. In the case of my LE framework (obviously untitled) it's all about providing mechanics and how that is achieved is important especially in the case of LUA access and how everything works together; from configuration/data management, to input binding, and all the way down to AI.
     
    Until occupied again by my other tasks I will eventually share the entire framework structure and I will always be showing examples of syntax; cause that's what programmers do. Just to clear the obvious questions that may come from the community:
     
    Q) Do I plan to give away code, the framework, and be an open source kind of person?
    A) No, not really. First of all, you would have to wait, to anyone else at the moment the framework is as useful is a partially finished library. How long you would have to wait would depend on how much time I can spend on the framework and in all honestly it's not much at all (read above, and actually read).
     
    Q) Do I plan to sell or lease the framework?
    A) No, don't think so. I even think that's against Leadwerks terms since it could be deemed an "FPS Creator," which is definitely in the terms.
     
    Q) Is my framework really that great?
    A) Nah, I mostly ramble, and I'm actually writing this to share with long time friends here at Leadwerks. Some won't even visit anywhere else to communicate because they are so used to using Leadwerks for that; it is indeed where we all met.
     
    Q) Who are my friends?
    A) I have none, it was a lie.
     
     
     
    Now, about this framework. This "framework" isn't the same, exactly, as the framework that comes with LE. The framework that comes with LE handles some dirty work for you when it comes to creating the worlds, cameras for those worlds, shader effects, and helper functions. The framework I'm designing is technically similar to a game engine. I personally consider Leadwerks Engine as a rendering API with physics and this framework uses that rendering API and provides mechanics. The mechanics the framework provides is what makes up the detail of the framework.
     
    INI
    SQL
    Application
    Graphics
    Game
     
    The above are considered "managers" in that they only handle what they should be managing. The "INI" only works with INI files, such as a configuration manager. The "SQL" only works with SQLite3, providing helper functions for easier SQL management, and so forth. There are more planned managers than the above, but these are what are completed in terms of programming. The only real interesting portion to discuss about the framework is within the "Game" manager itself.
     
    The game manager provides two special classes/managers; "Object" and "Actor." Actor inherits everything about an Object. What defines an Object is a game entity that is never interacted with by the player. Objects are useful as it can be used for multiple purposes without consuming a lot of resources for each "component" or "plugin" I'd like to add onto the framework. For example, a Timer would be an Object. You don't interact with a Timer in a game, but there is a timer running in the background.
     
    Example:

    class ETimer : public EObject { public: ETimer(void); virtual ~ETimer(void); void Initialize(void); void SetTimer(float StartTime); void StopTimer(); };
     
    While working with the framework you would do something similar to:

    // EGame::EObject // EGame::Objects EObject Objects; // .. ETimer Timer; Objects.Add("Timer", Timer); // .. ETimer Timer = Objects.Get("Timer"); Timer.StartTimer(0.0); // .. Timer.StopTimer(); // inherited by EObject Timer.Unload();
     
    An Actor inherits everything that defines an Object. The difference between the two is that an Actor is something that a player could see, hear, interact with, or can move, rotate, and so forth. If you can see how this is all going, everything starts extending the Actor, such as the character, weapon, or items. Here are some examples of working with Actors in the framework:
     

    // EGame::Actors Actors.Add("oilbarrel", "oilbarrel.gmf"); // .. Actors.Rotate("oilbarrel", vec3(10.0f, 0.0f, 10.0f)); // .. Actors.Translate("oilbarrel", vec3(10.0f, 0.0f, 0.0f)); // .. EActor barrel = Actors.Get("oilbarrel"); // rotate with interpolation barrel.Rotate(vec3(1.0f), 0.1f); barrel.Translate(vec3(0.0f, 1.0f, 0.0f), 0.1f); // .. EActor Barrel; // new name Barrel.Name = "barrel01"; // new mesh Barrel.LoadMesh("oildrum.gmf"); Actors.Edit("oilbarrel", Barrel);
     
    A quick overview of an Actor:

    //EActor ID Name Tag Parent Location Rotation Mesh Sounds Particles
     
    Each Actor can also have children which are also Actors. This provides another version of parent/child relationships but also provides additional benefits which will be discussed in later blogs. The ID and Name variables are provided by Object and the Object provides more variables, but is listed for importance.
     
    When creating an Actor it is automatically tagged for unique identification. In the above example "oilbarrel" is actually stored as "oilbarrel_0" and simply incremented for each Actor that is created. This is identified by the Actors "Tag". The "Name" variable is a forced name, therefore searching for an Actor by the name, with more than one Actor having the same name, the first result is returned.
     
    Actors will be automatically created properly for each entity in a scene. The framework will be using a custom scene manager and handles initial Actor creation. Programmers/Scripters can then add to the Actors list with C++ or LUA like the above examples.
     

    class MyGame : public EGame { public: void Load(void); void Update(float DeltaTime); // .. void MyGame::Load(void) { Actors.Add("custom_actor", "mymesh.gmf", "force_tag_name"); EActor actor = Actors.Get("custom_actor"); EActor actorCopy = Actors.GetTag("force_tag_name"); actor.Translate(vec3(0.0f)); } void MyGame::Update(float DeltaTime) { EActor actor = Actors.Get("custom_actor"); // interp move with speed and threshold option actor.Move(vec3(10.0f), 1.0f, 1.0f, 0.35f); } };
     
    In upcoming blogs, when I do get the time, I'll post up some videos. Those selected for the invite only alpha testing will get their information on how to use the framework. Friends of mine that didn't get an invite and are interested in alpha testing please private message me; I most likely didn't send you the information because I figured you were busy with your own project(s).
     
    Well, out of time. Thanks for reading.
×
×
  • Create New...