|
Post by ckraniak on Sept 5, 2015 11:37:01 GMT
I make no promises. GitHub RepositoryTools are Qt / C++ and nothing else at the moment. If you want to compile it yourself, you'll probably need to write a functional makefile (that's something Qt / qmake is doing for me), but that's not particularly hard to do. So MinGW and a makefile (that you'll have to make) should be all you need for now. Current goal is something playable, which does not strictly require actual graphics. I am leaving it relatively easy to replace the ASCII output with something better, so I'm not too locked into an ASCII-only program. 90% chance I quit in a week or two, which is why I'm githubbing the code. So other people can do stuff if I roll over and die. Also it's a great backup, so I don't end up like that other guy and lose it all in some cataclysm. It could use better comments, though. And I don't have internet at home, so I'll be on infrequently. It's worth noting that my code may not be easily parsable by a beginner programmer. Not that I'm the world's best, just I use a few "hard" concepts like function pointers. The dispatcher being semi-nondeterministic (maybe?) doesn't really help. But at least I don't have templates ... yet. Controls are numpad keys / numbers (numpad is easier to think about), and you have to enter it with "enter", and it will only look at the first character you type. You move the "P". Collision detecting with the wall ("W") works as expected. I'm not sure what that other guy was doing that made it so hard. I've built a pretty interesting dispatcher (for routing events) that's completely (100%) uncoupled from the rest of the code. This will probably be very, *very* useful when I have to map the whole keyboard across multiple states. Actually, it may even come in handy with the "Item" class and implementing arbitrary behaviors. We will see. Current plan is to implement enemies, hp, medkits, hunger, food, a better map (probably hand-written for now), and melee combat, then call it "0.1.alpha" or something. It will probably need a rudimentary turn tracker to get all that to work. If you want to try it: Download the .zip of the archive and extract it, then go to the build folder, debug, and use the .exe there. I don't think it needs anything other than a Windows machine to run. It doesn't show anything at first, so enter a number between 1 and 9 (except 5) and the screen should update with the new player position.
I've not played the game a whole lot. I just happened to get a coding itch while trawling this forum, so now my brain's stuck in a coding mode for a little while. Also, I'll be implementing the 0.9 standard game mode, as that's all I'm familiar with.
|
|
|
Post by ckraniak on Sept 10, 2015 1:21:49 GMT
So:
- My "Dispatcher" class is a rather badly coded example of an "Observer" - I'm actually not sure if I should use boost::signals2 or not for the observer; the syntax for it doesn't look any friendlier than the syntax for my Dispatcher - The dispatcher needs to be rewritten for RAII - I will probably remove the Actor and PlayerCharacter classes and just make everything an Item, where a PlayerCharacter just implements specific Behaviors
I've already learned a whole lot more about C++, and I've barely done anything. This is pretty cool.
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Jan 15, 2016 18:32:38 GMT
Is this a dream (pinches self) .......no i'm not dreaming......thank you......thank you........do you mind if i make like 80 copies of this repo please don't disappear so many have disappeared(i may sound crazy but i have been the only one on here forever now) anyhoo, welcome to the roguesurvivor fanforums...not many people anymore....none really but good luck and i will try to get on as much as i can to admire your work
Sorry for the insane ramblings.
P.S. Your username sounds familiar, are you from the CDDA forums.
|
|
|
Post by ckraniak on Jan 29, 2016 14:00:55 GMT
Well, I'm spotty. Can't plan on me sticking around. That's the point of the open source though, you shouldn't need me to. But realistically, you might.
I've done some other things I haven't posted ... mostly because they're not done enough to include. - Built a better core for the dispatcher, still need to finish the interface though - Built a piece that loads in OpenGL functions, because GLEW is for sissies - Working on a PNG loader; most of what's left is implementing INFLATE.
Do you have any idea how hard it is to write a CRC-32 that works?
Also, I am using OpenGL 3.2, mostly because that's what I want to learn about. That'll probably categorically exclude everyone running integrated Intel graphics.
There's also all the work I put into learning about Windows' messaging system.
Other: - Planning on switching to a component-entity design, not 100% on how that will look yet - The dispatcher can actually handle state management if I want it to - The game loop will be timer based, but the update() function will pause the game between unpausing user inputs
I'll keep doing this as long as I'm having this much fun.
I don't recognize the forum you're talking about, so probably not the same guy.
|
|
|
Post by ckraniak on Jan 29, 2016 15:42:31 GMT
Also yes you can copy it if you like.
Consider it GPL for now. I might do MIT or Creative Commons later, but until I decide how restrictive I want to be, I'm going with a more restrictive license.
|
|
|
Post by ckraniak on Feb 6, 2016 22:32:51 GMT
Done a good bunch of things. (Reminder: this is me having fun, so still don't plan on it going to any kind of "success".) Probably what people (mostly devs, I guess) will like the most is the switch to CMake, the addition of the -static switch to compilation, and the better file organization. Although normal people should like the -static switch, since it means the .exe shouldn't complain about missing .dlls anymore. By the way, direct link to current .exe: openrs_v0.9.0.2.exeIf you click on "raw", it should download. Currently, it's a white box. Whoopie. If you get anything else, let me know. It'd be weird if there's bugs in this simple stuff, but who knows? What I'll try to do today is get the component-entity-systems part working, to get back to the ASCII grid at least.
|
|
|
Post by ckraniak on Feb 7, 2016 6:51:30 GMT
Text is actually hard. The technical details of fonts are something you completely ignore ... until you have to program with them.
Anyway, I was able to increase the interesting-ness from white window to white window you can't resize, plus some text. I had to have a window to get messages using PeekMessage (at least, I'm pretty sure you have to have a window), which means I have to work on the WndProc crap, which is why it's not console ASCII like before. All so I can grab numpad events properly, instead of the stupid cin thing I did before.
The window reacts to pressing numpad keys now. So if you press "1", it'll display a big 1, pressing "7" displays 7, etc.
Next step is to tie this in to the CES subsystem so that the text can be controlled from outside of main.cpp.
Edit: you can move a 'P' around the screen now. 90% of the way back to 0.9.0.1's ASCII. Now I just need some collision detection. And also to get the other major systems running, but one step at a time.
Press escape to exit.
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Feb 8, 2016 14:22:10 GMT
It's great, I love the progress. keep on keepin on
|
|
|
Post by ckraniak on Feb 9, 2016 15:00:23 GMT
The Dispatcher class and its friends are done, just needs testing. I'll push it to Github probably this weekend.
Next thing is to finish off the CES part. I also want to work in some wall collision detection before next week. And walls, for that matter.
After walls comes non-player, non-terrain objects, like zombies and medkits. Getting collision detection working with zombies. Creating a combat system. Creating states. Creating an inventory and a UseItem system. Creating food. Creating weapons. Creating basic menus. Giving the zombies a basic AI. Call it alpha 1 then.
I want to get GL stuff working in alpha 2. Other things on the list are making a view range system, a world generator, and saving / loading games. Those might go in alpha 3, though.
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Feb 11, 2016 19:39:36 GMT
Do you plan on implementing anything more than the original RS? Ex: More skills, Zombies, Items, etc..
If not that's cool, just wandering if you do implement graphics than I could volunteer for art.
|
|
|
Post by ckraniak on Feb 12, 2016 5:43:19 GMT
I have ideas, but one thing at a time. First thing to do is get something that isn't total junk up and running. In the long run, I think making my own things would be fun. Presumably, an open-source game will find devs who will want to go beyond the original at some point, so even if I never did anything besides a faithful recreation, someone else is likely to take it further. Maybe you.
With the CES system, it ought to be pretty easy to drop something into the data folder. My idea (not mine, but whatever) is to have the majority of the game specified in data files: menus, units, items, custom maps, etc. There is no "MedKit" class as such, only an entity with an "itempng=/path/to/png/file", a "heals_damage=10", a "location_x=", a "location_y=", and the systems that care will realize a data file with these attributes can be treated like a medkit and treat it like a medkit. This theoretically means you can have a shelf / car / zombie / main_menu which is also interpreted as a medkit ... whatever floats your boat, mang.
I spent this evening cloning FreeRCT and trying to get it to build. I'm mostly there. Bluescreened in the process, recovered, need to run a backup soon before things die, although it's likely something to do with all this compiling. I was able to bluescreen a work computer by running a serial port enumeration program I wrote that had a bug in it; that was the program interacting with a Windows call in such a way that it made Windows freak.
I also pushed my work to OpenRS. The grid has been mildly adjusted, but nothing special. Most of the work has been building big chunks of the backend. I'm working on a more comprehensive ASCII rendering system, which can be a stopgap for the foreseeable future.
I've changed versioning to something more compliant with semantic versioning. So it's "0.9.0-prealpha-4" for now. I've been incrementing pretty readily, but might change my workflow to use branches. We will see.
If art is what you're into, I'll happily take it. Gives me more leeway to focus on the code. It'll be a while until I get to that point, though.
If you're interested in coding, one thing that needs to be done that I can let someone else do pretty easy (i.e. without getting into a deep design discussion about) is rebuilding the asciiDraw function in main.cpp so that it draws to a backbuffer and "swaps" with BitBlt(). It should stop the flashing that happens when the grid updates. Do you want to be involved in the coding?
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Feb 12, 2016 14:14:18 GMT
I'm still learning a lot about cpp i could make a simple helloworld.cpp and compile it in dev-c++ but anymore is jargon, I can't find a tutorial that doesn't assume i already know the basics of c++.
|
|
|
Post by ckraniak on Feb 13, 2016 7:18:58 GMT
|
|
|
Post by ckraniak on Feb 14, 2016 2:45:48 GMT
Ok. So I went ahead and did the double buffering. I've also learned how to use branches in Git, so I'm doing my work on the CES system in a special branch for it now. Most recent image: Got FreeRCT to build too. Set phasers for fun!
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Feb 22, 2016 18:43:15 GMT
It sounds like a lot of important stuff is going on there, keep on keepin on. P.S. Problem 1 of that practice is still throwing me for a "loop" P.S.S actually learning some lua now.
|
|