Jump to content
  • Advertisement

Blogs

I Am Overburdened, saving my soul

Hello everyone, So much time has passed. I’ve been away from my online life and making games for months. Thanks to some new opportunities it looks like the time has come for me to return to active development again And what better way to restart my venture than putting out new updates for my games I will share some details about my short term plans soon, but I’m devoting this entry to a long-overdue I Am Overburdened update! Update Version 1.2.0 is live and the highlight of it is the save-game feature! Besides this one major addition, it is mostly a bug-fix and tweak build. Save & Exit Finally the game can be suspended in the dungeon and continued later. Since a full play-through is relatively short plus I Am Overburdened is primarily a rogue-like and save-scumming would undermine this core idea so only one save slot exists. Of course more could be added with slots only having a continue option if there are genuine requests for it, but I think the game works well this way. This is more like a convenience feature to be able to stop playing at any point you wish and finish the run when you have the time to spare. The pause menu had to be reorganized a bit, since it was already crammed. As you can see it’s cleaner now and the last option saves and closes the game. I would like to create a more technical post too about this specific feature. Kind of like a tutorial about aspects of save systems. Let me know if you are interested! Immediate (Save &) Exit The immediate exit hot-key was remapped from F10 to F9. Sorry about this change, it was a necessity (os/platform reasons), but as a bright side it also supports saving the game. So now if you hit F9 during play and the game could be continued (e.g.: the player is not dead ), the state will be saved just like when saving and exiting using the pause menu. This change is already reflected in the input guide. Pesky bugs I’ve been working on the game on and off in short bursts in the last months and alongside with the community I discovered some problems too. I fixed quite a few things so I’m simply going to list them: Few items and their related skills could cause a crash under super specific circumstances. It’s not likely many of you run into these issues, but if your play was interrupted by a crash I’m sorry.
Certain item skills with persisting effects (e.g.: Fear, Cripple) could get stuck or be triggered on recently summoned/resurrected monsters in rare cases. These were not visible, but could affect how well you did, so my apologies for the occasional unfair (de-)buffs.
The positioning of hallucinations from toxicity effects (e.g.: Toad monsters, poison in potion) were not correctly randomized. These hallucinated monsters were always placed in the upper-left quarter of the map, breaking the illusion. Now this is fixed.
A while ago I added item-slot notifications to item pickups and chests when standing nearby. It did not occur to me though, that with this modification the treasury pickups and chests triggered unnecessary ones too. Oops, fixed!
  In balance With this update balance tweaks found their way into the game too. There were still some complaints regarding this aspect, so I made normal mode a tad bit harder and nightmare difficulty a tiny bit more forgiving. These are not substantial changes, only slightly affecting the pickup and chest spawn rates. Another extra is “near death” detection. Simply put if you end up in a really bad situation at some point, the game tries not to punish you even harder on the next dungeon level These changes are subtle, so they keep the game challenging, but they were introduced to make it more fair at the same time. Boss confusion Some people found the boss level corpses confusing. I don’t know if the new version will work out better (this is not the first time I change this ), but now the number of corpses (below the one serving as the story hint) are tied to the unlock progress of the boss entry in the monster book. I know some other unlocks still need more and better hints too. I’m going to work on these problems in the near future… Am I still alive? Yes, pretty much. Due to personal and financial reasons I had to put full-time game development on hold for a long while, but I’m back now and I will be working on my projects in the upcoming months. Before I vanished from the face of the INTERNETZ I teased possible ports and a bigger content update for I Am Overburdened. These are not forgotten and progressing well In a week or two I will reveal more details about my plans. Until then, have a fun-filled time.
Thanks for reading and take care!

Spidi

Spidi

The autopsy of Crazy Chicken..

Just to start off with... I have this underlined fear that I've missed a part of the challenge that says "Must be a Frog" 🤣, But howdy! I quite liked making this little game. I first thought that it was going to be well complicated to do and then I really thought about it and it was simply 'collision' and 'movement' really... (Just FYI this is done via Game Maker Studio but NOT drag & drop, actually coded -- Don't know if that matters) and so I began to crash cars into this small Chicken Icon.. and I did actually miss out on a detail from the challenge actually...  "Must maneuver the character across obstacles, moving and stationary" -- I specifically missed the 'and' so I'd made a working version with 3 bits of road and cars going left n right, I'd messed with speed a bit to try and find a decent 'balance', I was thinking to myself about 'How would I do something like the logs from frogger?' and 'Its okay, I'll submit just with Cars and then try to do an update with a water area or something' so upon 'finishing' I reread everything as a checklist and realized that you actually need to have moving obstacles.. I thought it was over! lol The water and boats bit wasn't too bad though once I started thinking about it. (I am now some super pro coder so there's probably much better methods that I am yet to learn) I've gone with the approach that IF the chicken is touching a water tile and NOT touching a boat, die. Kinda thing.. I first tried to add this in reverse as in, IF the water is touching the chicken and not a boat but it just wouldn't register, maybe because there's multiple water tiles or multiple boats or it just didn't want too but the chicken accepted it! And i'm really glad it did because genuinely last night I was actually lay awake for a bit thinking about the old frogger with logs... The boats I used are actually from a pirate pack from Kenney Assets and its like a 'bare' pirate ship.. I don't have mad skills with graphics and the challenge didn't mention having to draw so i went with it. I hope that's okay! I reckon I might need to slow down the boats a bit and maybe add more cars... but this is my nemesis right here... "Balance". I'm trying to think about what went wrong and what went right, it kind of all went right at the moment.. I mean I don't think it was an overly complicated process and if you break it down into its core mechanics, Move, Collide, Die, then add Timer, Then add points and/or point conditions. I made it so if you have 15 seconds or more you 'get' 200 points, 10 seconds or more 100 points, else you get 50, The score doesn't really do anything or go anywhere but it works. I hope that meets the requirement for a score system and I don't actually use a score variable. I was thinking about just taking the remaining time and multiplying by 10 and then that is your score but I opted for the 3 set scores instead. I know how to do both I just chose the timed conditions (Which could also work with a point system and you use time conditions to give a 'bonus' either points equal to the value of remaining time or if you have 10 seconds left get 10 points etc etc...  I don't really do the whole bloggy thing much so I end up just writing more words than are necessary and I'm not sorry nah kidding, Peace out! -- how do you end a blog though? lol

CyberFlash

CyberFlash

 

Frogger GameDev Challenge - Part 4 - Frog Jump

I haven't touched this project since my last update on October 24 2018, motivation is a bit shot with this one... but I'm still going to try to complete the challenge. This project is really just an excuse for me to try out Unity as I've never used it before. I've spent a few days in the engine and must say it's pretty straight forward and thanks to @lawnjelly for helping me out with a few questions I had. I did a quick animation for the frog jump in Blender, then loaded it into Unity, and added in the movement to work with parts of the animation. Nothing outstanding animation wise but it will work for now. Movement will stay 4 directional with animation lock. I'll need to edit the move value once I figure out spacing. GIF Below: Later today I'll workout my "game plan" for how to put everything together then post back. I haven't really consider scales yet for objects, or environment textures. Anyhow, that is all for now.

Rutin

Rutin

It's NOT a Simulation! :D

I think I've finally put my finger on the button(s)(quite a few apparently) that may explain my project.  It's helping me to clarify my vision anyhow, so just play along okay? I'm not building a game simulation....  I've been trying to use that term because it's what everybody else uses, and it really just doesn't fit my project at all. There is no single starting point and there is no single ending point.  The story elements are to be primarily interaction based and not strictly tied to highly specific locations or circumstances.  The visual synchronicity of the experience is only dependent on entity proximity, which in effect makes it more of a relativistic kind of synchronicity than the absolute kind anyhow.  All gaming entities(players,npcs,mobs,bosses..etc) will be autonomous actors in the gaming environment, regardless of what controls it.  e.g. Each NPC will essentially be their own entirely isolated behavioral code(running on a server OR client node somewhere).  This code will generate a game entity that is just as actualized in the environment as any other object or player character, it will just behave according to its "script".  All in real-time, with client controlled physics. So, I'm building a "Multiple Entity Gaming Environment".... It's a working title..   In essence, instead of streaming data that has been aligned to a unified simulation out to many many clients, I'm streaming data about many many ongoing semi-synchronous real-time "INTERACTIONS" from game clients into a massive, fast, circular buffer.  From which, the servers shall draw conclusions and route corrective actions to multiple endpoints simultaneously, and hopefully in many cases, preemptively. When we're worrying about things in a game becoming out of sync, it's usually in relation to some kind of fast motion or relative positioning, a gun-shot or a left hook, something that is moving/has moved/will move and the event needs to have the same outcome on multiple gaming clients.  Users in most games with this kind of action, don't generally care if their team-mate was .5 meters closer to them then they looked like they were when they helped shoot down the boss.  They only care that the shots they saw coming from that team-mates gun were hitting the mark that the team-mate was aiming at, which was hopefully the boss, if the team-mate is any good. This may be something of a contrived example, but it more or less illustrates my point.  As long as the servers can provide the appropriate real-time adjustments to certain aspects of the entity interactions to make the synchronicity fall into a zone of acceptability, then nearly all the heavy lifting can be done by the client without running every client input into and back out of a tightly wound server controlled simulation.  Then, how do we control anything?  The major change here is how Authority is implemented, in a standard server-simulation, the policy is trust nobody.  Here, it is trust everybody, but also verify and cross-check everything.  In this paradigm the authority is purely corrective in nature, with designs on preemptive corrective abilities(where applicable), but primarily relying on minuscule corrective actions that steer the simulation variances into a zone of acceptability. Another fairly extensive level of control comes from the decoupled nature of the system.  Since all entities are autonomous components, they can each be turned on or off at will.  So, that pretty much gives us all the control, never heard of before.  Each entity can be rewritten, debugged, uploaded and instantiated into the game.  Without a single system restart, or change to the game code(goals, I got em).    So, since we aren't wasting all of our server horsepower on a massive interactive simulation, we can use it to play cop, crossing-guard, mail-carrier and chauffeur all at once. We can implement heavy-handed position and relative distance checking into the entity data feeds that are being streamed INTO the servers, we can correlate those patterns with known good behaviors and known cheat behaviors/known out of bounds behaviors.  We can implement corrective actions that will steer the entities back into synchronous path(s) when necessary.  And we can allow certain entities to become out of sync for longer periods without risking the integrity of any one game-wide "simulation".  Generally speaking, entities that fall too far out of sync can either get dropped like a laggy player, or will be re-instantiated from a node of the network closer to the action, depending on it's level of importance to the current branch of the narrative/network or game conditions. Haha, well I hope that this rambling mess helps you understand what I'm doing better.  The more I write it down the clearer it becomes to me.  I started building this beast before I even knew what it was going to look like.

Septopus

Septopus

 

1943 Plane Game

I am still working on my 1943 plane game. I have got the one plane to move and shoot bullets in all directions. I am going to do the same for the second plane.

phil67rpg

phil67rpg

 

Update 0.19.0

Still just a start, WIP, but finally a new step done. 
New assets, new sandbox map…
Isometric and alpha maths has been rewritten but still needs a lot of refactors and reviews. http://game.applicant42.com/

applicant42

applicant42

 

Gameplay Xilvan Design games for 2018-2019!

Hi everybody, Xilvan Design building 3D games since 2004 in Blitz3D, we now present you our kindly official gaming related pages. (please click on each links, download games & bookmark the pages): Lights of Dreams IV: Far Above the Clouds v9.27. Candy World II: Another Golden Bones v9.47. Candy Racing Cup: The Lillians Rallies v3.01. Candy World Adventures IV: The Mirages of Starfield v7.57. Candy to the Rescue IV: The Scepter of Thunders v7.17. Candy's Space Adventures: The Messages from the Lillians v17.47. Candy's Space Mysteries II: New Mission on the earth-likes Planets v7.47. New Xilvan Design Websites. Xilvan Design's Youtube Channel. Friendly, Alexandre L., Xilvan Design.

Xylvan

Xylvan

Frogger Challeng - Update #3

This week I looked at having cars properly generated on one end of the level and destroyed on the other. And some adjustments so that I'll be able to tweak frequency and travel speed a little later on. It's hard coded at the moment still and I'm pretty sure it's not all tuned quite how I want it but it's ok while other development is going on. On Wednesday I threw together a turtle sprite with diving and surfacing animations (not shown in video) and I'm quite happy with how it turned out. The turtle almost feels as though it doesn't quite fit with the style of other graphics but I'm going to keep what I have. I started with a copy of the Car class for the turtle so I was able to get the turtle following tracks similar to what the cars do. But I realised that I don't have to set a track of data on all tiles, I just have to set it on corners where I want turns to occur which allows for paths to cross each other. Also, when I was distracted at one point, a turtle collided with the frog and killed it, following the car logic. I figured it might be a good feature to keep in the game. Even if the frog can jump onto the turtle's back, standing in the path of a turtle will kill the frog. The video shows a frog starting off and crossing the street. Cars wait their turn at an invisible traffic light and proceed accordingly. I have one turtle walking on the ground in a clockwise square path and another in the water on a path that crosses over itself in a number of places and is near the shore in a few spots. Near the middle of the video, the frog gets in the way of the turtle on the ground. After that I quickly show a little tile debugging information that drive the directions actors are traveling.    

kseh

kseh

 

Getting back to it

I haven't been around alot recently due to my pc deciding not to work and time constraints but I am back! To get back in to it I decided to make a quick game me and my niece used to play with cards. The object of this game is to multiply the cards quickest and the winner gets the cards. Ok so after messing about for a day with it i have got a single player edition playable.   It is not anything pretty by any means but it was a good way to get back into the swing of things. I will add options to it so you can choose the highest card 1-13 and how many decks of them cards. I would like to also make some sort of nice win screen too as at the moment it just takes you back to the Play/Exit screen.

Gooey

Gooey

 

Hot Potato Minigame

Progress on a new minigame, playable by blind users. To pass the potato you have to jump and when the timer expires, the last one with the potato explodes.  To do: add sounds to indicate which player the potato is on. 2018-11-12_16-28-47.mp4

MAJI-JACK

MAJI-JACK

"Bullet Hell" Mini-game Update

This week I added options for up to 4 players. Right now, each player is controlled by the keyboard but support is going to be added for the Xbox Adaptive Controller. I also added a basic sound to the bullets that pans and changes pitch depending on where the bullet is on the screen. For example, a bullet coming from the top left of the screen and moving towards the centre would start at a high pitch sound and drop lower, as the sound also pans from left to right. I also added a temporary sound for the player getting hit. Eventually I want to replace these 2 effects with better sounds, along with adding sounds effects for bullets colliding with each other, and player colliding with each other.  Difficulty now scales over time, so that projectiles are spawned more frequently over the course of the game. An artist on this project, Carlos, made the background for this game. For other visual assets to fit the theme of the game overall, the players will be blobs, created and animated by Janus, another artist on the project. The "bullets" might be displayed as salt or fire balls to also fit into the theme of the game.    Version of the game for fully blind gamers:  With the bullet sound effects in the game, I made a version of the game that should be playable by fully by blind people. It can be played completely with sound cues. Players are able to know where the projectiles are coming from and should be able to dodge without looking at the screen.  In this version, the bullets are always travelling towards the centre of the screen, and get destroyed at the centre of the screen. The player is also "stuck" to the centre of the screen. When the player presses a movement button, the player is moved in that direction. When all of the buttons are released, the player moves back to the centre. This is to keep the players and sound effects relative to the same position.  It was suggested to me to have the sounds relative to the player, instead of relative to the centre of the screen. Then, this version of the mini-game could keep the fun player movement from the original and still potentially be fully playable with only sound cues. I decided to keep the sounds relative to the screen and players stuck in the middle in order to keep the multiplayer aspect of the game. If I had the sounds relative to the player, there would need to be audio channels dedicated to each player, and each player would need to wear their own headphones, which a. takes away from the social aspect of the game, b. would be a mess of physical wires with possibly not enough places to plug in headphones (who has 4 audio jacks?), and c. would be a mess to implement.    My updated to-do list for this mini-game in no particular order: Display lives on screen.  Replace current audial assets. Add more visual and audial assets.  Add support for up to 4 players in the new version of the game.  Redo controls to fit Xbox Adaptive Controller.  Create a menu to select controls/options/customizations.    -Matthew Ierfino  

MAJI-JACK

MAJI-JACK

 

This Week in Game-Guru - 11/12/2018

This week's update may actually make it to the Game-Guru news page, woohoo!

We'll see.  I've been in communication with TGC's marketing person and it's moving forward, albeit a bit slowly.

Official Game-Guru News Well, it doesn't appear they have added anything new as of this writing, though typically news releases seem to be done later today or tomorrow.  In the interim I can say I found this site:
https://www.game-guru.com/news-posts?post_type=guest-authors
Which currently only has one post but hopefully yours truly will see the light of day there soon.

What's Good in the Store This week we've got two entries.  One is a timely turkey, as it were, just in time for the grand American holiday of Thanksgiving were we gorge ourselves on copious amounts of food and then fall into a comatose state.
A little small, by 'murican standards.

Campana productions put this one together and you can find it here: https://www.tgcstore.net/product/32155

Next we have a really nicely done pack of snow-themed assets.



It's got everything from buildings to vehicles.  I'm also happy to see he included a few free models for you to trial as well.  It's well priced at $8.00 which is a bargain by any standards.

You can get your copy here: https://www.tgcstore.net/pack/11058

Free Stuff
In the realm of free stuff we're getting into the giving time of year and it shows!
Lafette, as mentioned, has a few free things on that pack you should grab.  He also made a train station too though.

You can get your copy of the 'Free old German train station' here: https://forum.game-guru.com/thread/220209

It appears GraphiX is making headway on his new kit, though I'm not sure if it will be free (though he keeps posting updates to the free forum so.. maybe?).  You can watch a video on this interesting sci-fi pack here: https://youtu.be/CToyFLW70d0

Mstockton released some free music over at his site.  Definitely head on over and make sure to like the page for him! https://michaelstockton.net/cartoon-casual-game-tracks-volume-1

Honkeyboy released some Lua code for Game-Guru that allows you to setup chatting NPCs relatively easily.  https://forum.game-guru.com/thread/220225#msg2608076
It's mostly to control the animations though so you'll still need to manage all the other elements such as sound and text. 

Third Party Tools and Tutorials I found this ENORMOUS tutorial playlist on Game-Guru related topics on youtube over the weekend while doing book research: https://www.youtube.com/watch?v=HjSBCevTnYI&list=PLot9BTdhKKd4KV91P7WkIKVsybktHu1Za

Random Acts of Creativity(WIPs) This has been an absolutely crazy week for updates so if I missed you, apologies.  I *THINK* I got them all.  So in no particular order....

Schneeky has a fairly well done Medieval project put together.  I'm curious how this will bear out.  https://forum.game-guru.com/thread/220228

Honkeyboy started a new project.  Not so sure about this one, but if he polishes it, maybe it'll take roots for him.  https://forum.game-guru.com/thread/220201#msg2607752

A new user "OPENLOAD" made an italian title that looks very promising "Il mio primo lavoro "Memory of the Hedolan": https://forum.game-guru.com/thread/220223

Of particular note is DVader, who crawled out of the woodwork to deliver a holiday-themed project.  Why this is noteworthy is DVader is actually a fairly competent coder so you can expect some interesting work from a technical standpoint in this project.  https://forum.game-guru.com/thread/220214

Ertlov released a slice of his game 'Into the Ice' for testing - check it out here: https://forum.game-guru.com/thread/206985?page=3#msg2608009

Bonesy continues to update Cyberfi and it's actually starting to look like a real game.  This is a great example of what happens when you focus, buckle down and actually WORK on your projects!


Granada's been working on some guns in Game-Guru and I have to say I love the exaggerated look!


In My Own Works
I'm drawing closer and closer to completing my book, now within striking range of my target for completion.  I'm at 110,000 words and counting.  Once I pass 120k I'll probably keep going to 125/130k and then remove about 3-5k for editing.

This week was all about advanced AI control, sales, marketing, and piracy.  Very preliminary editing work began with chapter reorgs and other things.

Further this week will be mostly Lua oriented as I wrap up the 'intro' chapter to Lua, then do a complete Lua command reference for Game-Guru, and if I have time work on the Advanced Lua chapter (which I will admit I am somewhat dreading).

See you next week!



View the full article

Bolt-Action Gaming

Bolt-Action Gaming

Unity Weekly Updates #20 - Loading...

Last week wasn't concretely visual or anything... It was mainly an integration one. There was also some graphical updates plus I've also made part of the options menu. Graphics First, let's talk about those graphics. Previously, the skybox was of a solid colour. This was a placeholder skybox. However, I thought about it and came to the conclusion that it was about time to have a better one. I've searched on the internet and found this lovely gradient skybox, so I've added it to the game but with a bit of pizzazz. Basically, I've added a screen-positioned grid pattern and make a big dot in it representing the sun. I've loved it so much that I've decided to add it to my levels too! Here's how it looked previously: And here's how it looks now: I personally like how this looks. Also, previously the directional light that lights the scenes weren't following the colour palette, so I've added a bit of script to help with that, hence the different lighting... Integrations I've mainly had to link up the menus and the actual first level of the game. To do this I've used the Scene loading functions of Unity. I've added a nice loading screen with a working loading bar that fills up to the loading process' actual progression. There is, however, a bit of a hiccup while loading the level. The game window actually freezes and seems like it stopped working... This might be related to the loading process of the Music Player I've previously made: while the process loads in a different thread, the first load is done on the main process. This makes the game hang up until the first song actually loading...  This is something I'm currently working on. Options Secondly, I've also added a bunch of drivers to the options screen. Let's take a look at each tab... General This is where general options will be. Right now, there's only a dropdown to switch languages, but eventually, there might be more options if it's needed. Graphics This is where the meat is.  Here, the player can set many types of graphical settings, like resolution and quality settings. There are six quality presets: Very Low, Low, Medium, High, Very High and AESTHETIC (Ultra). There's also a seventh one, called Custom, where the player can set each graphical settings separately. As of now, this setting doesn't do anything, as it is only a driver. Audio This is where the player can set all its audio configs. Mainly this is where the player can adjust any volume sliders. There's also another section called "Others" where other audio settings can be set. As of right now, there's only a toggle indicating whenever or not the VaporMaker is active. There might be more options in the future. That's about it for options: the other tabs are still in development. Minor Updates Reflection Probes! Now there's a bunch of reflection probes in special rooms. This means that lights will feel more natural and specular materials will look better. Shader optimizations. I've optimized some shaders and the game builds quicker. (Speaking of build...) I've created a really dirty private build of the game. While still building, there was a lot of bugs and isn't really presentable. The important thing is that it builds properly and without any hiccups. I've fixed some bugs with state loading and overall scene progression. Previously the level scene was completely separate from the menu screen, meaning that a lot of states appeared twice between the scenes. Because these are supposed to be singletons, many of the level's controller were removed, breaking everything. Next week Next week is going to be the continuation of the integration. I mainly need to fix my loading screen hiccup problems and many other things. Afterwards, I might need to make an actual progression between each level. As of right now, there's only one level with no exits. Afterwards, it's gonna be boss time! And then after it's the usual suspects... I gotta say, with all that integration, I'll be soon ready to actually publish some kind of demo or test build by the end of December.

jb-dev

jb-dev

 

New FreeType-based generator

My work on UBFG is still continue, but I decided to go with some important changes: I gave up the original UBFG Qt-native font generator for FreeType-based (looks like nothing left of the original UBFG code - I might change the name of the application in the future as well). This seems to be more friendly to cross-platform and gives me better access to glyphs info (so. eg. I can export svg atlas). I have a plan to finish with the development until the end of the year.

piecuch.p

piecuch.p

 

Spacing in Different Levels

One of the problems we’ve ran into is the amount of space we have for each player playing our game. We’re going to have to create the rooms for small spaces, preferably 2m x 2m walking space and on the outliers We’ve come up with some solutions in traveling through the maps easily. 1.       We would start by separating the rooms into different levels. Simply by touching the doors. Once touching the door, the player would teleport to the other side of the door. 2.       We would leave it in an open concept and hopefully the player has enough space. 3.       The elevator idea, which fixes all these problems and changes the way the levels are constructed. Basically, through using the elevator, once the player enters the door the player would have to turn around to press a button and go to the next floor.     Also, another way of moving through the corridor with small spaces was using a horizontal escalator.   And an update on what the equipment room can possibly look like:     Where those are cabinets where equipment will be placed inside of. Those Cabinets will be able to open and close. Later it will be a lot more detailed with computers and accessories. Past the door is an elevator that will also be detailed in the future.

DATT3701Group

DATT3701Group

3D FusionIDE W.I.P 1 -

Here is the welcome screen to fusionIDE - it is a multi-state, multi-form custom editor wrote 100% using vivid3d's 3d and 2d capabilities. The UI is called ResonanceUI.  This is all OpenGL based. Here is the video of the welcome screen.   

Vivid3DDev

Vivid3DDev

All Servers Are Now On Linux!

Okay, the servers are now all running on Linux.  I had initially intended to wait until all development was mostly completed to make the transition but now I'm glad I've done it.  And, the more I use Visual Studio Code, the more I appreciate its simplicity and how well it's adopted the Linux environment.  It's starting to feel like home now that I've got a few active projects going in it.  Plus it's nice to clear my Windows development space, I could have 6 or 7 copies of Visual Studio open at one time before this, now I've only got the Unity game client and whatever test projects I need to sort out the next functional leap.   The rest is all in a Linux VM that I can VNC into if I need to use Visual Studio Code, otherwise I can do everything server side with an SSH client. The next step for these servers is to massage them into actual Linux Daemons, which shouldn't be HUGE, but it will take a minor rewrite of some bits of code.  Not a huge issue until I have a real server though.  So, really the next step is to get the base functionality built out in the next 3 Servers(Mob, Narrative, & Social) Here's a quick video of the client(Unity Windows) testing out all 3 current servers running on Linux. Top to Bottom: Avatar Server(Authentication/inventory/etc..), Economy Server(Banking/etc.), Action Server(Online Multi-Player/etc..) First we test the Action Server with the standard Ghost test you've seen here before, but then I mess a little with the banking features(transferring credits to/from inventory), and then I show how the drop item from Inventory and Pickup item(into inventory) works. Enjoy.   As always, more to come soon. linux_3.mp4  

Septopus

Septopus

 

Graphics Programming weekly - Issue 62 — November 11, 2018

Optimize your engine using compute @ 4C Prague 2018 overview of the compute shader execution and pipeline model explains how instructions are executed, what the difference between uniform and non-uniform work is and how it relates to SGPRs and VGPRs using the example of texture downsampling to present the performance profile of a pixel shader solution and why a compute shader solution can achieve better performance pptx archive wayback-archive Intro to gpu scalarization – part 1 overview of the GPU execution model, the difference between scalar and vector registers and instructions explains the concept of scalarization and how wave level instructions enable this process pptx archive wayback-archive Intro to gpu scalarization – part 2 walkthrough of two different strategies to scalarize the forward+ shading loop provides code, step by step analysis and links to more in-depth presentations pptx archive wayback-archive SIGGRAPH Asia 2018 – Technical Papers Trailer overview of some of the technical papers that will be presented during SIGGRAPH Asia 2018, 4-7 December 2018 in Tokyo niagara: GPU object culling adding support for multiple meshes and GPU frustum culling and submission one Dispatch to execute culling and one ExecuteIndirect is used to draw the rest of the scene code niagara: Faster culling and LOD improving culling performance through the removal of dummy draw calls implementation of LOD selection per mesh support querying of pipeline statistics to gather information about the number of triangles drawn code VK_NVX_raytracing - Triangle A walkthrough that explains all the concepts and shaders necessary to ray trace a single colored triangle using the Vulkan raytracing extension code wayback-archive Accelerated Ray Tracing in One Weekend in CUDA explains how to convert the code from the Ray Tracing in One Weekend book to use CUDA the source code is available here, one branch for each chapter code wayback-archive 2D Signed Distance Field Basics unity tutorial that explains how to create a signed distance field for a 2D circle and rectangle how to apply transformations (translation, rotation, scale) and how to visualize the distance field to aid debugging wayback-archive Picking and Hit-Testing in Metal explains how to implement 3D picking in a Metal application overview of coordinate spaces and how to convert between them hit-testing performed using a ray vs. bounding sphere test wayback-archive Few words about HLSLexplorer a tool, now open source, that allows the compilation of HLSL and shows the disassembly in DXBC and AMD GCN includes a small utility to visualize the effect of a fullscreen pixel shader effect wayback-archive Image Editor Effects list of image effects found in tools such as Photoshop with a small explanation and GLSL code snippets code If you are enjoying the series and getting value from it, please consider supporting this blog. Support this blog
Read more

jendrikillner

jendrikillner

Advice (Updated) Struggling With Remembering What I've Learned.

Well, in my journey (and completion) of learning C#, I've come upon a rather peculiar problem. I don't know if it has to do with having high-functioning autism, which I do, but I seem to struggle to remember anything related to this. If I see it and am given an example I can copy and reproduce results from a simple tutorial, I can do it usually without error (if not too complex). When I attempt to write my own script, my brain completely goes white. I can't remember or figure out how to use different parts of the C# language, and it's like attempting to read Chinese when I look through Unity's Scripting API and look for other tutorials for supplemental learning. I take notes, I pay full attention to the videos and interact along with them, and I do attempt solitary practice. I just can't seem to get anything to "stick" to the point where it makes sense outside of a learning example. I can't seem to apply what I'm learning in reality, and it's becoming a great problem. Does anyone have any advice for getting this stuff to stick? I've always been a visual learner and a hands-on learner, but with logical stuff that isn't within the realms of art has always been something I've had a hard time learning and remembering later on. I appreciate any advice you can give. Thank you. EDIT: Updated on 11/11/2018 because I've been sick and busy AF with stuff outside of coding. I have been making great headway thanks to the set of tutorials made by http://rbwhitaker.wikidot.com. I was recommended this tutor by the user Septopus, and good gods has he been helpful at breaking down the stuff I didn't understand. I've been following along with the beginning C# tutorials, and will move on to MonoGame ones when I am comfortable. I cannot thank you all enough for the support and encouragement you've given. Just another sign I should keep going with this. Take care! 

ODDVIKINGSTUDIOS

ODDVIKINGSTUDIOS

The 3D book

After a break of several years the 3D book project is back on.   A few short words now on what this blog is about.  I have to deliver my wife to the bus station in a few minutes, then a week alone so may have the time then to explain things.  But the 3D book is something I started in 014 and put several years into, then the break, now on again.  A win32 app with a text window and an ogl window. I just remembered I had something written on this so here it is I write to see if anyone in this community of game developers, programmers, enthusiasts,  may be interested in a project I have been developing[off and on] for several years now. So follows a short description of this project, which I call the 3D-Book project.  The 3D-Format Reader: A new format of media. Imagine opening a book, the left page is conventional formatted text - on the right page a 3D animation of the subject of the text on the left hand page.  The text page with user input from mouse and keyboard, the 3D page with user intput from a game pad.     An anatomy text for a future surgeon, with the a beating heart in 3D animation.
    
    A childrens story adventure book with a 3D fantasy world to enter on the right page.   
    ...     Currently 3D-Format Reader consists of a C++ Windows program: Two "child" windows in a main window frame. Two windows: a text-2D rendering window and a 3D-rendering window.  The text-2D window, as its' name implies, displays text and 2D graphics; it is programmed using Microsoft's DirectWrite text formatting API and Microsoft's Direct2D API for 2D graphics.  The 3D-rendering window uses the OpenGL API.     A 3DE-Book page is formatted in one of two possible modes: DW_MODE or GL_MODE.  In GL_MODE both windows are shown; the text-2D rendering window is on the left and the 3D OpenGL window is on the right.  In DW_MODE, only the text-2D rendering window is shown, the OpenGL window is hidden (Logically it is still there, it has just been given zero width).     The 3D-Format Reader reads text files, which consists of the text of the book, control character for the formatting of text, (bold, underline, ...), display of tables,  loading of images(.jpg .png ...), and control of 2D and 3D routines.           3D-Reader programming is based on a Model-View-Controller (MVC) architecture.  The MVC design is modular: The Controller component handles user input from the operating system , the Model component processes the input, and the View component sends output back to the user on the display.  Typical Parent-Child windows programs have multiple "call back" window procedures(winProcs): One for the parent window and one for child window.  The MVC model, simplifies message routing by using a call-back window procedure which receives Windows messages for the main window, the text-2D window and the OGL window.   
    
    A sample MVC program by Song Ho Ahn was used as a template for the 3DE-Reader. Rushed for time now, so a hasty sign off and thanks for reading. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 8 - 21 -18 I spent the last few days working on procedural mesh generation.  First looking to find a bit of code to do what I had in mind.  Which begs the question: What 
did I have in mind?   I just wanted a cube mesh generator such that...   Requirements Input:    An integer  n = units from origin to cube face. Output:  The vertices for a unit cube centered on the origin.                                                                     8n² triangles per cube face. 3 times 8n² verts in clockwise winding order (from the outside of the cube) ready for the rendering pipeline. Screenshot of some cubes generated with the procedural cube mesh generator.                              That was about it for the output requirements.   I did not want to hand code even a single vertex and did not want to load a mesh file.   I was sure the 
code was out there somewhere, but was not finding it.  So, a bit reluctantly at first, I started coding the mesh generator. I started enjoying creating this thing and stopped searching for the "out-there-somewhere" code; although still curious how others did this. Analysis First question: How do we number the verts?  It would be great to conceive of some concise algorithm to put out the cube face verts all in clockwise
order for the outside faces of the cube directly.  That seemed beyond me so I plodded along step by step.  I decided to just use a simple nested loop to generate the cube face verts and number them in the order they were produced.  The hope(and the presumption) was: The loop code was in some order, running thru the x y and z coordinates in order, from -n to +n, therefore the output would be a recognizable pattern. The simple nested loop vert generator did not let us down: It gave us a recognizable pattern, at least for this face. It turned out (as expected now) that all six faces have similar recognizable patterns. Plotting the first row or two of verts you can easily see how to run the rest of the pattern.  Plot of the first(of six) cube faces verts output by the vert generator:  Input of n:  There are (2n+1)² verts per cube face, or 25 verts for n = 2.                                                          This is looking at the x = -n face from the outside of the cube.  To simplify the math it helps to define s = 2n.  Then there are                                                                                       (s + 1)²  verts,  or 25 for s = 4                                                                                       s²  cells on the face, or 16 for 4 = 2. We are going divide each cell into 2 triangles, so there are 2s² triangles per face, or 32 for s = 4. Second question: What pattern for the triangles?  How to number the 2s² = 32 triangles? What we want in the end is a bit of code such that... for triangles T[0] thru T[2s²-1]  or T[0] thru T[31]( for n = 4), we have T[N] = f0(N), f1(N), f2(N).  Where f0(N) gives the first vertex of T[N] as a function of N. and f1 and f2 give the second and third verts, all in CW winding order looking into the cube of course.  Here the choice is a bit arbitrary, but it would seem to make things easier if we can manage to have the order of triangles follow the order of verts to a degree.   Numbering the triangles.                                                   And now the problem becomes: Look at the triangle vert list,  T0 - T8...T31 in the image, and try to discern some pattern leading us to the sought after functions f0(N), f1(N), f2(N) where N is the number of the triangle, 0 thru 2s²-1. This really is the holy grail of this whole effort; then we have T[N] = f0(N), f1(N), f2(N) and that list of verts can be sent directly to the rendering pipeline.  Of course we want these functions to work for all six faces and all 12s² triangles to cover the cube.  But first let's see if we can just do this one face, 0 thru 2s²-1.. Thru a bit of trial and error the 32 triangles(T0 - T31) were ordered as shown.   Now we have an ordered list of the triangles and the
verts from our loop. T0 = 0 5 6
T1 = 6 1 0
T2 = 1 6 7
T3 = 7 2 1
T4 = 2 7 8
T5 = 8 3 2
T6 = 3 8 9
T7 = 9 4 3
T8 = 5 10 11 ... T30 T31. If we can find a pattern in the verts on the right side
of this list; we can implement it in an algorithm and
the rest is just coding. Pattern recognition: It appears T2 = T0 with 1 added to each component
T3 = T1 with 1 added to each component In general T[N+2] = T[N] with 1 added to each component, until we come to T8 at least.  Also it is hard to recognize a relation between the even and odd  triangles,To see what is happening here it helps to look at an image of the generalized case where n can take on any integer value n > 0. Looking for patterns in this generalized(for any n) vert plot we see... We have defined s = 2n. The 4 corner coordinates(+-n,+-n) of the x = - n cube face, one at each corner (+-n,+-n).  There are (s+1)² verts/face numbered (0 thru (s+1)² -1). There are 2s² triangles/face numbered (0 thru 2s² -1). They are indicated in red. It's not as bad as it looks iff you break it down.  Let's look at the even triangles only and just the 0th vert of these triangles.  For any row we see the number of that first vert of the even triangles just increases by one going down the row. We can even try a relation such as T[N].0 = N/2.  Here  T[N].0 denotes the 0th vert of th Nth triangle. Which works until we have to jump to the next row. Every time we jump a row we T[N+1].0  = T[N].0 + 2 for the first triangle in the higher row.  So we need a corrective term to the T[N].0 = N/2 relation that adds 1 every time we jump a row. We can use computer integer division to generate such a term and N/2s is such a term.  It only changes value when we jump rows and we get our first function ...                                                                                    f0(N) = N/2 + N/2s.  (even triangles) Remember the integer division will discard any remainder from the terms and check this works for the entire cube face, but only for the even triangles. What about the odd triangles?  Going back to the triangle vs vert list for the specific case n = 2, s = 4 for the first row; we see for the odd triangles T[N].0  = T[N-1].0 + s  + 2.  And adding this term, s + 2 to the formula for the even triangle 0th vert we get f0[N] for the odd triangles.                                                                                    f0(N) = N/2 + N/2s + s  + 2. (odd triangles) Continuing this somewhat tedious analysis for the remaining functions f1(N), f2(N) we eventually have these relations for the x = -n cube face triangles.                                                                                for N = 0  thru N = 2s² - 1.                                                                                defining   m = N/2 + N/2s.                                                                                T[N] = m,  m + s + 1,  m + s + 2       T[N]   =    f0(N), f1(N), f2(N).  (even N)                                                                                T[N] = m + s + 2,  m + 1,  m              T[N]   =   f0'(N), f1'(N), f2'(N) (odd N) So it turns out we have two sets of functions for the verts, fn(N) for the even triangles and fn'(N) for the odd. To recap here; we now have formulae for all the T[N] verts as functions of N and the input parameter n: Input:    An integer  n = units from origin to cube face. But this is only for the first face x = -n, we have five more faces to determine.  So the question is: Do these formulae work for the other faces? And the answer is no they do not, but going through a similar analysis for the remaining face gives similar T[N] = f0(N), f1(N), f2(N)  for them. There is still the choice of how to number the remaining triangles and verts on the remaining five faces, and the f0(N), f1(N), f2(N) will depend on the somewhat arbitrary choice of how we do the numbering.  For the particular choice of a numbering scheme I ended up making, it became clear how to determine the f0(N), f1(N), f2(N) for the remaining faces.  It required making generalized vert plots for the remaining five face similar to the previous image. Then these relation emerged... For face x = -n         T[N]   N(0 thru 2²-1)  we have the f0(N), f1(N), f2(N), even and odd For face x =  n         T[N]   N(2s² thru 4s²-1)       add (s+1)² to the x=-n face components and reverse the winding order For face y = -n         T[N]   N(4s² thru 6s²-1)       add 2(s+1)² to the x=-n face components and reverse the winding order For face y =  n         T[N]   N(6s² thru 8s²-1)       add 3(s+1)² to the x=-n face components  For face z = -n         T[N]   N(8s²0 thru 10s²-1)   add 4(s+1)² to the x=-n face components  For face z =  n         T[N]   N(10s²0 thru 12s²-1)  add 5(s+1)² to the x=-n face components and reverse the winding order And these are enough to allow us to write explicit expressions for all 12n² triangles for all 6 faces T[N] and what remains to be done is to implement these expression in code.  Which turned out to be a much simpler task than finding the f0(N), f1(N), f2(N) and resulted in a surprisingly short bit of code. Implementation I have attempted to make this C++ snippet of code as generic as possible and have removed any dev-platform specific #includes and the like.  GLM, a C++ mathematics library for graphics developed by Christophe Riccio is used.  It is a header only library. https://github.com/g-truc/glm/releases/download/0.9.9.0/glm-0.9.9.0.zip  That is the only outside dependency.   //  Procedural cube face verticies generator #include <vector> #include <glm/gtc/matrix_transform.hpp> struct Triangle {     glm::vec3 vert[3]; // the three verts of the triangle }; /* std::vector<Triangle> cube_Faces(int n) Input:        integer 'n'; the units from origin to cube face. Output:        vector<Triangle> glTriangle; container for the              12*(2*n)² triangles covering the 6 cube faces. */ std::vector<Triangle> cube_Faces(int n){     size_t number_of_triangles(12*(2*n )*(2*n));     size_t number_of_face_verts(6*(2*n +1 )*(2*n+1));     std::vector<glm::vec3> face_verts(number_of_face_verts);     std::vector<Triangle> glTriangle(number_of_triangles); //  Generate the 6*(2n +1 )² face verts -------------------------------     int l(0);     for(int i = 0; i < 6; i++){         for(int j = -n; j <= n; j++){             for(int k = -n; k <= n; k++){                 // Below "ifS" strip out all interior cube verts.                 if( i == 0){ // do yz faces                     face_verts[l].x = (float)(-n); //x                     face_verts[l].y = (float)j; //y                     face_verts[l].z = (float)k;}//z                 if( i == 1){ // do yz faces                     face_verts[l].x = (float)(n); //x                     face_verts[l].y = (float)j; //y                     face_verts[l].z = (float)k;}//z                             if( i == 2){ // do zx faces                     face_verts[l].x = (float)j; //x                     face_verts[l].y = (float)(-n); //y                     face_verts[l].z = (float)k;}//z                 if( i == 3){ // do zx faces                     face_verts[l].x = (float)j; //x                     face_verts[l].y = (float)(n); //y                     face_verts[l].z = (float)k;}//z                 if( i == 4){ // do xy faces                     face_verts[l].x = (float)j; //x                     face_verts[l].y = (float)k; //y                     face_verts[l].z = (float)(-n);}//z                 if( i == 5){ // do xy faces                     face_verts[l].x = (float)j; //x                     face_verts[l].y = (float)k; //y                     face_verts[l].z = (float)(n);}//z                 l++;             }         }     } //  Generate the 12*(2*n)² triangles from the face verts -------     int s = 2*n;    int q = 2*s*s;    int a = (s+1)*(s+1);     int f(0);        int r(0);        int h(0);     for( int N=0; N < number_of_triangles; ){          // triangles already in CW winding          if( N <  q || N <  5*q && N > 3*q - 1  ){              // do the even indicies             f= q*(N/q); r = a*(N/q); h = (N-f)/2 + (N-f)/(2*s) + r;             glTriangle[N].vert[0] = face_verts[h];             glTriangle[N].vert[1] = face_verts[s + 1 + h];             glTriangle[N].vert[2] = face_verts[s + 2 + h];             N++; f= q*(N/q); r = a*(N/q); h = (N-f)/2 + (N-f)/(2*s) + r;             // do the odd indicies             glTriangle[N].vert[0] = face_verts[s + 2 + h];             glTriangle[N].vert[1] = face_verts[ 1 + h];             glTriangle[N].vert[2] = face_verts[h];             N++; f= q*(N/q); r = a*(N/q); h = (N-f)/2 + (N-f)/(2*s) + r;         }         // triangles needing reverse order for CW winding         if( N >  5*q - 1 || N <  3*q && N > q - 1 ){              // do the even indicies             glTriangle[N].vert[0] = face_verts[s + 2 + h];             glTriangle[N].vert[1] = face_verts[s + 1 + h];             glTriangle[N].vert[2] =  face_verts[h];             N++; f= q*(N/q); r = a*(N/q); h = (N-f)/2 + (N-f)/(2*s) + r;             // do the odd indicies             glTriangle[N].vert[0] = face_verts[h];             glTriangle[N].vert[1] = face_verts[1 + h];             glTriangle[N].vert[2] = face_verts[s + 2 + h];             N++; f= q*(N/q); r = a*(N/q); h = (N-f)/2 + (N-f)/(2*s) + r;         }     } //  Normalize the cube to side = 1 ------------------------------     for(int i = 0; i < number_of_triangles; i++){         glTriangle[i].vert[0].x = glTriangle[i].vert[0].x/(2.0*(float)n);         glTriangle[i].vert[0].y = glTriangle[i].vert[0].y/(2.0*(float)n);         glTriangle[i].vert[0].z = glTriangle[i].vert[0].z/(2.0*(float)n);         glTriangle[i].vert[1].x = glTriangle[i].vert[1].x/(2.0*(float)n);         glTriangle[i].vert[1].y = glTriangle[i].vert[1].y/(2.0*(float)n);         glTriangle[i].vert[1].z = glTriangle[i].vert[1].z/(2.0*(float)n);         glTriangle[i].vert[2].x = glTriangle[i].vert[2].x/(2.0*(float)n);         glTriangle[i].vert[2].y = glTriangle[i].vert[2].y/(2.0*(float)n);         glTriangle[i].vert[2].z = glTriangle[i].vert[2].z/(2.0*(float)n);     };     return glTriangle; }   The rendering was done using OpenGl. // OGL render call to the cube mesh generator - PSUEDOCODE int n(2); int cube_triangle_Count = (12*(2*n)*(2*n)); std::vector<Triangle> cube_Triangles(cube_triangle_Count); cube_Triangles = cube_Faces(n); glBindBuffer(GL_ARRAY_BUFFER, uiVBO[0]); glBufferData(GL_ARRAY_BUFFER, cube_Triangles.size()*sizeof(Triangle), &cube_Triangles[0], GL_STATIC_DRAW); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), 0); glEnableVertexAttribArray(0); glDrawArray(GL_TRIANGLES,0,3*cube_triangle_Count);   This just gets the position attribute of the cube face triangle verts; for the color and other attributes there are a couple of options:  Use separate GL_ARRAY_BUFFERS for the color and other attributes.  Or add attributes to the Triangle struct... struct Triangle { glm::vec3 vert[3]; // the three verts of the triangle attribute1; attribute2; ... }; Screenshot of the spherified cube. What's next? Now that we have the cube mesh what we can do with with it practically unlimited.  The first thing I did was turn it into a sphere.  Playing with tesselating the cube or sphere or stellating it with different patterns;  might do.  Ended up trying a few matrix transformations on the cube mesh.  These are shown in the image below.     These shapes are result short bits of code like the code for the column shape below. //Column     for(int i = 0; i < number_of_triangles; i++){         for(int j = 0; j < 3; j++){             if( glTriangle[i].vert[j].y < 0.5f  && glTriangle[i].vert[j].y  > -0.5f  ){              float length_of_v = sqrt((glTriangle[i].vert[j].x * glTriangle[i].vert[j].x) + (glTriangle[i].vert[j].z * glTriangle[i].vert[j].z));             glTriangle[i].vert[j].x = 0.5f*glTriangle[i].vert[j].x/length_of_v;             glTriangle[i].vert[j].z = 0.5f*glTriangle[i].vert[j].z/length_of_v;             }         }     }   Doing this; the blacksmith at his forge analogy soon presents.  The mesh is the ingot, hammer matricies stretch, round and bend it against the fixed geometry of the anvil - coordinate system. I am the smith.   
          Tetrahedron The tetrahedron is the platonic solid with the least number of faces(4),  edges(6),  and verts(4).  In antiquity it was associated with the element of fire due to its' sharp vertices.   The algorithm for the tetrahedron mesh was developed in a similar way to the cube, but here it seemed simpler to get a routine for just one face - an equilateral triangle - and use matrix translations and rotations to form the complete tetrahedron.  So more like origami or tinsmithing than blacksmithing.   Procedural tetrahedron screenshot.   The n = 4 and the general case  To get an routine for the general case, n an integer > 0, a bit of what I think is known as mathematical induction was used.     PSUEDOCODE Spin = glm::rotate(  PI/3, zaxis ); //matrix: rotate 60 degrees around z axis for(int row = 0; row < n; row++){ // go row by row         count = 0; // set first triangle in the row = 0     for(int i = 2*n*row - row*row; i < 2*n*row - row*row + 2*n - 2*row - 1; i++){  // the magic happens here                      if (count % 2 == 0 ){ // triangle is even in the row -just translate              x_Lat = glm::translate((count+row)/2n, row*height, 0.0f);             for(int i = 0; i < 3; i++){                 triangle[n].vert[i] = x_Lat*triangle[n].vert[i];                         }                                 }         else{ // triangle is odd in the row -  rotate then translate             x_Lat = glm::translate(count+1+row)/2n, row*height, 0.0f);                             for(int i = 0; i < 3; i++){                 triangle[n].vert[i] = x_Lat*Spin*triangle[n].vert[i];             }                             }     count++;     } }   This is the psuedocode version of the routine which generates the verts for the n² triangles in a face.  Getting this algorithm was a bit of a brain drain but looking for patterns in the image of the face allowed it to happen.  We use a "seed" triangle, which is triangle 0 on the lower left of the figure.  The verts of this one triangle are input; the rest of the n² triangles verts are generated by translating and rotating this seed triangle. Notice: There are n rows, every row has 2 less triangles than the row below.  If we number the triangles from 0 to 2n - 2*row - 2, where the rows run 0 to n; the even triangles just need to be translated ...                                                       in the x direction by (count + row)/2n  where count = their  position in the row 0 to 2n - 2*row - 2.                                                      in the y direction by row*height.  height = height of seed triangle. The odd triangles need to be rotated pi/3 = 60 degrees around the z axis then translated ...                                                       in the x direction by (count + row + 1)/2n  where count = their  position in the row 0 to 2n - 2*row - 2.                                                      in the y direction by row*height.  height = height of seed triangle. Now we have a single face for the tetrahedron, to join the four faces together we need the angle between the faces called the dihedral angle. Dihedral Angle Each of the five platonic solids has a characteristic called the dihedral angle. This is the angle between the faces. For the cube it is 90 degrees or pi/2 radians. For the tetrahedron it is 70.528779° = arccos(1/3). The tetrahedron, with just four faces, is the simplest of the platonic solids. The simplest way I can think of to build it: Start with the four face stacked one on another,  edges aligned. Imagine the top three faces each hinged to the bottom face along one edge.  Then rotate each face around then hinged edge by arccos(1/3), the dihedral angle. That is the method of the bit of code shown below.   PSUEDOCODE struct Triangle { glm::vec3 vert[3]; // the three verts of a triangle ... add other attributes, normals, colors }; /* std::vector<Triangle> tetrahedron(int n) Input: integer 'n'; the number of triangles along an edge of the tetrahedron. Output: vector<Triangle> ; container for the 4n² triangles covering the 4 tetrahedron faces. */ PSUEDOCODE vector<Triangle> tetrahedron(int n){ float tetra_Dihedral = acos(1/3); // --- Second face --- // We take the equilateral triangle face we generated above // which consisted of n² triangles. This face sits on the xy plane // with its lower left corner at the origin. // // Now we bend it -70.528779° = -arccos(1/3) around the // the X - axis. (Its' bottom edge) Spin = glm::rotate( -tetra_Dihedral, xaxis ); //just rotate for(int i = 0; i < n*n; i++){ for(int j = 0; j < 3; j++){ // This is the second face so triangle indecies // run from n² to 2n² tri_Angles[n*n + i].vert[j] = Spin*tri_Angles[i].vert[j] } } // The previous rotation gives CCW verts looking in from the // outside so need need to make them CW again for(int i = n*n; i < 2*n*n; i++){ swapVerts(tri_Angles[i].vert[0], tri_Angles[i].vert[2]); } // --- Third face --- // We take the original equilateral triangle face. // Now we bend it 70.528779° = arccos(1/3) around its left edge.. Spin = glm::rotate( tetra_Dihedral, glm::vec3(0.5f,0.866025f,0.0f)); for(int i = 0; i < N*N; n++){ for(int j = 0; j < 3; j++){ // This is the third face so triangle indecies // run from 2n² to 3n² tri_Angles[2*n*n + i].vert[j] = Spin*tri_Angles[i].vert[j] } } // The previous rotation gives CCW verts looking in from the // outside so need need to make them CW again for(int i = 2*n*n; i < 3*n*n; i++){ swapVerts(tri_Angles[i].vert[0], tri_Angles[i].vert[2]); } // --- Forth face --- // We take the original equilateral triangle face. // First we translate it so its' lower right corner is at the origin // Then we bend it -70.528779° = -arccos(1/3) around its right edge.. x_Lat = glm::translate(glm::vec3(-1.0f, 0.0f, 0.0f)); Spin = glm::rotate( -tetra_Dihedral, glm::vec3(-0.5f,0.866025f,0.0f)); for(int i = 0; i < n*n; i++){ for(int j = 0; j < 3; j++){ // This is the forth face so triangle indecies // run from 3n² to 4n² tri_Angles[3*n*n + i].vert[j] = Spin*x_Lat*tri_Angles[i].vert[j]; } } //need to make it CW again for(int i = 3*n*n; i < 4*n*n; i++){ swapVerts(tri_Angles[i].vert[0], tri_Angles[i].vert[2]);v } // We now have the complete tetrahedron but its' base is not horizontal. // Lets set it flat in the xz plane and center it at the origin. // put the base in the xz plane: Rotate: 90 - dihedral angle around the // X - axis. Spin = glm::rotate( tetra_Dihedral - half_PI, xaxis); for(int i = 0; i < 4*n*n; i++){ for(int j = 0; j < 3; j++){ Spin*tri_Angles[i].vert[j]; } } // Put the center at the origin, y axis passing through the apex // sqrt(3/8) = 0.6124 is the distance from "top/apex" vertex to center // of a tetrahedron with side = 1 // // 1/2(sqrt(3)) = 0.28867 is the distance from the mid-point of an edge // to the center of a face.a vertex to the center of a side. x_Lat = glm::translate( glm::vec3(-0.5f, -0.6124f, 0.28867f)); for(int i = 0; i < 4*n*n; i++){ for(int j = 0; j < 3; j++){ x_Lat*tri_Angles[i].vert[j]; } } return tri_Angles; } Notes: Oops: Left out std::vector<Triangle> tri_Angles(4*n*n);  Should be the first line of the function body!  Those last two for loops could and probably should be combined to do a translate*rotate*triangle in one statement, but I have not tried it. All distances are for a tetrahedron with unit side. The sign of the dihedral angle in the rotations was usually determined by trial and error.  I.e.; I tried one sign, compiled the code and rendered the tet.  If it was wrong I just reversed the sign. The end result is a tetrahedron with its' center at the origin, its' base in the xz plane, and one edge parallel to the X axis. Of the five platonic solids; three (tetrahedron, octahedron, icosahedron) are composed of equilateral triangle faces. One of square faces (cube).  And one of pentagon faces (dodecahedron). Two tetrahedrons fit nicely in a cube.                                                                                               

3dBookman

3dBookman

And the Messages are ROUTING!!!

I have succeeded in creating a cross-platform, custom combination MQTT Client/Broker or "MQTT Router" that can Route messages to other MQTT Brokers/Routers.  They dynamically build connections to each other and test route latency.  They currently do NOT do any best route calculations.  But that is only a small behavioral ability that I can add at a later date and still feel like it's totally functional right now. In the below images you will see 3 windows, TOP = PRIMARY Router(Kinda like a DNS server, it distributes the Router hellos around so everybody knows where everybody else is. MIDDLE = PEER Router #1 on Linux BOTTOM = PEER Router #2 on Windows   Here you see the three servers connecting and subscribing to each other's publications and whatnot.   Here the Route-able message is submitted to the PRIMARY, Routed Through PEER#2  for  PEER#1   Submitted to PRIMARY, Routing Through PEER#1  for  PEER#2   And Submitted to PEER#2, Routed Through PEER#1  for  PRIMARY   Not the most interesting screen shots, maybe I'll put together a little video showing it in ACTION! haha.. Either way, a few days of hacking and I now have the core of my Content Delivery Network, at least ready for the next phase of integration and testing. Time to get back to writing the actual GAME SERVERS!!  hahaha I've got some serious refactoring and whatnot before I post any of this code though, so please be patient if you're actually interested in seeing it.    

Septopus

Septopus

Deck Selection Dialog

In my last post, I gave an overview of the Solitaire project that I am working on, along with an explanation of the features that I have currently implemented, and the feature that I was to work on next. The next feature of Solitaire that I wanted to implement is the deck selection dialog, where you choose from a list of predefined deck images, the image you would like to use on your deck backside when playing the game.  Here is what my dialog looks like. The goal of this dialog is to try to mimic the original Solitaire deck selection dialog.     Here is a list of features that were required for me to implement for this task. 1. I had to implement the initial dialog window along with its dimensions and specifications, such as making it a modal window, not allowing the window to be resized, and other options like that. This was pretty straightforward as I have done this many times before, and was simply a matter of testing the old dialog to see what I could and could not do. 2. I had to create the skeleton of the dialog, so I used a BoxLayout with a Y-Axis alignment, this is where I added two panel types, one that holds the deck button images, and the other that holds the OK and Cancel button. The first panel within my BoxLayout was a JPanel that uses a GridBagLayout with two rows and six columns. The second JPanel uses a FlowLayout centered about the x-axis. Note: The 2 row 6 column deck images that you see are actually JButton components. Here is how the dimensions of a button looks like from up close.   The button size is 45px in width by 74px in height. The border is removed by default on all buttons except for the one that was last selected. Within the button is the icon image, this is 39px wide by 68 px in height. When the button is selected, a 2px blue border is rendered around the button, leaving a gap of a few pixels between the button image and the border itself, similar to what was done in the original Solitaire game, or at least what I thought was implemented based on my research. I also disabled some events such as hovering your mouse over a button to prevent the background image from changing color because the mouse hovered over the button. I also disabled that same effect when clicking on the button. 3. Clicking on a button should show a border, and `deselect` any other button that was previously selected. This was very straightforward to do. 4. Fetch the deck images and load them into the button. 5. Adding events to the button such as double-clicking on a button to choose a deck image, or pressing on the `enter` key in the dialog to simulate an `OK` button click. 6. Update the deck images of all the cards in the game, including the image of the Stock view (the card at the top-left of the game) when a selected took place and the `OK` button was selected. To get this done, I had all my CardModel objects register to an event that I created called `EVENT_UPDATE_BACKSIDE` public static final String EVENT_UPDATE_BACKSIDE = "EVENT_UPDATE_BACKSIDE"; Here is the code that the CardModel uses for registering this event addSignalListener(EVENT_UPDATE_BACKSIDE, new ISignalReceiver<EventArgs>() { @Override public void signalReceived(EventArgs event) { OptionsPreferences preferences = new OptionsPreferences(); preferences.load(); _cardEntity.setBackside(preferences.deck); refresh(); } }); So I look at the options preferences, and based on what was saved from the deck selection dialog, I go into my card entity (a reference that each CardModel owns) and I set the deck to be whatever was saved. I then issue a refresh on the model that causes all the views that are data-bound to my model to perform an update(), which will then render their backside which will show the updated deck image. Here is how I make the call so that the registered event above gets fired // Update all the backsides of all the cards in the game EventArgs args = new EventArgs(this, CardModel.EVENT_UPDATE_BACKSIDE); AbstractFactory.getFactory(ModelFactory.class).multicastSignalListeners(CardModel.class, args); So what I do here is I create an EventArgs which is a base class for passing arguments around in my game. I indicate the sender and the signal name which is the same signal name that was used to register the event listener in the CardModel from above. I then perform a call onto all CardModel type objects that have been registered by my ModelFactory. This will dispatch my EventArgs to all the CardModel types that were created with my factory, that are listening in to the specified message. From there, the information is updated within each CardModel, and the view(s) that are bound to those models are updated accordingly, very straightforward stuff. The code that I wrote above comes from my own take on a much friendlier version of the Observer design pattern. I first started using the Observer provided to me by the Java SDK about two years ago, however over time I found it to be very limiting, so I eventually wrote my own version of it, and one day I will write an article outlining what I did and why I like it a lot more, but for now this is what I have been using in it's place for two years and it has worked out great for me. 7. Persist the selected deck image for future games played.  So that's all that there is. My next task is to implement the Draw Three feature, where every time you click on the Stock view (top-left card), three cards come into play instead of one. You can always follow my progress by following the game located at https://github.com/danielricci/solitaire, and if you have any questions I will do my best to answer them. Take care, until my next blog post.

Daniel Ricci

Daniel Ricci

Unreal Fifth Entry - November 10, 2018

Hello all! This is the fifth entry of my development blog for my project 'Tracked Mind'. Since last post I've been taking care of the system that controls how the Player character moves and how stamina effects movement, and of course some bugs that appeared while I implemented it . The new version of the movement system will be able to keep a better track of the Player's stamina and different movement speed depending on the Player's stance etc. I am also creating the first draft of a couple of new maps. I'm uploading a few new screenshots of the game, one of them shows one of the new maps, let me know what you think!    Some changes this month: - The movement system has been updated. - New maps (first draft of them).
Bug fixes - Fixed a bug that would prevent reloading of the shotgun. - Fixed a bug that caused the Player to be able to sprint even when stamina was at 0.   Thank you once again for reading! /Mikael Henriksson

Mikael Henriksson

Mikael Henriksson

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!