Game Programming - Episode 58 - Spawn Level Assets

The Cherno · Intermediate ·🧒 Coding for Kids ·13y ago

Key Takeaways

The video demonstrates game programming concepts using Java, including sprite management, level design, and tile-based game development, with tools such as Paint.NET and Java's Tile class.

Full Transcript

hey what's up guys My Name Is AO welcome to episode 58 of game programming So today we're going to take a look at a few more Sprites that we need to actually um make our game to finish up the map because remember um this portion of the series we're basically just going to take a look at making maps and um and getting that down all right so what one thing I did that I actually didn't show on camera I guess is I actually fixed up the Cho the king Cho Sprite so and W the guy made the original Sprite sent another Sprite to me because the first one wasn't uh didn't really look nice when um for the for the sidewalking on animations I mean so yeah he fixed that up and now it's now it's good so I just basically changed his price but um the other thing is we need to make some more tiles because currently if we go into tiles or tile rather into our tile class you'll see that we've got like what freaking three tiles remember void ties is just like a just in case ties it's not really a we we not really going to use it but um we've got yeah we've got three tiles here and we need a lot more than that to make a nice looking game so I asked you guys if you wanted to send in your Sprite Shades um and basically of textures that you've actually made and then um you know let me use them for the series and I got a lot of textures from you guys but um I think the most comprehensive and the most complete and the most pretty looking textures were were by Jacob Blomquist Blomquist I hope I hope I'm pronouncing that right but um Blom quador Blom Blom quador um he sent uh these Textures in so they look really nice um and he said that he made them himself so I'm going to have to trust him on that um but yeah so we got some nice like water or even ice whatever um bunch of walls which is what I like uh as well as like bunch of different grass textures which is awesome and you know different Stone and stuff like that which is nice I really like this texture back this this it makes this grass look completely terrible so I'm probably going to get to get rid of that grass but um we're definitely going to put in these textures into our spray now and use them so over here um so this is like the king chos spr that I replaced but in paint.net I've just opened up his stuff here as well and I'm just going to copy and paste it into my Sprite sheet and we're going to use that so let's just grab all of this oh and that's even transparent that's very cool um it's not really transparent but it's low opacity I guess um so we're just going to put this probably right over here um I might actually make several Sprite Shades in the future but first I just want to get this down so we can definitely get rid of um let's just cut this I guess and like paste it here cuz we don't need that grass texture and fix this up there you go all right awesome so first thing I want to do is probably start using this Grass Station instead in fact all that we really need to do here is um if we just want to try out like a different um Sprite for grass all we need to do is really just change the coordinates if I want to go from this grass to let's just say this one which looks like a 0 1 2 3 4 that five 0 1 2 3 4 somewh four S I'm working on very little sleep went to like went to bed at like 4:30 a.m. last night cuz I was at a party so um yeah so yeah but that's really okay that's definitely not it um did I save that there we go um so yeah that looks kind of nice let's try a different one um let just try one more you can really play around with that you can see the Rock's kind of looking consistent but that's fine that looks nice I like that I like the view of that um so yeah um um I might get someone I think I saw some rocks that you guys sent in as well so I might do that later I don't know if you guys want to see all this Graphics work on like on screen in the series if you do um let me know in a comment below um if you don't want to see all this Graphics stuff and you just want to only see code basically and you don't really want to see the the levels or the or the textures I guess get designed and implemented um drop a comment let me know what you guys think about that but um I don't know I think it'd be awesome having um you know the entire game I guess being made in front of you guys instead of me basically being like Oh yeah I've compiled several sprad sheets now and they're ready to go but um yeah that's just my opinion so let me know what you guys prefer um but yeah okay so now that we got that covered um we're going to make a bunch of bunch of tiles so who basically the way that I approach this is I am a very organized young man at least I try to be and I especially try to be in in my programming there's something something about organization and keeping code grouped and clean really appeals to me which is why this is like the hierarchy of our thing here which is why I really like to actually keep everything separate and everything fully organized because I don't know it's just it's just cool it's just cool like that so in textures I'm going to make probably a folder called levels and I'll put the level in there in a minute and I guess in levels though we'd probably have might make it might make another one called Shades this will be like Sprite Shades um yeah okay cool I'll definitely do that so I'll put Sprite sheet into there and level into levels right looks good good and obviously just before our game crashes for no apparent reason we need to quickly fix the folder structure so this obviously becomes in levels right so I've just moved it um and the actual Sprite shade I think was in here so levels Sprite shade awesome check if that runs no okay so we forgot to replace one thing I'm not sure where it is though actually we could probably just debug it that' be easier um so it looks like it's the load for the Sprite sheet oh no that should be where's path okay no that should have worked oh levels sorry my bad sheets not levels terminate try that again awesome cool so um yeah so we'll call this one I guess see I want I might I I kind of want to separate tiles per levels so in other words spawn level what what do we want our spawn level to look like that's really interesting hm these are actually pretty high resolution aren't they are these really 16 by 16 yeah they are huh almost looks like 32x 32 they look really nice though so yeah um but anyway uh I guess what we want to do let's just close that I guess what we want to do is split it up sort of so I might make a new sheet and the spawn level let's just take a look at what the spawn level's going to have it's definitely going to have some grass it's going to have some walls it's going to have water that's like three maybe fiveish maybe about six textures for this the level for that so six textures means basically if we have 3x3 I might make room for nine textures actually should we do that um yeah oops let's make room for nine textures so again effect I don't actually have the grid plugin on this computer yet so I'll just literally copy and paste some some cells whoa okay um whoops so we have nine textures uh and I I will simply um grab the textures That I Want from this Sprite shet and I guess technically I'll edit them out later um but let's just say we want to use this grass I love how there different grass textures that's awesome This Grass we might maybe even this this almost looks like a hedge kind of like that so we pop that in as well definitely use water not sure how I feel about transparent water but I guess that's kind of cool right um we'll put that there as for um walls definitely going to use these so I'll pop them here and I don't know I mean don't really need cracked ground no I think that's pretty good actually if there was a floor that almost looks like a floor but I'm not a big fan of that H um I might even use I'm going to use cracked floor do we want like a cracked floor or do we want like a um I'm just going to make a floor out of this I think like a wooden floor out of this so this will be like our floor so let's just edit that real quick at the moment that kind of bricks but um we can change that pretty easily so basically what I want to do is sort of scale it up a lot so let's just try and edit this so if I scale it up pixelated all right let's just get the aspect ratio down um scale it up a bit like that and then we'll copy some more squares in just to replace that almost feel like I need layers here then I guess we could sort of make like a floor body type look if I just sort of do this you'll see what I'm sort of getting at pretty soon ER and I like this color as well so I'll just so there we go just a simple basic sort of floorboard type deal um what's that look like that was kind of nice actually kind of like that there we go so that's like a nice looking floor I guess um save that okay so we'll save it in cheets obviously and we'll save it we'll call this like spawn level or something spawn level tiles I guess and that'll just contain the tiles for our spawn level so if we go over here and yeah I guess these episodes are going to be kind of long aren't they but um if we go over here into our Sprite chck class which is where we're in which is awesome so we call we'll go public static Sprite sheet and we'll call this one spawn level um and let's see so it'll be equal to new Sprite sheet and we'll just go textures sheets spawn level.png and the size of it right the size is well it's 48 so that's it just like that awesome so now we'll go into tile. Java and oh actually sorry sprite. Java which is oh it's open right here um and we'll just I guess we'll get all the I want I I almost want to like sort of group this but obviously we can't do that but it would still be pretty cool if we could group like that but we can't cuz they're static um but let's just over here we'll put like the spawn level Sprites here all right so spawn level Sprites here um and I guess we'll make a player Sprites here awesome nice and organized see just like I like it um just the way I like it so let's public static Sprite so they'll all have like the spawn prefix so spawn grass equals new Sprite and remember that's 0 0 as well but the again the difference here and the size is 16 the difference here is that it's going to be Sprite sheet dot instead of being Sprite sheet Do tiles it's going to be spr he. spawn level so that's very important that you don't forget that so we've got we've basically used up six textures here so I'm just going to copy that a few times and we'll go so spawn grass what else do we have um that looks like a hedge so I'm just going to call it a hedge then we' got water then we've got wall one wall two and floor right and I guess we'll just quickly change hedge to so that's one across that's two across that's one and then the rest are oh no actually one of them's two down I think that's W so I think is that right yeah that's right okay awesome so now that we've got a bunch of these kind of Sprites we're also going to go into tile do Java and this is where I also like to be organized so in tile we've got a bunch of tiles because tiles will sort of be specific two different things um we can right click hit new uh folder and I'm just going to make a new folder called spawn level right and then in here we're going to have all of our different classes such as for example the so these are all tile classes obviously but the spawn level is going to have a tile called grass Tile For example but just in case we'll probably want to call it spawn spawn grass tile right um and again that's going to extend tile and tile will have to be imported imported from the other thing and obviously it's going to have to inherit a Constructor as usual and it's also going to render the tile thing um this is going to be a freaking long long episode as well isn't it but if we go to like the grass tile we can just copy and paste that and I should really move that random method up the hierarchy but I might do that next episode or something um so that'll be the spawn grass style and we're going to finish all the other ones in the next episode of Game programming so I hope you like this video guys let me know if you guys want to see like the graphical work and all of that stuff um done in the videos and I'll see you guys next time later [Music]

Original Description

Lets go for 200 likes! Welcome to Game Programming, a series in which we take an in depth look at how to make a game from scratch, in Java. ---------------------------------------------------------------------------------------------------------------- Website: http://www.thecherno.com Twitter: http://www.twitter.com/thecherno Facebook: http://www.facebook.com/thecherno Subreddit: http://www.reddit.com/r/thecherno/ Steam Group: http://www.steamcommunity.com/groups/thecherno ---------------------------------------------------------------------------------------------------------------- Outro music is by Approaching Nirvana: http://www.youtube.com/approachingnirvana
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The Cherno · The Cherno · 0 of 60

← Previous Next →
1 3D Game Programming - Episode 1 - Window
3D Game Programming - Episode 1 - Window
The Cherno
2 3D Game Programming - Episode 2 - Game Loop
3D Game Programming - Episode 2 - Game Loop
The Cherno
3 3D Game Programming - Episode 3 - Arrays
3D Game Programming - Episode 3 - Arrays
The Cherno
4 3D Game Programming - Episode 4 - Drawing Pixels!
3D Game Programming - Episode 4 - Drawing Pixels!
The Cherno
5 3D Game Programming - Episode 4.5 - How Rendering Works
3D Game Programming - Episode 4.5 - How Rendering Works
The Cherno
6 3D Game Programming - Episode 5 - Playing with Pixels!
3D Game Programming - Episode 5 - Playing with Pixels!
The Cherno
7 3D Game Programming - Episode 6 - Performance Boosting
3D Game Programming - Episode 6 - Performance Boosting
The Cherno
8 3D Game Programming - Episode 7 - FPS Counter
3D Game Programming - Episode 7 - FPS Counter
The Cherno
9 3D Game Programming - Episode 8 - Alpha Support and More
3D Game Programming - Episode 8 - Alpha Support and More
The Cherno
10 3D Game Programming - Episode 9 - Beginning 3D
3D Game Programming - Episode 9 - Beginning 3D
The Cherno
11 3D Game Programming - Episode 10 - Floors and Animation
3D Game Programming - Episode 10 - Floors and Animation
The Cherno
12 3D Game Programming - Episode 11 - Rotation
3D Game Programming - Episode 11 - Rotation
The Cherno
13 3D Game Programming - Episode 12 - User Input
3D Game Programming - Episode 12 - User Input
The Cherno
14 3D Game Programming - Episode 13 - Render Distance Limiter!
3D Game Programming - Episode 13 - Render Distance Limiter!
The Cherno
15 3D Game Programming - Episode 14 - Basic Mouse Movement
3D Game Programming - Episode 14 - Basic Mouse Movement
The Cherno
16 3D Game Programming - Episode 15 - Textures + More!
3D Game Programming - Episode 15 - Textures + More!
The Cherno
17 3D Game Programming - Episode 16 - Walking, Crouching, Sprinting + More
3D Game Programming - Episode 16 - Walking, Crouching, Sprinting + More
The Cherno
18 3D Game Programming - Episode 16.5 - Exporting Runnable Jars
3D Game Programming - Episode 16.5 - Exporting Runnable Jars
The Cherno
19 3D Game Programming - Episode 17 - Small Adjustments + Birthday!
3D Game Programming - Episode 17 - Small Adjustments + Birthday!
The Cherno
20 3D Game Programming - Episode 17.5 - Creating an Applet
3D Game Programming - Episode 17.5 - Creating an Applet
The Cherno
21 3D Game Programming - Episode 18 - The Beginning of Walls
3D Game Programming - Episode 18 - The Beginning of Walls
The Cherno
22 3D Game Programming - Episode 18.1 - A Few More Things
3D Game Programming - Episode 18.1 - A Few More Things
The Cherno
23 Episode 18.5 - Creating an EXE File in Java
Episode 18.5 - Creating an EXE File in Java
The Cherno
24 3D Game Programming - Episode 19 - Rendering Walls
3D Game Programming - Episode 19 - Rendering Walls
The Cherno
25 3D Game Programming - Episode 20 - Continuing Walls, Fixing Bugs, and Managing Crashes
3D Game Programming - Episode 20 - Continuing Walls, Fixing Bugs, and Managing Crashes
The Cherno
26 3D Game Programming - Episode 21 - Texturing Walls, Fixing Clipping, and Fixing the Mouse
3D Game Programming - Episode 21 - Texturing Walls, Fixing Clipping, and Fixing the Mouse
The Cherno
27 3D Game Programming - Episode 22 - Random Level Generator + Properly Fixing Clipping
3D Game Programming - Episode 22 - Random Level Generator + Properly Fixing Clipping
The Cherno
28 3D Game Programming - Episode 23 - Graphical User Interface (GUI) Launcher
3D Game Programming - Episode 23 - Graphical User Interface (GUI) Launcher
The Cherno
29 3D Game Programming - Episode 24 - Making Our Launcher Work
3D Game Programming - Episode 24 - Making Our Launcher Work
The Cherno
30 3D Game Programming - Episode 25 - Writing and Reading Files
3D Game Programming - Episode 25 - Writing and Reading Files
The Cherno
31 3D Game Programming - Episode 26 - Custom Resolutions
3D Game Programming - Episode 26 - Custom Resolutions
The Cherno
32 3D Game Programming - Episode 27 - Decorating the Launcher
3D Game Programming - Episode 27 - Decorating the Launcher
The Cherno
33 3D Game Programming - Episode 28 - Continuing our Custom Launcher!
3D Game Programming - Episode 28 - Continuing our Custom Launcher!
The Cherno
34 3D Game Programming - Episode 29 - Launching The Game
3D Game Programming - Episode 29 - Launching The Game
The Cherno
35 3D Game Programming - Episode 30 - Colour Processing In-Depth
3D Game Programming - Episode 30 - Colour Processing In-Depth
The Cherno
36 3D Game Programming - Episode 31 - Sprites!
3D Game Programming - Episode 31 - Sprites!
The Cherno
37 3D Game Programming - Episode 32 - Sprite Mapping
3D Game Programming - Episode 32 - Sprite Mapping
The Cherno
38 3D Game Programming - Episode 33 - High Resolution Rendering
3D Game Programming - Episode 33 - High Resolution Rendering
The Cherno
39 3D Game Programming - Episode 34 - Entities
3D Game Programming - Episode 34 - Entities
The Cherno
40 Genesis - My Game for Ludum Dare 24
Genesis - My Game for Ludum Dare 24
The Cherno
41 Vlog + Ludum Dare Results
Vlog + Ludum Dare Results
The Cherno
42 Game Programming - Episode 1 - Resolution
Game Programming - Episode 1 - Resolution
The Cherno
43 Game Programming - Episode 2 - Threads
Game Programming - Episode 2 - Threads
The Cherno
44 Game Programming - Episode 3 - Game Loop
Game Programming - Episode 3 - Game Loop
The Cherno
45 Game Programming - Episode 4 - Window
Game Programming - Episode 4 - Window
The Cherno
46 Episode 5 - Buffer Strategy
Episode 5 - Buffer Strategy
The Cherno
47 Game Programming - Episode 6 - Graphics Initialized
Game Programming - Episode 6 - Graphics Initialized
The Cherno
48 Game Programming - Episode 7 - Buffered Image and Rasters
Game Programming - Episode 7 - Buffered Image and Rasters
The Cherno
49 Game Programming - Episode 8 - The Screen Class
Game Programming - Episode 8 - The Screen Class
The Cherno
50 Game Programming - Episode 9 - Rendering Pixels
Game Programming - Episode 9 - Rendering Pixels
The Cherno
51 Game Programming - Episode 10 - Clearing the Screen
Game Programming - Episode 10 - Clearing the Screen
The Cherno
52 Game Programming - Episode 11 - "Out of Bounds, Baby!"
Game Programming - Episode 11 - "Out of Bounds, Baby!"
The Cherno
53 Game Programming - Episode 12 - Negative Bounds
Game Programming - Episode 12 - Negative Bounds
The Cherno
54 Game Programming - Episode 13 - Timer
Game Programming - Episode 13 - Timer
The Cherno
55 Game Programming - Episode 14 - FPS Counter
Game Programming - Episode 14 - FPS Counter
The Cherno
56 Episode 15 - Tiles
Episode 15 - Tiles
The Cherno
57 Game Programming - Episode 16 - The Map
Game Programming - Episode 16 - The Map
The Cherno
58 The Walls 2 - Minecraft PvP Survival Map
The Walls 2 - Minecraft PvP Survival Map
The Cherno
59 Game Programming - Episode 17 - Key Input
Game Programming - Episode 17 - Key Input
The Cherno
60 Game Programming - Episode 18 - Controlling The Map
Game Programming - Episode 18 - Controlling The Map
The Cherno

This video teaches game programming concepts, including sprite management and level design, using Java and tools like Paint.NET. It demonstrates how to create a spawn level layout and implement tile-based game development. By following this lesson, viewers can learn how to design and develop their own games.

Key Takeaways
  1. Copy and paste sprites into the sprite sheet
  2. Change coordinates to try out different grass textures
  3. Scale up a pixelated image to create a floorboard effect
  4. Copy and arrange sprites to create a spawn level layout
  5. Create a wooden floor using a brick texture
  6. Save sprites in a Sprite sheet class
  7. Create a new folder called 'spawn level' in the tile Java project
  8. Create a tile class called 'spawn grass tile' that extends the 'tile' class
💡 Using a sprite sheet and tile-based game development can help streamline game development and improve performance.

Related Reads

📰
How Creative Characters Like Sprunki Inspire Kids to Learn Coding
Learn how creative characters like Sprunki inspire kids to learn coding through interactive games and animations
Medium · Programming
📰
Computer Applications for Primary School Children: A Fun + Safe Guide for Ages 6-12
Learn how to introduce primary school children to computer applications in a fun and safe way, teaching them essential skills for the future.
Dev.to · Ogunkola Adeola
📰
From 0 to 20 Chapters: My Story‑Driven Rust Book for Kids Now Has a Bilingual Interactive Demo
Create an interactive coding book for kids using Rust, with a focus on storytelling and bilingual support, to teach programming concepts in an engaging way
Dev.to · born1987-ir
📰
How Kids Can Build Fighting Games Stickman in Scratch
Kids can learn coding by building a stickman fighting game in Scratch, developing skills like movement control and collision detection.
Medium · Programming
Up next
Man Builds a Backyard Tiny House and Turns It into a Home Office | Start to Finish by @Elseweyr
AKLA GELEN
Watch →