Sub's coding pool party

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York


I made a clone of the old Lunar Lander game to learn SFML (input / audio / drawing sprites library + a few other cool things) and Box2D (physics / collision library), neither of which I've used before. It's good enough where I'm not motivated to finish it at this point. It just needs to check for if you landed or crashed when you touch down, and a check to see if you landed in the landing zone (green zone). It also doesn't have any form of fuel, and it lacks a background / gui. Also, there's no sprite or effect for when you engage the thruster.

I don't think it'd take much more to finish it, but I think I'm done with it since I've already started to work on what I actually want to work on. Plus, if I finish this, I'd want to compile a release version of SFML2, which I'm too lazy to do. Maybe I'll finish it when I get stuck on my next project.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I made a very quick video of the above project, because it took two minutes to make, and I want to start making quick videos of things that I make from now on. Keep in mind that it's woefully incomplete. The entire video is me trying to land and failing miserably, because the gravity and thruster values are out of whack.

http://www.youtube.com/watch?v=boDVCmU--98
 

sg2

New Member
Joined
Apr 20, 2011
Messages
37
Best answers
0
Except for a few pinches I get when I see you landing incorrectly very close to the green surface (or when knowing it will take forever to 'get back on course'), I still think it looks neat for a quick project. It's people like you who were responsible getting the Curiosity Rover on Mars. Yes, sir!
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I decided to mess around today and I ended up with this after a few hours.

http://www.youtube.com/watch?v=wxhmR3WSc8g

It seems like it might turn out cool, so I'm going to work on it more. Ideally it would be a very simple game based loosely on DBZ, Super Smash Bros, and ESF. I made this thread a while ago, and it's basically an updated version of that idea, without the setting / characters. I don't have a great track record with finishing stuff, so we'll see how far I get.

So the goal is to knock the other guy off the screen. The more damaged someone is, the farther they get knocked back when they get hurt. You have two options if you want to hurt someone -- Charge/fire an energy ball (no aiming done by you, it'd home in but not be very maneuverable), or you can melee. Melee is simple -- if two players collide, melee happens. When melee happens, the player who was moving faster stops moving / loses all momentum, and the other player gets knocked away in the direction that the other player was flying. So it's a 2D version of ESF's basic melee, except with the person going faster always being the winner. Like I said before, the more damaged someone is, the farther they get knocked back when hit by a beam / melee. I also want to put turbo in, but I'm not sure how that's going to work.

Anyone have any thoughts?

edit: Another day down, more progress. Melee is in and it works, although it needs to be polished a bit.

When you collide with the opponent, you both stop moving. You both flash white for a second as a visual cue that melee is engaged, and the winner aka the person doing the melee is whoever was moving faster at the time of impact. The next direction the winner presses after colliding is the direction that the person being melee'd gets knocked in. The strength of the hit is dependent on how damaged someone is. The person being hit also loses all of his ki and has to wait for it to start regenerating before recovering -- this was just a cheap way to prevent someone from stopping the knockback by flying in the opposite direction, but it works.

I made the color of the guys dependent on how much health they have. The more red someone is, the more damaged they are. I'm trying to get away with having no hud, with the exception of the ki number next to your character. I did some other small stuff like starting to implement energy balls, but mostly was just doing melee. Next time I'll polish melee a bit more and then try to implement energy balls. Not sure what key is going to fire ki attacks.
 
Last edited:

sg2

New Member
Joined
Apr 20, 2011
Messages
37
Best answers
0
In short: Awesome concept - although, the characters seem a little bit too tiny to be taken seriously!
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
It's pretty similar to LBZ, which is a game that I love. But yeah, I thought they were a bit small too. It might make it hard to actually hit someone with melee. As soon as I get the beams up and running, I'm going to test it out with my little brother to see how it plays. I'll make 'em a bit bigger if that's the case.

edit: Video of melee

http://www.youtube.com/watch?v=Rs7MMeUbo0I&feature=youtu.be

I need to learn how to make better videos
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Coding in energy ball attacks. While you charge an attack, the location of the energy ball changes to the closest point to the enemy.



I have no idea how the energy attacks should be structured code wise, given that the number of energy attacks can change at any time from 0 to however many the players fire. Should there be one class for energy attacks, and should I just make a vector of that object and allocate more as needed? Then there would always be on in existence, though, and that needn't be the case.

edit: Just going to allocate a vector of the weapon in main and pass a pointer of it to whatever function needs it.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
So I was using Box2D, a third party library for physics / collision. It's an awesome library and I can't really complain about it, but it has a lot of functionality that I don't need, and I felt like things would be simpler for me if I just coded in the physics system myself rather than using Box2D. I wouldn't do this if the physics in my game were more complex, but what I require is pretty simple. There's also a greater sense of satisfaction doing it this way.

So that's what I did. Box2D is now gone and the player physics are my own. That also meant that I'd have to do collision detection myself. I made a very simple program that takes an image as the background, overlays a grid on top, and then the user fills in where the ground is. It then exports this information to a .txt file and from there the game takes that data and turns it into ground for the game. Right now maps can only be as large as the screen (800 x 600), but I'd like to change that in the future. This is a terrible test map I made.





I also had a little fun with energy attacks. There's no physics attached to the energy attacks right now, so the energy balls just stay where they're placed.


I'm going to see if I can get permission to move this thread to artwork, because I don't feel like it belongs in offtopic.

edit: Sky said I could move the thread. Also, a video!

http://www.youtube.com/watch?v=ykvpOpsL1Ik&feature=youtu.be
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I started working on the physics of energy attacks. They're supposed to home onto the enemy, but not home enough that you can't dodge them. This was my first attempt -- Doesn't work like I want, but I thought it was cool so I made this quick video. Reminds me of a solar system, or of esf when you wrap a beam around a poll.

http://www.youtube.com/watch?v=j_eCLx9wpM4&feature=youtu.be

The background image was stolen from some site I found through google. I'm going to make my own background art when the level code stuff is all in place.
 
New Member
💻 Oldtimer
Joined
Oct 3, 2004
Messages
1,462
Best answers
0
Good work man. Your skills are progressing nicely :D
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Thank you my friend.

Anyways, I've been working on something cool that I'll probably never get working properly, but if I do I'll post it here.

And on another note, I've also decided that I'm going to program an online leaderboard for my DBZ game. If anyone tries to submit their score, though, it will change their name to mine. **** anyone who thinks they can best me.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
http://www.youtube.com/watch?v=U04FhE_0sjI&feature=youtu.be

Playing with weapon homing is pretty fun. I was good old sohcahtoa to home in, but my first attempt at it wasn't using that, and I thought the first attempt looked cool. At the moment I'm just changing the velocities depending on where the weapon is in relation to the player, and updating it about once every 100 miliseconds.

I'm thinking attacks should explode if they don't hit their target after a certain amount of time.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I'm not sure if this will work on anyone's PC since it's a debug build, but this is where the game I'm making is at the moment.

https://sites.google.com/site/subcreationsdownload/home/2DJumper.zip?attredirects=0&d=1

  • Arrow keys to move
  • Spacebar to charge weapon
  • Enter to change the homing target of all weapons (just for fun)

The AI is harmless at the moment, but it has a few things that it can cycle through -- it defaults to just hovering in place, but depending on context will either avoid falling off of the map or conserve ki if it's low. Also, apparently the version I uploaded thinks you've lost when you've won.


I've been keeping a todo list to keep track of what I need to do, and this is just a copy/paste of that list.
Code:
2D Jumper To Do List

IMMEDIATE TO DO 
Camera
    -  Polish that shit
    -  Fix function is entity within screen
    -  Reset Zoom after game over
    
ai
    -  Add Melee Mode for ai
    -  Add beam mode for ai
    
    
Game
    -  Add some sort of penalty to using weapons
    
GUI
    -  When charging beam, make sure ki isn't blocked by beam
    -  Make Main Menu
    
Phsysics
    -  Implement collision in multiple directions on map
    -  Tie energy balls in with collision
            
    
Future Versions
    -  Make AI better
        -  Pathfinding
        -  Melee
        -  energy beams
    -  Look into polishing ball homing
    -  Tutorial
    -  Implement multiple directions for melee hits
    -  Possibly remove draw collision
    -  Only check for collisions on objects near an entity
    -  Only draw objects on screen
    -  Polish ki recharge after melee
    -  Polish melee combos
    -  Make ki more readable
    -  communicate number of lives left
    -  Add block based level creation (IE:  Terraria)
    -  Destructable terrain
    -  Add water effect for levels
    -  See about replacing player squares with stick figure 
        -  Ragdoll it
        -  Animate it
            -  Figure out how to animate it...         
    - Add explosion graphics
Also, it needs a name. At the moment it's named 2D Jumper since that's the name I chose when I created the project and wasn't sure what it was going to be.
 
Last edited:
Death from Above
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Nov 25, 2001
Messages
4,943
Best answers
0
Location
Get off my couch
doesnt load

error.jpg

Also msvcp100d

Googled and got them :)
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I'll upload a version that's playable without hunting for dll files tonight, but I just want to say that I added in a rudimentary melee state for the ai and it's pretty funny. The AI kicks my ass.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
https://sites.google.com/site/subcreationsdownload/home/2DJumper.7z?attredirects=0&d=1

I was going to compile a release version, but then I'd realize I'd have to recompile SFML to be release dll's and I don't want to do that right now. I just bundled those two .dll's that you mentioned in with it, I think that will work o.0.

I spent about an hour or two on the AI, and then another hour trying to figure out why the AI will only fire 1 energy attack and then refuse to fire any more. Still not sure why, but energy attacks don't do anything at the moment anyway.

The number to the left of the ai is just so I have some idea what state it's in, 0 means avoid falling off the edge, 1 means hover in place, 2 means try to recharge ki, 3 means melee, and 4 means lob a bunch of energy attacks at the opponent (which, again, is broken atm).

Despite it originally kicking my ass, it needs a lot of work to be somewhat competent, but I think it's a good start.

http://www.youtube.com/watch?v=M1uhsL2oTn8&feature=youtu.be
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I thought getting the AI up and running was a big enough milestone to take a break and make something I've always wanted to make -- A proper clone of the game Drug Wars. I think I started sometime on Thursday and I'm happy to say I'm done. C# and Windows Forms are the bee's knees.

Download Link



I didn't test it out too much in terms of balancing, but I think it's fine for the most part. There's a small bug with the store not telling you what Misc. items you own, but I think that's it bug wise.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I just made a clone Tetris again. I entered a contest to create a game in 48 hours, and the theme of the game had to be dreams. I had intended to follow the theme, but I somehow ended up with Tetris...

It took me like 3 weeks to make Tetris the first time. I decided to try my hand at it again, and I finished in around 9 hours. I think code wise it's much cleaner / easier to understand than before, but it's still probably terrible code wise.

Source -- https://sites.google.com/site/subcreationsdownload/home/Subs Submission Source.7z?attredirects=0&d=1
Game -- https://sites.google.com/site/subcreationsdownload/home/Theme Is Dreams.7z?attredirects=0&d=1

 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
So I've decided to make an AI for Tetris. The goal is for it to survive for at least 10 thousand lines.



It's trying.

It's just a small bug with it not rotating correctly, but it made me laugh.
 
Just a nice person :)
✔️ HL Verified
Joined
Jul 17, 2009
Messages
262
Best answers
0
Location
The Netherlands / HOLLAND!
I like how well it runs though. Good job on that, even though it's a small game.
Even small games take some time to make it just right.
 

Users who are viewing this thread

Top Bottom