In this Visual Basic game programming tutorial, I will be showing you how to construct an NPC class which will allow you to bring other entities into your game.
As a base, I’ll be using the source code from my tutorial on saving & loading map data:
http://www.youtube.com/watch?v=PVHvEz0QcJU&feature=share&list=PLgYVPCchgt36FXseR-HzF7IqsjmJ8u3bn
TinyEdit – Experimental Map Maker:
http://www.aardaerimus.com/sourceshare/codeLab.asp
Tip Jar:
http://www.aardaerimus.com/tipjar.asp
🙂
Amazon Auto Links: No products found.
wow i duno where to start with computing D: im doing basic tutorials on coding and stuff
I think I showed menu creation in the Adventures In XNA series in parts 4e through 4g.
It’s pretty much identical to doing the title menu. Granted, the process could probably be refined a bit to make it more dynamic, but it’s reusable as it is.
Essentially, you just create a new “screen” and give it focus for input, then add a list of menu items (we had a simple MenuItem class) cycle through the indices with key presses, and draw the selected item a different color than the rest of the items.
Love the new thumbnails of the videos…. haven’t watch these, been up 24 hours and need sleep but wanted to comment on the awesome thumbnails
Thank you I learn a lot from this tutorial It was very use full I don’t know weather you have finished the map editor I have find a way to put the npcs to the map with Map handler class modification http://www.prageethniranjan.tk/AdventureInXNA.zip
thanks
Good to see a continue 🙂
And thank you for watching! I’m very glad that they’ve been helpful to you! 😀
Hows the updates on the map editor going?
Please do connected tiles in VB.net!
Hey there, ToniToTskiie!
If you go to my website (aardaerimus (dot) com) I have a link to the page with the NPC builder. 🙂 You should be able to just grab the naked toon template from that page, I’m fairly certain.
😀 I’ll try to get the rest of it uploaded tonight, too.
When I walk around, by background is pretty glitchy. I have the back color set to transparent and everything. Can you help?
any chance of a tutorial for a menu in game? so hit esc or something to get something like Save Game, Characters Items and that cause when I tried doing it It didnt show up…..
Made great progress earlier on in the week and then got busy. My big step forward was figuring out how to embed textures/png files directly into the workspace and map files.
This is a huge step forward because I can abandon the need to pre-load graphics in the game, and instead load the graphics directly from the map file and reference them with an alias. 😀
Many thanks, xFusionLordx! 😀 I wasn’t sure how it would turn out or if it would add much to the visibility of the series, but now I feel it’s a huge improvement.
It’s a lot of extra work, but I’m thinking of replacing my other thumbnails as well.
I just copied over the Debug screen and it wasnt working, different button, name but wasnt working, …… I’ll just inbox you instead.
Once you create the new screen class, you’ll add an input handler (i.e, ESC key) in the WorldScreen class to activate it (add it to the screenmanager). In your Menu you’ll have a list of menu items and you can use a variable to track the index and cycle through the list with your W/S or Arrow keys. 🙂
Made that
I was just playing around with the menu system and made some big improvements. 😀
I added a MenuBase to eliminate a great deal of code redundancy. Also added a sub menu class but I can foresee issues with that, do to behavioral differences between menu options.
what you can do is add a variable for menuEntry class with the type of Action, then when initializing the menuEntry then in handle input call menuEntry[menuSelect].Action.Invoke() . This also makes it easy to add mouse control to the menus
I would personally say that it is worth it.
Always good to see you around, ZetaWolf! 🙂 I’m glad I could get this out. I always feel bad for taking so long, but I’m glad they’re still helpful and appreciated.
Just a quick little thing to say, an app that I use that is much easier to use is 001 engine. You should try it!