PDA

View Full Version : Weekend Game



schizoslayer
11-16-2009, 09:52 AM
UPDATE:

This project is now being documented here (http://agamesdesignblog.com/)

The most recent video is this one. (http://www.youtube.com/watch?v=hNryC5BKZ9Q)



Original Post:

Set myself a task of making something over the weekend although I had no real plan on exactly what it was going to be.

In the end I only spent a few hours on it in total (not even really a full working day) but ended up with this:

http://www.youtube.com/watch?v=1Nd4kIKUmPg

I'm being encouraged by friends to take it further and I think I might just do that.

EDIT: And so I have. See page 3 for the latest update with words or just watch this video:

http://www.youtube.com/watch?v=ySz-OjA8JVA

R2D5
11-16-2009, 09:57 AM
great work, could you make a Tutorialon how you have done that?

schizoslayer
11-16-2009, 10:01 AM
Alot of it was taken from the Whizzle design document. Except that I did it properly and the ball you control is a subclass of GamePawn and not KAsset.

I have no idea if it behaves in multiplayer but I have a suspicion that it really doesn't.

The pickups are just a subclass of DynamicSMActor with some code from DroppedPickup copied over to handle the actual collection.

It's incredibly simple really.

Keyframe
11-16-2009, 11:00 AM
I love the look of it - maybe you could expand the gameplay into some sort of kula world game, or if it would be possible to control the pitch/roll/yaw of the level instead of the ball movement... you'd have yourself a pretty decent game. I really love the look of it!

schizoslayer
11-16-2009, 11:05 AM
I can certainly make it "look" like you are :P

EDIT: Actually no I can't. I have plans to add water to the game at some point and I don't think that will be compatible without rendering changes.

ambershee
11-16-2009, 11:08 AM
Looks pretty good, especially for just a weekend's work. The real question is, how to expand on it, without it becoming too much of a 'clone' of other similar games.

Got much of a plan for it?

Keyframe
11-16-2009, 11:11 AM
yeah, like those labyrinth ball games :) or like you have it now, but with added jump ability, like pacman 3d for nds.

ambershee
11-16-2009, 11:15 AM
Nah - I'd not use jumping; instead encourage momentum based gameplay. I've a 2d demo that I wrote years ago that used something like that; building up momentum to jump gaps, or even roll up walls and across the ceiling :D

It was ace.

Keyframe
11-16-2009, 11:17 AM
woohoo, sounds like fun :D great stuff!

schizoslayer
11-16-2009, 11:24 AM
It's going down a very experimental path really in that I'm thinking of things that would be cool to add, trying them out and they figuring out if I can use it as a gameplay mechanic.

Example: Tonight I'm going to code in buoyancy (PhysX doesn't support it out of the box) and add in an actor that can change your ball into a balloon and back again so you can float on water or sink to the bottom.

R2D5
11-16-2009, 11:51 AM
Thank you for the explanation. I have another question ;) how have you imported the ball as player and made it rolling?

Piranhi
11-16-2009, 12:47 PM
Really good work mate, I'm impressed!

nickmarks
11-16-2009, 02:18 PM
that is great! Post Tutorial! Post Tutorial!!!

Chris2009
11-16-2009, 08:06 PM
I like it, nice work!

How many hours would you say it took?

Did you use Kismet for the top down view?

fallingbrickwork
11-16-2009, 08:20 PM
+1 for a tutorial, I think it would really help everyone with how things are fitted together... I know it would help me anyway :)

Great work.

Regards,
Matt.

F34Я
11-16-2009, 11:47 PM
From what you have shown thus far it looks like you have a very nice game! Keep up the good work! :)

crowl
11-17-2009, 12:24 AM
Nice work! Please keep us posted on your progress.

schizoslayer
11-17-2009, 07:28 AM
Thank you for the explanation. I have another question ;) how have you imported the ball as player and made it rolling?

The ball is a skeletal mesh with a physics asset generated in the editor. The Pawn class has it's physics set to RigidBody and I apply impulses to it in PlayerMove() in my custom PlayerController.


How many hours would you say it took?

Did you use Kismet for the top down view?

Around 3-4 hours or so I think in total but I was slacking and watching TV at the same time. I actually spent longer on the particle effects than the code :)

The camera is done in Unrealscript in the CalcCamera() function. I just put it 1024 units above the player.


I added a custom WaterVolume last night and a very simple buoyancy force but ran into problems when dealing with PhysX.

Long story short: You need to convert Unreal Units to Physics units when calculating forces and volumes etc and you can achieve this by multiplying unreal units by 0.02. You also need to add 0.025 to any dimensions you are using to calculate volume.

Additionally a Physics objects mass in Unreal is:

(Volume * Density)^0.75 * MassScale

Volume should be in Physics units not Unreal Units.

The UU to Physics multiplier is 0.02 because UT3 uses a scale of 1UU = 2cm and PhysX does it's calculations in metres.

3r Ch4mp1
11-17-2009, 03:58 PM
Hi, I saw your video and it is great! Good work! I want to know one thing...you used a development texture in the level (the white one with grid), I want to know if it comes with the UDK and what is it's name to use it, in Source there are similar textures, and they're useful for prototyping and controlling measures.

Thanks in advance!

Effregy
11-17-2009, 04:28 PM
Long story short: You need to convert Unreal Units to Physics units when calculating forces and volumes etc and you can achieve this by multiplying unreal units by 0.02. You also need to add 0.025 to any dimensions you are using to calculate volume.

Additionally a Physics objects mass in Unreal is:

(Volume * Density)^0.75 * MassScale

Volume should be in Physics units not Unreal Units.

The UU to Physics multiplier is 0.02 because UT3 uses a scale of 1UU = 2cm and PhysX does it's calculations in metres.
How the heck did you know that?

schizoslayer
11-17-2009, 04:32 PM
How the heck did you know that?

Because I've been working with Unreal professionally for the last 8 years.

schizoslayer
11-17-2009, 04:34 PM
Hi, I saw your video and it is great! Good work! I want to know one thing...you used a development texture in the level (the white one with grid), I want to know if it comes with the UDK and what is it's name to use it, in Source there are similar textures, and they're useful for prototyping and controlling measures.

Thanks in advance!

I made it myself.

Keyframe
11-17-2009, 04:42 PM
How the heck did you know that?

I have a theory schizoslayer is a warlock. I'm still collecting evidence.

3r Ch4mp1
11-17-2009, 05:03 PM
I made it myself.

Thanks mate! I think that you could publish it, it can be useful for more people than me...:)

Xero
11-17-2009, 07:05 PM
Haha that was a slice of awesomeness you made there schizoslayer


Long story short: You need to convert Unreal Units to Physics units when calculating forces and volumes etc and you can achieve this by multiplying unreal units by 0.02. You also need to add 0.025 to any dimensions you are using to calculate volume.

Additionally a Physics objects mass in Unreal is:

(Volume * Density)^0.75 * MassScale

Volume should be in Physics units not Unreal Units.

The UU to Physics multiplier is 0.02 because UT3 uses a scale of 1UU = 2cm and PhysX does it's calculations in metres.

Also thank you so much for posting this. I've been trying to find out the correlation between real world and unreal units. Also I'd love you see your progress on add buoyancy to the water.

CyborgGuineaPig
11-17-2009, 07:47 PM
Looking cool, marble madness?

eosteric
11-17-2009, 08:14 PM
The material you made looks great, sleek look.

schizoslayer
11-17-2009, 09:35 PM
http://www.youtube.com/watch?v=ySz-OjA8JVA

Video showing my work with Buoyancy. It currently only affects the players ball and only works with spheres :)

The players ball now uses Rotational Torque and relies on ground friction in order to move around rather than just applying impulses.

I also played around with the postprocess settings to increase the contrast so everything isn't quite as washed out as it was.

Xero
11-17-2009, 10:27 PM
Wow so that means you make it slip n' slide if you use a physics Mat with let friction. Hmmm I wonder if there's a wall with really high friction, would it be able to roll up it a bit?
The buoyancy looks fantastic.
Mind sharing a little on how it works? Sorry I'm just curious. :D

Geti
11-18-2009, 12:44 AM
very sleek looking prototype. im really liking the lighting insofar, and the slipperiness of the ball in the latest demo.

micahpharoh
11-18-2009, 12:56 AM
wow, this is awesome! Great work, especially since it was done so fast

Sir_Brizz
11-18-2009, 01:12 AM
Because I've been working with Unreal professionally for the last 8 years.
Normal Jedi can't do this in a weekend, btw :)

kele5213
11-18-2009, 02:42 AM
Unable to connect to this page
+_+ I can't connect youtube,because our democratic government believes that youtube will teach kids about bad things

Blade[UG]
11-18-2009, 05:59 AM
hooray marble madness!

Nysuatro
11-18-2009, 06:53 AM
Great work man, looking forward for more

fallingbrickwork
11-18-2009, 06:55 AM
One word... Amazing!

Regards,
Matt.

Effregy
11-18-2009, 11:37 PM
Because I've been working with Unreal professionally for the last 8 years.
well dangit...you've gone and made me jealous of your expertise...


Normal Jedi can't do this in a weekend, btw
He's obviously the famed super Jedi? Or at least a clone...

kodiakb20
11-18-2009, 11:56 PM
It's really cool from a tech perspective, but where are you going with the gameplay?

renegadeZERO
11-19-2009, 10:07 AM
This is really impressive. I could see this on Xbox Live Arcade and/or PSN. A kind of puzzle type game as people have stated. A couple of people to help you out I'm sure you'd have a hit on your hands ;)

I hope you take this further and look forward to seeing how it develops. Shows a lot of potential. Keep up the great work!

Fallen667
11-20-2009, 01:59 AM
Woooouuuuu!!!!Thats awesome!!!! No other words.. Movement, lighting, textures.. everything..
Could you do a quick tutorial on just how to do a simple movement of the sphere (without its rotation, accelleration etc..).. just how to get the sphere in the scene and move it with cursor keys.. that would be really helpfull!!
Woooouuuuu!!!!

Fallen667
11-20-2009, 02:00 AM
Gameplay could be - dont touch the walls or you'll explode!!!!

marcusmattingly
11-20-2009, 02:53 PM
Wow, pretty darn good for a weekend! I do love the look. Thanks for posting!

A few ideas, what if you made it where the ball could turn in to many different materials when you pick up a certain power up (fireball, iceball, spikeball, electricity, wood-can float like you mentioned). Then you could have puzzles that are solved by being in the proper form. A cool level design thing might be to have holes where you can fall down in to a lower level.

Anyway, just some ideas. Have fun with it and please keep us posted on where it goes.

Marcus

dps
11-21-2009, 09:58 AM
Awesome work !

Any plan on releasing your source ? I've been trying to do a sidescroller game and followed the wizzler documents but it's really not intended as a tutorial, there is a lot of hole and uncompleted code. I've been looking at the source but they added so much that it's hard to know what is the base of it.

A ball rolling in a 2D locked environment with glowing sphere is a much better exemple in my opinion :)

GamerKnight
11-22-2009, 08:10 PM
Can i Play?

looking good mate, keep up the work

juhogii
11-23-2009, 12:31 AM
Oh, this is like a game which I was making 6 or 7 years ago with Gamestudio engine! It was never finished but had 5 fully playable levels. Since that project I've thought about making of version 2 of it and now that I've this interesting and modern engine to work with, maybe I'll someday start that project. At least UDK should have all it takes to make it fun and cool. However my very limited skills might be the problem :)

Really nice work! Keep up the good work

victoraugusto
12-03-2009, 10:26 PM
Amazing work ;)

schizoslayer
12-06-2009, 05:38 PM
I'm back!

After a few bumps in the road to Physics Puzzler (namely the annoying cap on Angular Velocity) I decided that this weekend I would enact a change of direction and turn the code I had into an Arena Shooter.

Behold!

http://www.youtube.com/watch?v=MybdpmKMy-g

I also did a lot of code refactoring to tidy things up and made all of the most recent changes using Osmant's UScripter IDE (http://forums.epicgames.com/showthread.php?t=710602) as opposed to Visual Studio so I could give it a good work out.

The weapon class is custom built from scratch as the Unreal Weapon system has alot of stuff in it that I just would never need on a project like this.

The enemies don't use any path finding at all because frankly they don't need it and it would be a waste.

All in all the latest changes took me about 6 hours total. Not bad really.

gnyoda
12-09-2009, 10:05 PM
really insightful and interesting work, excited to see more.

FrozenDozer
12-10-2009, 07:30 AM
Yeah, and thanks for answering my PM. You could at least say that you don't want to.

zoltanjr
12-10-2009, 08:42 AM
Ah no more cool buoyancy stuff anymore? Its like a blender GE tutorial gone mad now haha

fallingbrickwork
12-10-2009, 09:46 AM
This is really great work. I would love to see the scripting you have done for this or better still a tutorial.... pretty please with bells on!

Superb,
Matt.

schizoslayer
12-13-2009, 02:35 PM
More progress has occurred this weekend and I am now chronicling it on my blog here (http://agamesdesignblog.com/2009/12/13/udk-a-project-continues/)

Main changes are visual with a whole new look and I've fixed lots and lots of bugs and made many changes (for example you can now die) and well just take a look:

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

DELTATHUND3R
12-13-2009, 03:52 PM
Excellent matey...

Fallen667
12-13-2009, 06:11 PM
this really is awesome.. any chance we could get a playable demo to.. well.. play with? :D

KazeoHin
12-13-2009, 08:41 PM
Dont mean to sound like I'm criticizing, but this seems VERY similar to Geometry Wars RE, the "Microsoft is going to sue you now" similar. I'dd suggest to add a lot of art to get this looking unique.

itzexor
12-13-2009, 09:21 PM
Dont mean to sound like I'm criticizing, but this seems VERY similar to Geometry Wars RE, the "Microsoft is going to sue you now" similar. I'dd suggest to add a lot of art to get this looking unique.

That was the first thing I thought when I first saw this game.

schizoslayer
12-14-2009, 06:11 AM
Dont mean to sound like I'm criticizing, but this seems VERY similar to Geometry Wars RE, the "Microsoft is going to sue you now" similar. I'dd suggest to add a lot of art to get this looking unique.

Microsoft do not own Programmer Art as an art style or the Arena Shooter as a genre. The only documented case of them contemplating legal action (and they never did anything more than send an email) was in the case where there was a 100% clone of Geometry wars doing the rounds for free.

And by 100% I mean you couldn't tell it wasn't Geometry Wars at a glance as the ship and enemy art were all identical.

Case in point:

Geometry Wars:
http://worldofstuart.excellentcontent.com/grid/gw1.jpg

Grid Wars:
http://jasoncirillo.files.wordpress.com/2009/01/geometry_wars.jpg

Grid Wars was a 100% rip-off and can't even claim to be inspired by the game because it was purposefully trying to emulate every aspect of it. This is a valid case of Copyright infringement. However The Arena Shooter and the general art style has existed long before Geometry Wars (by a good decade at least) and Microsoft cannot claim to own either.

Fallen667
12-14-2009, 06:26 AM
i actually dont se that much similarity between your game and GW.. the only similarity is vector-look, but like you said - the style existed long before and its been used gazillions of times..
dont know why people ALWAYS compare games?? its IMPOSSIBLE to make something unique this days and even if you manage to pull it off, theres always some aspect of the gameplay or art style or some monster or some explosion or something.. that can remind somebody of some other game.. or movie.. or piece of art.. so no matter how unique you are, EVERYTHING can be comapred to SOMETHING somebody elase did some time ago..

spin
12-14-2009, 06:37 AM
Just out of interest, are you running this on a controller or kb/mouse?

It might share some stylistic and general gameplay mechanics with Geometry Wars, however as stated, so does asteroids and many other old school shooters, which was what GW was aiming at replicating. I personally think there is no problem whatsoever with carrying on that gameplay thread.

From how this has evolved since your first efforts it's pretty clear to me that you have been building basics and then playing around to see what nice gameplay can come from that, I totally applaud your way of working and look forward to seeing this evolve.

fallingbrickwork
12-14-2009, 06:59 AM
Dont mean to sound like I'm criticizing, but this seems VERY similar to Geometry Wars RE, the "Microsoft is going to sue you now" similar. I'dd suggest to add a lot of art to get this looking unique.

I don't really see anything wrong with this, I've seen closer "remakes" (I realise you may not be making a clone/remake - just wanted to use a similarity type word) with just a name change over the years. That said i'm no IP lawyer.

I think it's a truly sterling job and can't wait to see your next update... you do seem to be driving forward with this project and every update has such dramatic additions. Also, I like the fact that it is showing the engine in a non fps/3rd person game. I have a 2D top down game developed in Unity that I would like to get moved over to UDK and seeing your efforts has made this truly possible... i'm only hoping i can get my head around the scripting for this.

Regards,
Matt.

schizoslayer
12-14-2009, 07:11 AM
Just out of interest, are you running this on a controller or kb/mouse?

It might share some stylistic and general gameplay mechanics with Geometry Wars, however as stated, so does asteroids and many other old school shooters, which was what GW was aiming at replicating. I personally think there is no problem whatsoever with carrying on that gameplay thread.

From how this has evolved since your first efforts it's pretty clear to me that you have been building basics and then playing around to see what nice gameplay can come from that, I totally applaud your way of working and look forward to seeing this evolve.

It's KB and Mouse. Converting over to a controller actually introduces issues with the movement physics in terms of the analogue sticks and I don't really want to tackle that until I have the game running fully with my preferred control scheme :)

Plastik
12-14-2009, 01:10 PM
schizoslayer, where did you get that nice grid texture? :rolleyes: I cant find anything similar :(

schizoslayer
12-14-2009, 01:31 PM
Like most of the art I made it myself. Might I recommend you get yourself a copy of Gimp (http://www.gimp.org/) - knocking out a grid texture is super easy once you get used to the interface.

Gizmosan
12-14-2009, 04:13 PM
schizoslayer: I really like the retro art style! great work for a weekend game!

schizoslayer
12-20-2009, 10:52 PM
Last update for a while as I'll be without my own computer for a good 2 weeks.

I stepped up the amount of work this week and did alot of behind the scenes refactoring which ultimately you won't be able to see in the videos but means that memory is fragmenting less (as well as generally using less) and performance is much better (Rarely dropping below 160fps these days).

However things you will notice:

New "Bumbler" enemy type that moves around the map with a pseudo random wandering motion. Combined with the homing "Grunts" this makes the arena more interesting as you can't herd or kite the Bumblers and being inherently unpredictable keeps you on your toes.

The Arena is no longer made of BSP and is actually a single actor with about a dozen components. This has allowed me to make it much more reactive and it now changes colour over time, flashes each time you kill an enemy and I prototyped a "Ripple" effect in the grid that currently fires with each new wave but will later get tied into explosions.

So then a video:

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

The refactoring and optimizations I did for those that are interested (as you may encounter similar needs yourself):

Actor Pools:

Previously I was spawning and destroying actors every time I needed one. Each enemy and bullet was a new actor. Spawning and destroying as rapidly and frequently as I was (roughly 900 bullets would get created and destroyed in 60 seconds of play and 300 enemies) causes massive amounts of memory fragmentation which is basically bad.

In addition to this Spawning an actor is relatively expensive so spawning alot of actors quickly is very expensive and can cause hitches in the framerate.

To get around this I created an EnemyPool that manages the spawning of an Enemy in the arena. This consists of a dynamic array for each enemy class and some functions to spawn an enemy or add it to the pool. Each time I spawn an enemy we first check the pools length and if it is non-zero we pull out the first actor and initialise it to the correct place and state. If not we spawn a completely new actor instead. Every few seconds I clean out some actors from the pool if there are too many hanging around.

I also implemented a similar system for Projectiles where the Weapon class manages a pool of projectiles it can spawn and when the weapon is created it actually prefills the weapon with some Projectiles up to a minimum amount.


Simple Enemy Class:

Older versions used Pawns and AIControllers to control the enemies. The actual number of actors required to get an enemy in game using this method was about 4 (Pawn, Controller, Inventory manager, Weapon). In addition controllers and Pawns have alot of code going on that; after investigation, I just had no need for given how very simple my enemies are.

Result was creating an enemy actor class that encapsulated everything I needed with just 1 actor and 3 components and was powered by a very simple state machine. This also made the job of pooling enemies much easier than it would have been had I stuck with Pawns.

Contrails
12-20-2009, 11:16 PM
Looking good :)

Do you have plans to make more varied levels? Liked the idea of water and different materials you were experimenting with in one of your earlier videos... maybe instead of a wave based level, you could give the player a starting point and a course to go through being chased and ambushed by enemies.

Joseph Ferano
12-20-2009, 11:25 PM
How many FPS did you improve by adding the new components?

By the way, excellent work. You got a fan over here. :D

Repent_
12-20-2009, 11:38 PM
http://www.youtube.com/watch?v=Jhhocl7jf3o

LoL you play Star dust much lol

Cow Muffins
12-20-2009, 11:52 PM
You need to make it so each wave is timed. It would make it more challenging, because even if one wave wasn't destroyed completely then it would still spawn the next one.

schizoslayer
12-21-2009, 06:01 AM
It's on the list. Thing is that the list has about 100+ things on it at the moment and I'm attacking it in a fairly haphazard fashion :)

schizoslayer
12-21-2009, 09:42 AM
How many FPS did you improve by adding the new components?

By the way, excellent work. You got a fan over here. :D

The problems I was encountering were only manifesting when the game started to get intense after a few minutes of consistent playing. Going from a standing framerate of about 200fps with no action to around 80fps at it's worst (which I realise is still far better than most console games but my goal is to keep the game as fast and lightweight as I can).

The actual script time I was getting from Stat Game was rarely ever over 1ms even at the most intense points so there wasn't much I could really do to improve my script code as it wasn't the bottleneck.

The problem was in the number of actors that were being ticked and the spawning times were going up as the game progressed.

By pooling actors I managed to remove 90% of my calls to Spawn and Destroy which meant that Garbage collection was faster (which is when the engine frees up the memory) because it had nothing to clean up, world tick got faster because it wasn't ticking actors that were waiting to be destroyed or garbage collected (and the more actors you have the longer it takes to tick all of them) and the memory footprint was reduced as I rarely ever had more than 500 actors at once (compared to several thousand previously).

Overall the framerate these days rarely drops below 180 for me except during really big spawns (120 enemies at once) where it will drop down to about 100 fps (but this is a limit resulting from the physics simulation and not much I can do about it).

Really Really big spawns of around 250 enemies drops me to about 60fps for the same reason. I wish there was a way I could improve this because I'd like to be able to go even higher than this eventually and it's important to me that everybody that can run Unreal 3 can play the game at 60fps.

Dregoloth
12-21-2009, 12:53 PM
8 years eh? you should really consider writing a tutorial!

(and yes, this is an attempt to steal you're knowledge)

mafiadude1
01-30-2010, 01:46 AM
what command did you use to apply impulses for a skeletal mesh because 'SkeletalMeshComponent.AddImpulse' isnt working for me :(

stiltskin
02-01-2010, 06:05 PM
this is awesome stuff. ive been trying to get the locked 3rd person cam bit working but it wont work for some reason. how did you do it?

Cirdan
02-10-2010, 07:15 AM
Thanks for sharing all your info. We were trying to get the camera to follow the ball, and we ended up with a strange situation where the camera was looking at the ball, but pivoting around it like a gimball. Tuck and roll, and much motion sickness :)

These latest updates are awesome!

steven1075
02-19-2010, 03:07 AM
All I can say is simply amazing, keep up the awesome work man!

Flak
03-01-2010, 11:25 AM
This game is so addicting and fun :) We're looking forward to future updates here for sure!