Topic: Game project - Rift Runners

EDIT 1/5/17:

These games are all officially dead. The new year has prompted me to reevaluate my current goals, and I've decided to set some new ones. I'm still going to be pushing forward with the C++ thing, and some of the goals I've set for my programming progress remain unchanged, but these specific projects are over. Instead, I will be focusing my learning on the core fundamentals of the languages (C++ as well as straight C), and how they work. Not in a general sense, but instead in a more theoretical way.

My current project is a GUI system so I can circumvent the Win32 API. Instead of using their weird-o nightmare systems, I'm going to write my own system. Typical GUI systems are these weird rigid constructs where you have to define your window's layout, define widgets, define multiple logic systems to deal with the various states of those widgets and buttons and controls, then create an event system loop that goes through and checks against all of that state to see which thing needs to be handled when the user clicks on this or that...

It's a very cumbersome and, frankly, dumb way of doing things. There have recently been a number of people who have started using something called "Immediate Mode GUI". This is loosely described as a GUI system that works more like the more basic systems in a game. You just write a button object and give it its own internal state, and the button simply does what it needs to do when you push it / mouse over it / etc. This removes the need for a complicated event system and huge list of state when checking those events and makes the User Interface much more malleable and dynamic.

There are some drawbacks: They can be a little laggy (one frame of lag is not uncommon), and because you're generally redrawing everything for every frame, a super-complicated UI can actually cause some FPS issues if you fuck it up. But the flexibility and ease of use will, I think, more than make up for it.

So yeah. My current project is still to write a text editor, but now it's ore of a test-bed for my UI system as well as a thing unto itself. I'll be able to add to both as the need arises.

CURRENT VERSION:
http://img.photobucket.com/albums/v611/Squiggly_P/filename%202016-11-30%2012-57-01-145_zpstrdkjryk.jpg


ORIGINAL POST:

SPOILER Show
http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-01%2014-01-50-044_zpstlswdmd7.jpg

Oh shit, son.

So I decided that I needed to scale back considerably in my attempts to program functioning things, so I have started work on a console-based Rogue-like game. It is a true Rogue-like in the sense that movement will be turn-based and as much as humanly possible is going to be randomly generated.

Yesterday I set up the technical bits out of the way for setting the window up properly, and today I worked on making a movable player character you can run around the screen. In the process of making the character I figured out a far more effective way to set up the window, so essentially I just rewrote the entire thing this morning.

The game itself is going to not break new ground in the Rogue-like genre or anything. The goal is to try to get to level 99 of the titular Tower Of Life, where it is fabled that you will be granted immortality. Each level (except for the first and last...) will have randomly generated layouts with up and down stairs (i plan on letting players backtrack throughout the entire tower if they choose to), a bunch of enemy types and perma-death and all that standard crap.

The player, however, will also be totally random as far as stats, starting gear, etc. I have fleshed out the basic systems for enemies and items, and I think I have a really good system to generate the maps. I just have to start actually implementing them tongue

The next step for now is to give my little player a map to run around in. Hopefully will have something to show for that by tomorrow. Right now I need to eat, tho. Starving tongue

Last edited by Squiggly_P (2017-01-05 10:10:34)

Thumbs up +4 Thumbs down

Re: Game project - Rift Runners

Geez, dude. That's awesome!

Witness me!

Thumbs up Thumbs down

Re: Game project - Rift Runners

Rewrote basically the entire thing again because the way I was drawing was going to be far too slow. Windows does not like to be called upon to do things for you, so you basically have to get all of your information ready for Windows ahead of time and then hand it all over at once in one big-ass call.

That said, I will now be able to (hopefully) write a method to actually draw the entire map on the screen for every update without any lag.

Thumbs up Thumbs down

Re: Game project - Rift Runners

OK, I can generate a basic map layout for a level. It stores the player start / level exit info properly. Have to dress up the maps a bit still and then start making more specific rules for the generation and placing of structures and whatnot, but this seems to be generating the sort of maps I was hoping it would. Various sizes and really organic-looking (I didn't want lots of straight lines and walls, but more of a cavern-ish environment with a mix of open areas and narrow ones).

No matter what sort of map it generates, you will always be able to get from the start to the exit. It's built into the way it generates. I should have made the exit block different from the rest of the background, but I guess I can implement that along with adding the walls and collision. tongue

After collision and walls generation, I'll make a manager that can spawn and store 99 levels of map and give a shot to walking a character from level 1 all the way up through level 99 with just basic collision and no items or enemies or anything.

Here's a sample of what sort of maps it's generating as of right now (as well as where you'd start in these maps, since it moves the player to that position):
http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-02%2016-13-34-684_zps1anity8t.jpg

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-02%2016-13-32-770_zpsalrveeco.jpg

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-02%2016-13-33-674_zps5brmmzlc.jpg

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-02%2016-13-26-009_zpsjqgbgaqn.jpg

And more examples linked:

http://img.photobucket.com/albums/v611/ … rx6djw.jpg
http://img.photobucket.com/albums/v611/ … vdbhts.jpg
http://img.photobucket.com/albums/v611/ … sbp3xf.jpg
http://img.photobucket.com/albums/v611/ … f4pgnj.jpg
http://img.photobucket.com/albums/v611/ … v9xeer.jpg
http://img.photobucket.com/albums/v611/ … ux4oxq.jpg
http://img.photobucket.com/albums/v611/ … bxlx9n.jpg
http://img.photobucket.com/albums/v611/ … hyxtpk.jpg
http://img.photobucket.com/albums/v611/ … gs4cje.jpg
http://img.photobucket.com/albums/v611/ … io1c04.jpg
http://img.photobucket.com/albums/v611/ … v5xssm.jpg
http://img.photobucket.com/albums/v611/ … n7z7hu.jpg
http://img.photobucket.com/albums/v611/ … txzdsi.jpg
http://img.photobucket.com/albums/v611/ … tkvpca.jpg
http://img.photobucket.com/albums/v611/ … z2f4tx.jpg
http://img.photobucket.com/albums/v611/ … g4jlo7.jpg
http://img.photobucket.com/albums/v611/ … mv9blp.jpg

Thumbs up Thumbs down

Re: Game project - Rift Runners

What kinda character/monster art you doing?

Will you need a voice actor big_smile?

Witness me!

Thumbs up Thumbs down

Re: Game project - Rift Runners

@Writhyn: no voice acting. Probably have text-based stuff. What you see is what it will look like. I plan on leaving it in the console for now with ASCII graphics. Monsters and such will just be 'G' or 'b' or whatever. I do have a bunch of ideas for things, but I'm taking it one step at a time and trying to get specific things implemented to grow on what I've already got.

Update: Added walls and collision for them.

Next I shall add a map management system, a way to generate and store more levels, systems to go back and forth between levels, etc.

After that I will begin work on a line-of-sight system. and make my tiles a bit smarter by remembering if they've been seen. Might also work on setting up some more specific 'types' of tile so I can have more variety without getting bogged down trying to remember what ID is what tile type (will be useful later, for sure...)

Current shot:

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-02%2019-48-49-329_zps5hznkayh.jpg

Last edited by Squiggly_P (2016-10-03 01:08:55)

Thumbs up Thumbs down

Re: Game project - Rift Runners

Rewrote the tile object to introduce color and flesh out some of the various attributes I'll need to start in on the line-of-sight system. That system will probably be the next thing I work on. Once that's up and running, you'll be able to find your character easily (he's hard to spot ATM).

One thing I do also need to consider is adding a debug option so I can see what the enemies are up to when I start working on the AI, and possibly add some debug tile settings so I can color-code the line-of-sight of players / enemies / etc as well as later debug their behaviors for movement and pathfinding.

Current shots:

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-05%2012-40-11-728_zps0ic3tjbw.jpg
http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-05%2012-40-23-468_zps4kjwsaah.jpg

EDIT: Discovered a bug in the random generation that caused it to generate the same sequence of levels. Learned a bit about how the basic standard library 'random' generation works. Solved the problem for all intents and purposes by seeding based on the time you start the game (which is the common solution to this issue as a 'quick fix' from what I can see). I may make that a bit more random by seeding in a more complex way to ensure that two versions of the program launched at the same instant will never have the same levels. I don't think that level of randomness is really necessary, tho.

Last edited by Squiggly_P (2016-10-05 18:29:04)

Thumbs up Thumbs down

Re: Game project - Rift Runners

This is so fucking cool, dude.

Teague Chrystie

I have a tendency to fix your typos.

Thumbs up Thumbs down

Re: Game project - Rift Runners

It'd be cool if this could be embedded in a web page, simple as the ascii assets are. Dunno how that works.

Maybe a fun game for forum members  big_smile

Cool stuff, dude. Are you thinking swords? Or guns?
(just in terms of range of attack)

Last edited by Writhyn (2016-10-05 19:17:47)

Witness me!

Thumbs up Thumbs down

Re: Game project - Rift Runners

I'd like to implement both melee and ranged attack methods, but if I go with ranged, then I'll have to work up a tick-rate for the timing so that the projectiles can move (presumably) faster than the player, but still within the laws of the game world. That's probably going to happen eventually, but I can't really wrap my brain around how to implement it right now, so I'm gonna put it off until a later date. I know the first step is to determine how much time elapses between player turns and then checking to see if (and how often) anything else can update in that time. I'll work something out.

Line of sight and the ability to generate the entire 99 levels of the game are my next steps. Next build I post for will most likely have those elements added and you will be able to traverse from level 1 - level 99 and reach some end state. There will be no enemies or items or anything, but it will be a good place to start implementing those things, given that AI that can see you from the other side of the map will make it very difficult to play as the dozen monsters in a level would just swarm at you immediately.

Last edited by Squiggly_P (2016-10-05 19:48:16)

Thumbs up Thumbs down

Re: Game project - Rift Runners

UPDATE:

So I ran into my first major "wtf is happening right now!?" moment in the dev of this game, wherein I began to set up a simple Line Of Sight system (just to make the area immediately around the player visible), and somehow it has had a negative effect on the generation of the map (i dunno how...) and the collision system (again, I dunno how). I didn't make any alterations to either of those systems, so somewhere along the line I must be tampering with some data that I shouldn't be.

Oh, and it crashes if you go down too far (though I have a good guess as to why that would be tongue)

This has brought up an interesting thought for me, tho, in that I am not really building this in a C++ style or in a particularly C style, but instead in this weird-ass frankenstein monster of the two. It's too late for me to work much on this tonight, so I'm gonna have a beer and watch an episode of DS9 and worry about it tomorrow.

update screenshot for broken awesomeness:

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-05%2020-59-05-456_zpsvtc3lfhh.jpg

On the plus side, it would appear that the "is_visible" boolean seems to be working, as it's supposed to draw anything not visible, but previously seen, in grey, and anything within line-of-sight as it's normal color. I dunno why it is still showing the entire map, as it shouldn't be drawing anything that isn't flagged as either 'visible' or 'previously seen', but it appears to flag everything as having been previously seen, even though the default is for this to not be true.

I suspect that if this is happening, then I have borked up somewhere in the LOS testing and it's screwing up my entire map somehow.

EDIT: I think step one to solve this problem is to refactor all of my objects and make them a little more sane...

Last edited by Squiggly_P (2016-10-06 02:06:25)

Thumbs up Thumbs down

Re: Game project - Rift Runners

I did a bit of pen & paper work, and I think I've got a good plan for how to reorganize my code to make things much easier to implement. It will require rewriting several of the objects, but once it's done the groundwork will be well-laid for starting on the enemies and items and retaining easy access to do all of the coordinate comparisons and math I'll need for the AI, pathfinding and shuffling around of resources for the inventory systems and whatnot. It'll probably make the time-keeping mechanisms easier to make as well.

I'll see how far I can get on it tomorrow, but it's a significant chunk of code to rewrite, so I dunno if I'll make any forward progress beyond just rebuilding it back to where it is currently (though hopefully in a more functional state).

Thumbs up Thumbs down

Re: Game project - Rift Runners

Sounds like a good time investment.

Teague Chrystie

I have a tendency to fix your typos.

Thumbs up Thumbs down

Re: Game project - Rift Runners

Will the random dungeon exit generator ever cause the door to appear very near the player? A key-and-door system might be cool.

Edit: BTW, man, this is just plain awesome. It's really cool seeing something like this coming together! It's inspiring me to finish up the Hyacinth project so I can get started on programming too!

Last edited by Writhyn (2016-10-06 13:28:24)

Witness me!

Thumbs up Thumbs down

Re: Game project - Rift Runners

Right now there aren't any rules for the level gen except the dimensions of the map. I plan on having more rules, tho, to 'fail' certain levels and provoke a re-roll if it doesn't pass the tests. How close the start and end are is one of them.

I have to get it back up and running first, tho tongue
I'm just now beginning to rework the map object, but I'm honestly looking into a few things to see if there might be a more convenient way to deal with the way objects have to call each other, or at least how the objects can know what to do and who they need to throw their information at. I'll think I have a solution, but then some other object can't get access to something that it needs...

Thumbs up Thumbs down

Re: Game project - Rift Runners

So it's back up and running, although I've not gotten around to re-adding the player. This is essentially another complete rewrite of the code.

Current shot:

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-11%2014-15-25-014_zpso43fkr5h.jpg

As you can see, I've filled in all of the available space with tiles instead of leaving them blank. I can skip a step if I do this, and once I manage to finally get functional line-of-sight working, you'll never see all of that solid wall stuff. You'll only see the outlines. This also leaves me open to have destructible terrain if I choose to have some items that can explode and convert surrounding tiles to a walkable ground / rubble type. The old way would have required me to go in and re-check all of my boundaries again if that happened.

I don't have a player yet, but I do have room on the left for stats and inventory and equipment and room on the bottom for my event display.

I spent this time mostly rewriting my screen buffers and figuring out some really simple ways to work with them in the code that I have to type a lot. Hopefully I will get further with this attempt.

Also, I added stairs (the little upward pointing triangle thing...). It is technically 'useable', though I haven't got code that says what it does, nor do I have an actual player to use it. There is also a set of downward stairs, but I can only generate level 1 for now, so it never generates them. I have to add code to generate a new level above this one as well as code to move between levels.

I'm not certain how I want to approach the player in this attempt. I'm thinking about making a generic 'actor' class that can be both playable and non-playable characters and have them be very malleable. A wizard in a later level may be able to turn you into a chicken or a goblin or something, and it would fuck up your stats and (in the case of the hypothetical chicken) you'd drop all of your gear and shit. At the very least, it would be useful to learn how to do it that way, since that's basically the defacto way of doing things in a game lately.

Last edited by Squiggly_P (2016-10-11 19:32:37)

Thumbs up Thumbs down

Re: Game project - Rift Runners

Started working on an actor class and made a player. Thus far all it can do is sit there, longing to move but being unable to do so. It does make it interesting to generate maps now, tho, as I can see how the player's starting positions and the map's upward staircases relate to each other in the default generated maps with no rules governing how far apart they are. Having generated fifty or so, It would seem that the basic generation does a decent enough job of keeping them a fair distance from each other, while also often making lots of areas that are out-of-the-way and would require some exploration to see.

http://img.photobucket.com/albums/v611/Squiggly_P/bandicam%202016-10-11%2018-44-23-368_zpsobxhxzv5.jpg

I kinda like this, given that I want the player to occasionally have an opportunity to just skip past a level without exploring if they choose, but the trade-off might be giving up what could be a very useful item or shrine (which I plan on having pop up in levels on occasion to offer the player a dangerous choice that could be a benefit or a horrible mistake). I like the searching around bits. Also, enemies will be lootable and skipping them could cost you stuff as well, so exploration will be something that you should want to do as a player, but giving people an option to just breeze past a level makes for a very organic and interesting choice. I like it.

I have generated two maps where the start and exit were within just a few blocks of each other, and one map where I think the stairs leading up were actually in the exact same position as the player's starting point. I assume it was beneath the player's character. I couldn't see it, anyway...

So next up will be player movement and maybe a bit more sanity in the level gen to prevent catastrophic situations where the up and down stairs exist at the same point, which could theoretically cause a rip in the space-time continuum if one were to actually attempt to traverse both flights of stair at the same time...

Thumbs up 0 Thumbs down

Re: Game project - Rift Runners

Photobucket seems to be down for the moment, so all of my progress shots are down as well. Moving to Google's photo host...

https://lh3.googleusercontent.com/Ylj0MBqEjC17TmKReDcPwuVYk3SqblcP4OhJvmgUxF6QQVLynvL95hSfM57wmh-EteYWSAl5T5woAOB_klgdRzhRG6ZedynJgc_s-vP0zsz2yTSnSsBrM27efyC4vlXb0pwFaF_0Qyxj2GQkEnWxsumYLk6Jzn3fU8ZmqEn-9s8wPaxRjUAtX8aWtQTizXG3wX8ZPORJipsGN7B5VnafDzgCBE8sJYL-mQJMpJokCCRgRgRFj0NVechvF4RK1rX1YQFVamgZVDHwfgIuGJJSMXiS9apK3IsCZ-1h95u540TnuV1_pthmIM3kGUcn3XS_xRlgLjqIdR5RGyuOzOq9i2FZTTjB1HeNGLsTn0kmnaGH2caCOVVy7EtNpoi5jrLbp-Zalk-jUDocjtpomX4G_wV-qZwWv5f1jqwSYeYs6sWhHk8PF8WCOn4euG1lL0PaFieXUsuwstu0b5NipD8m6UtQa2HG1m-Bp9uFS0AsDbJDoSRRkUiRa-kGIm3N358xCwEXXXjHzazwrK5CEm3h7Y8F-1b0t5CYw-8vbmtv1JVfVptxFXjgW4pC2RcCz9sFnClJHuGxIgw8cCUXhX0wrOU3wOughABp70Ed14sfXBRw5mqR=w1024-h768-no

The target url for these images is like two paragraphs of text...

Anyway, added boulders to break up the landscape and get rid of those single-block walls that were all over the place in a lot of maps. Now they look nicer.

Still haven't added movement, cause I'm lazy, but that'll be in there soon. I've been reading up on AI and working on a little math library for all of the mathy bits involved in doing LOS, pathfinding, and general 2D shenanigans. I'm still not entirely sure how I'm going to enable the AI to observe things. I also am debating whether or not to treat the player object like any other actor subclass and lump it's update loop in with all the others. It makes sense and would make keeping time in the world a bit easier and more reliable, but it would also decouple the user-input from the actual actor. I'd have to pass messages to the actor(s) about what the input was and let them deal with their messages.

In some ways this is good, as I could give the player the ability to control any actor or transform into other sorts of creatures, or mind-control enemies and all that crap. The down-side is that I'd have to actually set up a message system and store them somewhere and then register the entities to various message boxes, which means a manager class that deals with registration, which means another layer between my world and its inhabitants.

But, I mean.... I do kinda want to build a system like that. I think it would be fun as shit to get something that complex running even just enough to move around. It would free me up to make some really complex AI as well, given that the same system could be used for inter-entity communication and observation of the world...

Thumbs up Thumbs down

Re: Game project - Rift Runners

player movement is in. Collisions work well. You can now 'activate' the stairs - up and down - to traverse new levels. I'm going to alter the generation system so that the up / down stairs lie over each other for every level. This will hopefully make the levels feel a bit more connected, and might give me some more things to try in the level gen.

EDIT: Added the origin for generation, so the matching stairs for each level will always be directly above each other. Now when you go up or down stairs, your character remains in the same spot on screen. Updated video.

EDIT 2:

So I'm thinking about items and monsters now, and one of the things I'm considering is doing a component-based entity system, which is sort of the standard way a lot of games make their entities now. It allows you to make a fuckton of different types of entities by essentially mixing and matching their components, and then you can define the entities in code by just adding whatever components are needed for that particular entity.

For instance, in a normal AAA 3D RPG game you might walk into a tavern and there's a couple of dudes. Those dudes are wearing different sets of armor, have different weapons and have some gold and some lockpicks in their inventories. The thing about these systems is that those guys, their bits of armor, the gold in their pockets and the weapons in their hands are all one basic entity. The components would give them different properties to make them a character or a weapon or a piece of gold. Basically, the only thing the entities in those games do is store pointers to the components it has. So, for example, an entity could have 'location' and 'moveable' components. When the game updates, it might get a request from some other entity to try to move that object, and the game would just check to see if it can move by looking to see if that object has a 'moveable' component. If so, then it hands the request to move over to that entity's 'moveable' component for processing.

It's a complex system to get up and running, and usually requires a messaging system in order to make it functional. It seems a bit overkill for a simple roguelike game, but I honestly kinda want to give it a shot. I might make a very simple stand-alone project that creates a few different combinations of simple components and then a simple message system to make it do some stuff. One of the reasons I want to make this thing is simply to push myself to code something as advanced as I can without having to deal with all the complex 3D bullshit or graphics or hardcore windows programming. I'm gonna look at my options here and see if there are some other alternatives to it. I've seen people suggest linked lists of enemies and things like that, but my brain is telling me that I could do some really awesome shit with a component system in terms of randomly generating stuff...

Last edited by Squiggly_P (2016-10-15 15:43:49)

Thumbs up Thumbs down

Re: Game project - Rift Runners

This continues to be a very cool project to watch as it unfolds.

Teague Chrystie

I have a tendency to fix your typos.

Thumbs up 0 Thumbs down

Re: Game project - Rift Runners

Added some simple lighting around the player. Line of sight between the enemies and player will probably work the same way, with maybe an additional check to see if there is anything between the player and enemy to prevent them from being seen. In that regard I may make the player able to see enemies 'through' things so they can attempt to avoid combat if they choose. Not sure.

The simple lighting adds a lot better sense of exploration and atmosphere to the game as it currently stands, tho.

I think I'll next be working on the entities - including possibly re-thinking the way the player is implemented and how best to deal with the entities and their interactions with the world and each other...

Thumbs up Thumbs down

Re: Game project - Rift Runners

Man, I gotta say that building an Entity Component System is one of the most interesting things I've ever done, and so satisfying to get the little bits of it working. Just building the basic framework for it right now, so not actually adding it to the game at the moment. Instead I'm building the base classes for the systems / components and the Entity class. Quite pleased with the results so far.

The one caveat of my current system is that I am limited to approx 4.2 billion total entities. I guess I can't just go completely hog wild with the amount of entities going on. I'll have to limit the number of enemies to something like two million per level if I also want to have a couple million items. Damned restrictions...

Thumbs up +2 Thumbs down

Re: Game project - Rift Runners

Are you writing this in, like, Notepad++? What's the programming/testing ecosystem for all this?

Teague Chrystie

I have a tendency to fix your typos.

Thumbs up Thumbs down

Re: Game project - Rift Runners

Coding in Notepad++ with my project folder structure(s) open in the little 'project' tab.

I'm building with Visual Studio's compiler - called "CL" - and I have a batch file called 'build' that runs the build. Later on, if it becomes necessary to stop building the entire project due to how long it takes, I plan on breaking the build up into a few chunks where code that relies on each other can be built separately, so I can just compile a couple of files and then use the previous .obj files to link. Like, if I don't change anything about the entities or the level but I instead am working on the UI or something, I can just run a "buildUI.bat" or something and it will compile the UI stuff and anything that includes it (the main game file, basically) and then skip compiling all of the other crap.

I'm building the ECS system as a library, and I have a simple math library that I've built already, and I have seperate project folders for those. The batch file for those projects will build them and then copy the resulting .lib and the necessary headers into a folder I have set up for .lib files to be included in the projects. I also have written a few little tools, and the build for those plops a copy of the executable into a 'tools' folder that is in my system PATH, so I can just use them from wherever on my command line. I also have a tool in there which I can use to setup a new project folder structure and a basic build.bat by just navigating to my projects folder and typing "newproject 'project name'" and it sets up the folders, the build.bat file and makes an empty main.cpp file.

I haven't set up Visual Studio for debugging yet, but I can always do that as well. Thus far I haven't really needed to debug anything.

Thumbs up Thumbs down

Re: Game project - Rift Runners

Results for this weekend have been mixed. I got a start on implementing a basic entity system into the game. It keeps track of all of the entities, but it keeps the player separate for now. The game seems to run OK for a minute and then crashes. Not sure what the issue is, so I'll have to do some investigating.

The culprit is most likely an attempt to access memory that hasn't been initialized, but I'm not sure where that could be, since it's only really dealing with the player and as far as I know I've got it set up to initialize everything as soon as it's created.

I'll have to go through and clean up the code. I'm guessing it has something to do with how the entities are being drawn, so I think I'll need to write a more robust system there and do more checking to make sure things are initialized before I attempt to access them. I limited checks in the code because - like I said - there shouldn't be anything being accessed that isn't already initialized, but clearly I'm wrong about that.

What's weird is that giving the draw code direct access to the entity internals stopped a previous crash from happening. I assume there's some glitch somewhere in one of my 'get' or 'set' methods somewhere that is doing something naughty.

Not sure if I'll have time to go through the code tonight, so it might take me a day or two to nail down the issue...

Thumbs up +1 Thumbs down