tag:blogger.com,1999:blog-188688392024-03-12T17:27:54.789-07:00Me::Programmer.classThe trials and tribulations of an amateur game programmer. Please tell him where he is going wrong.Unknownnoreply@blogger.comBlogger298125tag:blogger.com,1999:blog-18868839.post-30633488961049373822021-02-12T02:11:00.006-08:002021-08-15T01:59:36.619-07:00Updated Itch Page<p>I've just revamped my <a href="https://stephensmith.itch.io/">Itch.io</a> page. I've developed quite a few games since I last posted anything here, incuding <a href="https://stephensmith.itch.io/exolon-3d">Exolon</a> 3D and <a href="https://stephensmith.itch.io/alien8-3d">Alien 8</a> 3D. They can all be downloaded for free.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://img.itch.zone/aW1hZ2UvODg3MzQxLzUwMDM1MzAucG5n/794x1000/Adhs29.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="430" data-original-width="794" height="217" src="https://img.itch.zone/aW1hZ2UvODg3MzQxLzUwMDM1MzAucG5n/794x1000/Adhs29.png" width="400" /></a></div><br /><p><br /></p><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-44869114565538682432020-08-01T04:32:00.002-07:002020-08-01T04:32:50.036-07:00Overblown ReleasedI've released Overblown, the split-screen multiplayer FPS.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/3LQdwPbTgmQ/0.jpg" src="https://www.youtube.com/embed/3LQdwPbTgmQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
Download it from <a href="https://stephensmith.itch.io/overblown">https://stephensmith.itch.io/overblown</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-84951384390844562272020-07-22T01:40:00.001-07:002020-07-22T01:40:20.545-07:00New Overblown Hero: BoomfistThe second hero to be added to Overblown is Boomfist. Here he is in action:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/OlsZ5vHlmKY/0.jpg" src="https://www.youtube.com/embed/OlsZ5vHlmKY?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
Overblown uses the Bullet physics engine for all its movement and collision. The main problem I had with Boomfist was hist PowerPunch ability. I originally tried applying a force to his centre, but due to the damping of the player's avatars (which is there to stop them sliding about too much) the force was initially too fast, andf slowed down too quickly.<br />
<br />
My solution was to simply remove the dampening effect until the player's linear velocity dropped below a certain threshold, at which point it was re-applied. I also used the player's linear velocity to check if they were in the middle of a punch when they hit another player (as opposed to simply walking into them).<br />
<br />
I also created a new logo for the game:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicGK7U9QSwTn5zq0KBujaUdzkfdlllppPaY_MSd77b0hv91F577Y3dOlZOwaYaU6mAkHDTiH7uWDzyuNR83bQzsONwgGmKYN9IomcUbs8Xwf7rEjtANhWw9ndZjF3hWAV0UVUvjQ/s1600/overblown_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="79" data-original-width="769" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicGK7U9QSwTn5zq0KBujaUdzkfdlllppPaY_MSd77b0hv91F577Y3dOlZOwaYaU6mAkHDTiH7uWDzyuNR83bQzsONwgGmKYN9IomcUbs8Xwf7rEjtANhWw9ndZjF3hWAV0UVUvjQ/s320/overblown_logo.png" width="320" /></a></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-46390858409635695412020-07-22T01:35:00.000-07:002020-07-22T01:35:15.725-07:00LibGDX 3D Camera lookAt() ProblemIf you've ever used the method camera lookAt() method, you may have noticed that afterwards, your view of the (virtual) world is slightly off-kilter. <br />
<br />
For some reason, the methods alters the camera.up value, which should ideally be (0, 1, 0).<br />
<br />
What is the solution? Just manually set the direction yourself like so:-<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">tmpVector.set(targetPosition).sub(camera.position).nor();</span><br />
<span style="font-family: "Courier New", Courier, monospace;">player.camera.direction.set(tmpVector);</span><br />
<span style="font-family: "Courier New", Courier, monospace;">player.camera.update();</span></blockquote>
I've no idea why the lookAt() method does what it does.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-51308409926196340502020-07-14T01:38:00.003-07:002020-07-14T02:10:16.415-07:00New Gamedev Project: OverblownIn the interests of trying to get players to actually play my games, I've decided to start with an audience closer to home: my kids. Their current obsession is Overwatch, so my new project is an Overwatch clone/parody called <b>Overblown</b>. This will be split-screen multiplayer, and use a proper physics engine. One of my aims was to have a properly destructive environment, something that even Overwatch doesn't have.<br />
<br />
I decide to use LibGDX, basically cos it's pretty good, I know it most out of all the engines I've used, and I've got loads of old code I can re-use.<br />
<br />
I've already created several split-screen games (like <a href="https://stephensmith.itch.io/chrono-cup" target="_blank">Chrono Cup</a>), so I started off re-using this code. The first thing I needed was a decent map, not the usual uninteresting flat space that I come up with. For some reason, generic 3D map editors seem very rare, so I created my own:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/6vz8EjtWB_A/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/6vz8EjtWB_A?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
One of the hardest things about creating a map is getting the textures to look right. it's very easy to fall into the trap of looking like an old 90's game with overly detailed textures on simple shapes. <br />
<br />
Once I had the map, it was onto creating the characters. I had loads of ideas for parodying the characters, and the first one that seemed ripe for copying was Pharah, or Phartah as she is called in this game:-<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/l5r8nlscKwI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/l5r8nlscKwI?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
Once I came up with the name Phartah, the in-game jokes wrote themselves.<br />
<br />
The next character is Boomfist. I pretty much enjoy coding more than I enjoy playing games, and one of the fun aspects of this project was trying to recreate the Overwatch character's abilities in my own game. The next challenge was Boomfist's PowerPunch ability....<br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-25120213126690951982020-05-06T07:32:00.001-07:002021-08-15T01:58:03.285-07:00Investigating WebVR and WebXRAfter buying an Ocuus Go, it was only a matter of time before I started looking into the easiest way to develop my own games for it, and WebGL definitely seems the way to go. Of course, this opens up the next question: what framework to use to implement WebGL?<br />
<br />
Anyway, here's a few things I've learnt that might save other people a lot of time:-<br />
<ul>
<li>WebVR is already deprecated in favour of WebXR.</li>
<li>There are very few browsers that actually implement WebXR. Firefox Reality is <b>not</b> one of them, despite the website saying "<a href="https://mixedreality.mozilla.org/firefox-reality/" rel="nofollow">Firefox Reality was specifically designed to tackle all of the new opportunities (and challenges) that come with browsing in VR.</a>"</li>
<li>In order to use the controller, your web page needs to be served in HTTPS, meaning you need to mess about with certificates. </li>
</ul>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-18270940250062383542020-04-16T02:56:00.002-07:002021-08-15T01:58:23.982-07:00Announcing Chrono Cup - Quantum League RemakeI read about Quantum League just a few days ago, and it sounds like a really good game mechanic. I've been looking to try and implement some kind of "time" mechanic in games for years, going all the way back to the 80's since I read about a game that the legend that is Julian Gollop wrote (the name escapes me now - it might have been Timelords).<br />
<br />
Anyway, after reading about Quantum League, and being between projects, I decided to see if I could re-purpose my <a href="https://github.com/SteveSmith16384/splitscreenfps_libgdx">split-screen FPS engine</a> to implement the rewind and play effect. It was quite a mental challenge, but here is the result:-<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/9waAQ32TXmU/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/9waAQ32TXmU?feature=player_embedded" width="320"></iframe></div>
<br />
I've come up with the name Chrono Cup for it, until I think of something better. And please ignore the simple placeholder graphics. Hey, I've only been working on this for 2 days!<br />
<br />
If you don't know how Quantum League works, basiecally you play an FPS-style game for 15 seconds. Then time rewinds back to the start, and you do it again; however this time, a "ghost" plays out your actions from the first phase. Then it rewinds for a 3rd time, and you have two "ghosts".<br />
<br />
This may sound good albeit simple at first, but it potentially leads to lots of interesting twists, since (for example) the ghosts bullets still have an effect as long as the ghosts aren't killed. So if you can kill a player/ghost who shot you the first time, you won't die, so your ghosts will be alive for longer in a later phase!<br />
<br />
More coming soon....<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDNbN-XL8J-EbBYbLr9Ol9tt80maHtx8m6EqDrr4YYkK0d55MBp71vPPnC4Bpjt_7xJX_FB0Yd9nNURRcmDW1R2Q6a7eTJ6L_Okf0ytxCOR2VLWphRAbJHgPY1zh1gvKhK9sUwA/s1600/logo1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="213" data-original-width="518" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDNbN-XL8J-EbBYbLr9Ol9tt80maHtx8m6EqDrr4YYkK0d55MBp71vPPnC4Bpjt_7xJX_FB0Yd9nNURRcmDW1R2Q6a7eTJ6L_Okf0ytxCOR2VLWphRAbJHgPY1zh1gvKhK9sUwA/s320/logo1.png" width="320" /></a></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-3867533142875641482020-04-06T11:20:00.000-07:002020-04-06T11:55:36.254-07:00Visual Studio is a bug-ridden pile of crapLet's start a new project and add a class to it:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj00rQJf70Tq0_LOtMGYvIYUzATeLc_p-aw23X5k7GsIMzOdrHqUEtxH-j4fMuntnyqQiln-48Cmhm-FeE3nj-XjvvsV8-TDCy0zdsO6K0Toheg3-3ysMAhayrxA-78gtFwOXfPAw/s1600/vs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="952" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj00rQJf70Tq0_LOtMGYvIYUzATeLc_p-aw23X5k7GsIMzOdrHqUEtxH-j4fMuntnyqQiln-48Cmhm-FeE3nj-XjvvsV8-TDCy0zdsO6K0Toheg3-3ysMAhayrxA-78gtFwOXfPAw/s320/vs.png" width="320" /></a></div>
<br />
Oh, we don't seem to have the option to add a class file to the project. Maybe the project properties are wrong. Let's have a look.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx6X5OjoIc8YP7fNouoQlut9kPb1kFnvZYgqhhL4CM_5Z9blZPAVaDUFuG683KxCinlEI4jdC3lCXktjG4N9ePBFsxAJ3sc0hC9R1Y1i485z7c9PH8lB7xQouvkt31GTlNbyYEQw/s1600/vs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx6X5OjoIc8YP7fNouoQlut9kPb1kFnvZYgqhhL4CM_5Z9blZPAVaDUFuG683KxCinlEI4jdC3lCXktjG4N9ePBFsxAJ3sc0hC9R1Y1i485z7c9PH8lB7xQouvkt31GTlNbyYEQw/s320/vs.png" width="320" /></a></div>
<br />
Oh, we get a nice error. <a href="https://stackoverflow.com/questions/55735131/unable-to-load-solution-properties" rel="nofollow">Looks like I'm not the only person with this problem</a>. You would have thought after all these years, Microsoft would be able to write a piece of software that wasn't bug-ridden crap.<br />
<br />
And while we're on the subject, why does Paint not have an Edit menu, like every other normal program in the known universe? And does MS SQL Server need pointless extra services to work, like Server Browser?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-6306959877507311172020-03-12T06:14:00.002-07:002020-03-12T06:14:40.210-07:00Split-Screen Multiplayer EngineSo I've been developing a split-screen multiplayer FPS engine using LibGDX. It can handle up to 4 players.<br /><br />Since (like most hobby developers) I can lose interest in a single project very quickly, this project contains several different games. The first game was a remake of the classic game 3D Monster Maze. However, I'm also working on a game of Tag, a Tower Defence game, a driving game, an FTL-type game and several others.<br /><br />Source is here: <a href="https://github.com/SteveSmith16384/splitscreenfps_libgdx">https://github.com/SteveSmith16384/splitscreenfps_libgdx</a><br /><br />Early example video here (Monster Maze level): <a href="https://www.youtube.com/watch?v=hM-P-M--Or4&t=108s">https://www.youtube.com/watch?v=hM-P-M--Or4&t=108s</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-5059552783946907632020-01-28T04:00:00.002-08:002020-05-22T10:25:02.301-07:00How to be Terrible at Overwatch<i>This is something I wrote about a year ago. It's unfinished (or "work-in-progress") but I thought I'd out it here for now.</i><br />
<br />
After all, what's the point of playing as part of a team and winning the game when, even though you probably killed more players than anyone else, the game result will only mention that you were on the objective for 3 minutes, which impresses no-one. It doesn't matter if your team loses as long as you're on that leaderboard with the most medals!<br />
<br />
<br />
<h2>
Tactics</h2>
<h4>
Work Solo</h4>
After you've been killed (along with probably several of your team), don't bother waiting for others to re-spawn and attack en-masse: just charge straight back into the match and get those kills in while you can.<br />
<br />
<h4>
Know where the battle really is</h4>
Okay, it's a payload mission. But (if you're attacking) leave the boring task of moving the payload to other weaker members. If you can keep a single enemy busy by fighting them in a far flung corner of the map, nowhere near the payload, that's got to be a good thing. And if you're defending, then the further back you can push the enemy the better. It's not like any of them will be able to sneak past you without you noticing. Leave moving the payload to the n00bs who are probably cont as good as you.<br />
<br />
<br />
<h4>
Team make-up</h4>
Stick rigidly to your favourite character, regardless of the makeup of your opposition; that way you get lots of practise at using them. Don't be tempted to be a healer, they can hardly do any damage.<br />
<br />
<br />
<br />
<h2>
Characters</h2>
<br />
<h4>
Bastion</h4>
Make sure that you use his ultimate as soon as you have it. Even if you've found a great spot to mow down the enemy, use your ultimate and charge right into the middle of the battle with your cannon firing.<br />
<br />
<br />
<h4>
Pharah</h4>
This ultimate is ideal for getting revenge on a single enemy who's really annoyed you. Just walk up to them a press the <strike>Suicide</strike> Ultimate button. You will die yourself of course, but it's a small price to pay for revenge.<br />
<br />
<br />
<h4>
Mai</h4>
If you haven't tried this trick before: here's something that the other people on your team will find hilarious: when attacking, just a second before the spawn point opens, build an ice wall right in front of exit. Brilliant!<br />
<br />
<br />
<h4>
Mercy</h4>
One thing that impresses every player, and gets you a few more kills (maybe), is when you play as Mercy, rather than heal, show your skill by shooting enemies with your pistol instead.<br />
<br />
If you do feel the need to heal, just concentrate on one single player, ideally a tank who has lots of health anyway. Also, don't bother resurrecting anyone, as it will probably get you killed.<br />
<br />
Another good tactic with Mercy is to select her at the start of the game, but then change just after everyone has left the spawn point. It will take players a few minutes to realise they don't have a healer on the team.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-3380899161638679292020-01-02T03:28:00.003-08:002020-01-02T03:28:59.942-08:00Reading PS4 controllers on a Raspberry Pi in JavaI recently had a go at trying to get a LibGDX to run on a Raspberry Pi. Any project. Unfortunately I failed. (If you've succeeded, please let me know, but from what I could glean from googling, no-one has succeeded yet.).<br /><br />So instead I tried to get some Java code working that could read PS4 controllers/gamepads on a Raspberry Pi. My aim is to use the Pi as a mini-gaming-console, so I can keep it near our big TV and create some simple co-op games that I could play with my kids, rather than drag them over to a small laptop with its small screen.<br /><br />And I succeeded! By standing in the shoulders of giants (in this case, the <a href="https://jinput.github.io/jinput/" rel="nofollow">JInput</a> authors) and finding the native JInput modules compiled for AMD, it seems to work.<br /><br />The repo is here: <a href="https://github.com/SteveSmith16384/jinputtest">https://github.com/SteveSmith16384/jinputtest</a> . Currently only tested with PS4 gamepads. Let me know if it works for you.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-35932009344375933642019-10-23T05:38:00.002-07:002019-10-23T05:38:27.646-07:00Recreating Speccy Games in 3DI've decided to have a go at recreating some classic Spectrum games in 3D, with the eventual aim of stringing them all together into one big epic adventure.<br />
<br />
Here's the first one:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/V9t12X4jOHY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/V9t12X4jOHY?feature=player_embedded" width="320"></iframe></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-12223482078464436882019-08-13T05:21:00.003-07:002019-08-13T05:21:48.529-07:00Open Source Software StatusesLooking for open source software is a bit like getting a (free) car. It might look good (or not) and in order to find out whether it is any good, you need to spend the time investigating it and using it. It might be a supercar, but look like an old banger. It might not even be built yet, or it might look amazing but the engine doesn't work. Unfortunately, it always takes time, often to find out that it was a waste of time.<br /><br />In order to alleviate this situation, I propose a set of statuses to help determine whether an open-source project is what you want:-<br /><br />* Non-existent - No code has actually been written yet. There seems to be lots of repo's in this state<br />* Not yet playable - Typically started, but won't run (or won't even compile)<br />* Runnable - it will compile & run, but who knows what will happen<br />* Basic but Playable - There is something to do, but by no means a complete game<br />* Fully playable - It's pretty much a game ready for players.<br /><br />One thing to remember with open source is that they are never finished, only (eventually) abandoned, but that's not necessarily a bad thing. If a project is fully playable, it doesn't matter if it's been abandoned if other people can use it.<br /><br />These statuses do oversimplify the state a game could be in. A game could be fully playable, but have massive bugs that cause it to crash. Unfortunately, there's no way to easily categorise these. But the above statuses will at least save people some time when searching.<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-34870168775165870562019-08-12T07:04:00.005-07:002019-08-12T07:04:43.259-07:00Simple Platformer, with Source CodeI've written this simple platformer game using LibGDX. It's a
multiplayer game where the aim is to collect more coins than your
opponents before you run out of lives. The screen constantly scrolls
upwards, and you have to avoid being left behind at the bottom. I've
tested it with PS4 controllers, I assume (probably incorrectly) that
X-Box controllers should work as well.<br />
<br />
Full source code is available <a href="https://bitbucket.org/SteveSmith16384/simpleplatformer/src/master/">here</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-u21xlE4LCxFofLBSAMj_k4sB28yg6DXDG6qpbxqyZ8A9GuW0DibcfuUzYTB4f9gjQ5JmsJG8jxf5IoXkq8Hw5XgjsyOV2K3ky7poy7BX4JHM6LBbaF6B-Any0qpe6ygyaumPbA/s1600/gameplay1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="409" data-original-width="600" height="436" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-u21xlE4LCxFofLBSAMj_k4sB28yg6DXDG6qpbxqyZ8A9GuW0DibcfuUzYTB4f9gjQ5JmsJG8jxf5IoXkq8Hw5XgjsyOV2K3ky7poy7BX4JHM6LBbaF6B-Any0qpe6ygyaumPbA/s640/gameplay1.gif" width="640" /></a></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-26757475636797441152019-06-26T07:03:00.003-07:002019-06-26T07:03:32.766-07:00A New Roguelike ProjectRoguelikes really suit my programming style: they can be ASCII based, which makes creating the graphics very easy, and they are usually grid based, so positioning entities and checking for collisions is simple. This means that I can spend more time actually creating a game rather than writing all that boilerplate collision and graphics code.<br /><br />I wrote my first roguelike (<a href="https://bitbucket.org/SteveSmith16384/ftlrogue/src" rel="nofollow">Astro Commander</a>) several years ago; it was based on what I thought FTL was like, having never actually played that game. I've now decided to write another roguelike, after deciding that 3D graphics are too much hard work. Also, I wanted to have another go at creating an even-better ECS system. And of course, the theme of the game will be a classic Spectrum game: Alien (Mind Games).<br /><br />In this game, you will control the crew of Nostromo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.screengeek.net/wp-content/uploads/2018/12/alien-movie.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="482" data-original-width="800" height="192" src="https://www.screengeek.net/wp-content/uploads/2018/12/alien-movie.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br /><b>Do you know, I always feel</b> I should write about the games I create in order to "get them out there". However, when I'm excited about a new project, I prefer to spend my time creating it (rather than writing about it and taking screenshots). Once this excitement has passed and I've completed all the interesting challenges, I'm then too disinterested in the project to bother writing about it, since I'll probably start another project and won't look at this again.<br /> <br />If you want to look at the source code, it's <a href="https://github.com/SteveSmith16384/ShadowfireRL.Net" rel="nofollow">here</a>. It contains a good ECS system, and units can walk around. But now I've decide the writing a co-op game is my next project, maybe in Unity.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-79697787367071074142019-06-21T05:05:00.000-07:002020-02-20T00:45:05.159-08:00What is an Entity Component System?Let's assume you've written a game. Imagine you've split your game logic into several well-defined classes, e.g. a movement class, a collision class, a drawing class. Let's call them "systems". Each has a specific and obvious role. Also imagine that your game has a bunch of "things" that make up the game, such as the player's avatar, power-ups, bullets etc... Let's call them "entities".<br />
<br />
Each entity is basically a collection of data, and depending on what data it has, it can be handled by one or more systems. For example, if it has "bounding box" data, it can be handled by the Collision System. If it has image data, it can be handled by the drawing system.<br />
<br />
Your game then works by cycling through specific systems that are required to run each game loop, e.g. Player Input System, then the Movement System, then the Drawing System. Each system then "processes" all the entities that apply to it, e.g. draw all the entities which have image data. Systems may well call upon other systems as-and-when required. For example, your Collision System may call upon the Score System if a player's bullet hits a perp.<br />
<br />
And that's it!<br />
<br />
The advantage of this is that it's very easy to pinpoint which bit of code is doing something. If there's a problem with the animation, it will probably be in the Animation System. If there's a bug with collisions, it will probably be in Collision System. If you need to implement explosions, create an Explosion System.<br />
<br />
Designing a game now becomes a task of defining your systems based on what your game is. Once you have clearly defined and scoped systems, the rest is easy.<br />
<br />
I've created a simple ECS system which I use in my games, over at GitHub: <a href="https://github.com/SteveSmith16384/BasicECS">https://github.com/SteveSmith16384/BasicECS</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-9957483220584546522019-06-06T05:25:00.002-07:002019-06-21T05:12:24.978-07:00C# Gotcha - "static readonly" v "const"On the face of it, there seems very little difference between these, apart from one takes longer to type out. However, there is one difference that could easily catch you out: you can reference a "static readonly" from pretty much anywhere in your code, but until your code gets to the line where it is declared, it will have the default value (typically zero for numbers).<br />
<br />
Time for an example:-<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">public static readonly int size = width * height;<br />public static readonly </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">int </span>width = 100;<br />public static readonly </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">int </span>height = 50;<br /><br />public void Test() {<br /> Console.WriteLine($"The size is {size}");<br />}</span></blockquote>
<br />
Yes, this program will output "The size is 0". Probably not what you wanted.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-24852524814829673462019-03-28T06:26:00.000-07:002019-04-01T12:26:52.697-07:00Super Spectrum World<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXfy7HxBqkPDKsmkrZ5w_4QRsTGCJVg-rkGawO5adt_rmoWIIxOCDPKaI_Btd9DyHj5n8gE8jnioOSYdpuEVRuFIaQ0xujcbbgH3NN3BzhMQvALSdQ02B1WT3-ekfLG8eH7_eXdg/s1600/ssw.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="376" data-original-width="553" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXfy7HxBqkPDKsmkrZ5w_4QRsTGCJVg-rkGawO5adt_rmoWIIxOCDPKaI_Btd9DyHj5n8gE8jnioOSYdpuEVRuFIaQ0xujcbbgH3NN3BzhMQvALSdQ02B1WT3-ekfLG8eH7_eXdg/s320/ssw.png" width="320" /></a></div>
If you're like me and a big fan of the ZX Spectrum (especially the games) please take a look at <a href="https://stephensmith.itch.io/super-spectrum-world">Super Spectrum World</a>, my homage to lots of classic Spectrum games.<br />
<br />
I wrote this as a test of the features of LibGDX, and so far it's been great. If you lament the end of Java applets and were looking for a way to create apps that could be embedded in a web page, look no further.<br />
<br />
Currently the game has about ~20 screens, all with graphics taken from various games. In JSW style, your objective is to collect as many glasses as possible, and keys are O, P and Space.<br />
<br />
Have fun!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-16383525162753709022019-03-13T02:34:00.002-07:002019-03-13T02:36:33.597-07:00Why does anyone use MS SQL Server?Everything about MS SQL server seems designed to make it as difficult as possible to do anything.<br />
<br />
Want to restore a backup database? You'd better be restoring to a database of exactly the same version or else you're not allowed. Even if you're restoring from v10.000.000.1 to v10.000.000.2, that different version number will stop you. This might make sense if you were restoring to an older version, but you will be blocked even restoring to a later version of the database, which could and should be able to understand an earlier version.<br />
<br />
Want to import an SQL file? You may think that SQL Server Studio would have that sorted (and indeed it does for small files) but if you want to import an SQL file of more than 250Mb, get ready to use the command line. And if you have any errors in your SQL, don't expect SQLCMD to tell you the correct line number! And you are bound to get an error; I don't think I've ever managed to directly import an sql file (that was directly exported from MSSQL) without having to manually edit something in it first.<br />
<br />
And then there's "named pipes" and "instances" to adde extra layers of complication. And different versions: LocalDb, SQLExpress, SQLServer, each with their own features and problems. Some will work with IIS, some won't. Apparently LocalDb is "a SQL Server Database Engine that developer them write and test Transact-SQL code without having to manage a full server instance of SQL Server." Why not just run a full server instance, or have MS realise that it's just too cumbersome? That developers (unlike end-users) have seen through the looking glass and know better than to use it, but are forced to in order to develop for it?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-88929222562674063592019-03-05T01:02:00.006-08:002019-03-05T01:02:54.609-08:00LibGDX Setup Problem<a href="https://libgdx.badlogicgames.com/" rel="nofollow">LibGDX</a> is a complex technology, which utilizes lots of other complex technologies, so getting a project up-and-running the first time can have a few problems. Here's a rundown of the problems I experienced, along with solutions. <br /><br />This article assumes you are using Eclipse and running the default "blank" project (which shows the LibGDX logo).<br /><br /><br />
<h4>
Eclipse Error: GWT jar missing: </h4>
Do an Eclipse "quick fix"<br /><br />
<h4>
Eclipse Error: Web.xml missing:</h4>
Move the web.xml to \war\web-inf<br /><br />
<h4>
Running the program, get the error "File not found: badlogic.jpg"</h4>
The application will fail the first time. Open the Run Configuration you just created and set the working directory to the android/assets/ directory.<br />Go to Run => Run Configurations.. => choose DesktopLauncher, Arguments Tab => Working Directory => Others then browse to yourproject-android/assets/ and click Apply<br />https://stackoverflow.com/questions/22822767/file-not-found-when-running-new-libgdx-project<br /><br />
<h4>
Eclipse Error: EntryPoint not found</h4>
You need to download the Gradle plugin for Eclipse, from http://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html<br /><br /><br />
<h4>
Running Gradle, get error "could not reserve space for object heap"</h4>
Check you're using 64bit java for Gradle.<br />If that doesn't work, add the environment variable "_JAVA_OPTIONS" (with the underscore) and set it to something higher, like "-Xms256m -Xmx2500m".<br /><br />
<br />
--<br />
Hopefully, once you've got through all those problems, your project should work!<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-74342686768141560282019-01-10T05:24:00.001-08:002019-01-10T05:24:51.186-08:00My Open-Source ProjectsI've created a seperate website to showcase all my open source projects. Take a look at <a href="https://my-open-source-code.blogspot.com/">https://my-open-source-code.blogspot.com</a>, and maybe use them to kickstart your own projects.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-72880019046040868292019-01-08T07:10:00.001-08:002019-01-08T07:10:04.303-08:00SteveTech1 now has voxel supportSteveTech1 now has the built-in ability to create (and destroy!) voxel worlds. Now you can create a PUBG/Fortnite clone in Java with Minecraft style voxels.<br />
<br />
See it in action in this simple and rough demo that I created:-<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/G0ej4lXK49o/0.jpg" src="https://www.youtube.com/embed/G0ej4lXK49o?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
SteveTech1 can be downloaded here: https://bitbucket.org/SteveSmith16384/stetech1Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-46593426246466967442018-10-18T07:03:00.004-07:002018-10-18T07:03:47.580-07:00Want to write a multiplayer FPS?You could do a lot worse than follow my new tutorial at <a href="https://multiplayerfpstutorial.blogspot.com/">https://multiplayerfpstutorial.blogspot.com/</a> .Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-45631607603129728432018-09-30T06:24:00.000-07:002018-10-01T02:48:43.285-07:00More Games Made with SteveTech1Here's a couple of other multiplayer FPS games I've been developing with SteveTech1:<br />
<br />
<h3>
Bug Hunt:</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/OuySPWh2O5c/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/OuySPWh2O5c?feature=player_embedded" width="320"></iframe></div>
<br />
This is going to be a bit like Alien Isolation. It's very early in the development process, and so far I'm just walking around avoiding zombie's that charge at you.<br />
<h3>
</h3>
<h3>
Two Weeks in the Pub:</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/O-QbPfuOZQ4/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/O-QbPfuOZQ4?feature=player_embedded" width="320"></iframe></div>
<br />
If you're going to write a multiplayer FPS, surely it's only a matter of time before you write a PUBG/Fortnite clone, and here's mine.<br />
<br />
I should probably say that SteveTech1 can handle more than just low-poly models, it's just that those are the best free ones I could find on the internet.<br />
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-18868839.post-50009517003252069762018-09-27T01:03:00.001-07:002018-09-27T01:03:13.584-07:00Multiplayer Tower DefenceI've just started a new project using <a href="https://bitbucket.org/SteveSmith16384/stetech1">SteveTech1</a>, which will be a Multiplayer Tower Defence FPS. Read the in-progress tutorial at <a href="http://multiplayertowerdefence.blogspot.com/">http://multiplayertowerdefence.blogspot.com/</a><br />Unknownnoreply@blogger.com0