Cabal-Syndicate / randora_framework

Framework for the Randora Game Engine
Other
3 stars 1 forks source link

Install/run instructions in repo Readme #7

Open mattwollf opened 9 years ago

mattwollf commented 9 years ago

Readme should have some info on how to configure build and eventually install. Since D is a relatively new language this should also probably include a link to instructions on what packages one might need to install D in a linux environment, or a link to a windows installer.

Master-Foo commented 9 years ago

Hey man, great to see you here!

Could you help with this issue? It would be a good place for you to start, while you are learning D. I have a tutorial here

There is also a manual buried in the Randora-Framework here But it's not fleshed out yet.

I'm about a week out on writing some more comprehensive docs. But I have a lot on my plate because I need to nail down some things first.

I don't use windows, so if you install on windows could you write a tutorial for that?

Anyway, I'm not sure how much experience you have with D, so I'm going to assume it is none. Correct me if I'm wrong.

Before I can show you around the framework, let's get you started on a simple Hello World (in the first tutorial link I game you DMD section), Then, move on to the DUB section (D's package manager (We use it for the framework))

As you are working on that, correct any mistakes I might have made and try to fit it into the Randora-Manual (The second link I gave you). If you have any questions let me know.

Welcome to the team!

Master-Foo commented 9 years ago

Hey, I just wanted to check up on you and see how you are coming along.

I'm not pressuring you or anything. Work at a pace / time that is convenient for you. But, let me know if you have any problems or questions.

I admit that tutorial I sent you is kinda sloppy. So, I want to make sure you are understanding everything.

mattwollf commented 9 years ago

I've actually had a really busy weekend. I'll be on windows tonight and I'll take some steps to document installation on windows.

I already have the necessary tools installed on Arch but I keep getting forward reference build errors. I probably missed something reading over the ubuntu instructions.

Master-Foo commented 9 years ago

That's cool. I haven't used Windows in years, so having someone else on the other side of the fence is going to be a big help.

If you are using Arch, the Ubuntu instructions probably won't help. I don't know, maybe Apt works well on Arch, but you might need to just figure out the equivalent packages for pacman.

Send me a log of your "forward reference build errors" I may be able to help. Is this when you are building DMD with gcc? Or when you are building a D program with DMD?

mattwollf commented 9 years ago

This is output when executing dub. http://hastebin.com/fudupidola.avrasm

EDit: I get the same output on both Windows and Arch. I'm guessing I'm missing an install of something.

Master-Foo commented 9 years ago

Glancing at it, it looks like you are trying to build randora-framework, correct?

Don't worry about that just yet. I'm sure there are many things we need to do to get this running on machines other than my own (Which is all I've tested it on yet). We'll figure that out later.

Before then, I want to make sure you are comfortable with the basics. Meaning the D language and it's tools.

Have you successfully created a "Hello World" yet? If so, just putter around and try experimenting with the language. Get familiar with classes and such. Go to dlang.org and click on "D Reference" in the side bar and find some topics which interest you and play with them.

Once you have a basic understanding of the language, use DUB to download the dlang koans Which are exercises in learning aspects of D.

If you need help figuring out DUB, let me know. It's a lot easier to have someone help you than it is to figure it out yourself.

Once you are familiar with D and DMD and DUB, let me know and I'll help you with Randora-Framework. But let's make sure you have a strong foundation first.

BTW, I'm watching the video you uploaded on voat presently.

Master-Foo commented 9 years ago

Sorry, if I'm treating you like a newb. I'm not sure of your level yet.

If you think you are really ready to jump into the project let me know and we can focus on the log dump you submitted. I just want to make sure you are not getting over your head until you are ready for it.

mattwollf commented 9 years ago

that video is really good. :D judging from that video Walter certainly will steer the language in the right direction. I haven't used lazy evaluation outside of haskell but it definitely provides for powerful features. There's a C++ talk that Scott Meiers gave at another Dconf where he dumps on C++ inconsistencies and it's quite funny. I think it was called "what D doesn't need" or something like that. if you'd like another video.

And I am a complete noob at D. don't worry, there's no offense. and I am definitely in over my head haha, its how I force myself to learn.

Best guess is that the framework can't build (at least in part) because I haven't gotten SDL bindings for D. each forward reference error corresponds to a symbol/classname (terminology?) with SDL in it. and yes, I was trying to build the framework.

Master-Foo commented 9 years ago

BTW, when you are ready to move on to the framework, let's allocate an hour or two where we can both be available. Looking over your log dump, we might need some back and forth to figure this out.

Obviously, it works on my machine, so it will be hard for me to replicate. So, We'll have to experiment to figure out what is going on. I'll help you with this. But it should be at a time when we are both available, so we can do it quickly and not over days.

Master-Foo commented 9 years ago

I've seen the "What D doesn't need". Coming from a C background, I tend to agree.

Master-Foo commented 9 years ago

Yeah, you are going to need to download the SDL2 libs. On Debian systems, this is libsdl2-dev there are also other packages you'll need to install like libsdl2-image, libsdl2-mixer, etc.

If you are using apt you could just

sudo apt-get install libsdl2*

and that would likely solve the dependency problem. I'm not sure what the equivilant would be on Arch or Windows though. When you find out make sure to make a note of it for the benefit of future users.

mattwollf commented 9 years ago

I might get lucky, looks like there are precompiled binaries in the official repo https://www.archlinux.org/packages/extra/i686/sdl2/

Master-Foo commented 9 years ago

Try it out. But don't make it a priority until you have the basics down for D, DUB, etc... No sense in jumping ahead of ourselves.

Definitely do the DLang Koans though.

mattwollf commented 9 years ago

Don't worry, I won't be making commits until I have a firmer grasp on the language anyway.

As for jumping ahead, might as well start banging heads at cross-system building now, I can do that in parallel to learning D and its just another step I'll have to get used to.

Master-Foo commented 9 years ago

In theory there isn't anything which is platform specific in this. It should just work. We might have some problems with directory slashes "/" (Posix) VS "\" (Windows), but that's an easy fix that a newb could probably do.

It might be good practice.

Master-Foo commented 9 years ago

We'll make some issues platform problems when it actually becomes an issue and not just wild speculation.

mattwollf commented 9 years ago

In this case cross system... might be the wrong term, cross distro more. debian -> arch (really just apt -> pacman) or apt -> yum/rpm if someone on team runs a fedora type distro

Master-Foo commented 9 years ago

Eventually, We'll make an IDE for the framework and create a package which installs all dependencies automatically. But that's not something I'm too concerned about at this juncture.

mattwollf commented 9 years ago

sounds like a good priority to give an IDE. haha.

I definitely agree, no point to nail down explicit dependencies the project needs to build unless a dev wants to build on their own whatever distro for now.

Master-Foo commented 9 years ago

Oh, one more thing. After you have become comfortable with D, but before you get started with Randora-Framework, do as much as this tutorial as possible. It is written in C++, but it is good exercise to convert it to D.

This will give you some understanding of SDL2. Much of what was in this tutorial morphed into what is now Randora-Framework. Although, now they are almost nothing alike.

Master-Foo commented 9 years ago

Hey, I'm just checking up on you.

How are you progressing? I dumped a lot on you last night, but I just wanted to clarify that you don't have to do EVERYTHING I put on your plate, or even all at once.

Especially that SDL tutorial. just do a couple of lessons to make sure you have the hang of it. Do the rest if you are interested. But you'll probably learn better SDL in the framework itself.

Anyway, let me know where you are at and if you have any questions.

mattwollf commented 9 years ago

Hello!

It's been a bit.

I've been doing some C style problem solving with D doing project Euler problems and reading the "D for C programmers" and other pages.

I think I'm doing alright with D knowledge, I haven't done the SDL tutorial just given it a look over so far. That's next on the list once I feel a bit more comfortable with my understanding of D.

On Wed, Aug 19, 2015 at 1:11 AM, Master Foo notifications@github.com wrote:

Hey, I'm just checking up on you.

How are you progressing? I dumped a lot on you last night, but I just wanted to clarify that you don't have to do EVERYTHING I put on your plate, or even all at once.

Especially that SDL tutorial. just do a couple of lessons to make sure you have the hang of it. Do the rest if you are interested. But you'll probably learn better SDL in the framework itself.

Anyway, let me know where you are at and if you have any questions.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-132449130 .

Master-Foo commented 9 years ago

OK, let me know when you are ready for the next step.

Master-Foo commented 9 years ago

Hey, I just read your post in /v/programming. Thanks for submitting some D related content. It's always good to read more.

Anyway, if you are able to understand the content in that article, you are probably proficient enough to work on this project. If you are still interested that is. It's OK if you are not.

This project doesn't implement very many "archaic" aspects of D. There are some, but, let me worry about that.

Let me know if you want to be assigned something to do. Or, if you've lost interest, I'll stop bugging you about it.

Thanks!

mattwollf commented 9 years ago

Sure I'll take an assignment!

On Mon, Aug 31, 2015 at 7:15 PM, Master Foo notifications@github.com wrote:

Hey, I just read your post in /v/programming. Thanks for submitting some D related content. It's always good to read more.

Anyway, if you are able to understand the content in that article, you are probably proficient enough to work on this project. If you are still interested that is. It's OK if you are not.

This project doesn't implement very many "archaic" aspects of D. There are some, but, let me worry about that.

Let me know if you want to be assigned something to do. Or, if you've lost interest, I'll stop bugging you about it.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-136525157 .

Master-Foo commented 9 years ago

OK, cool.

I guess we can go a couple of routes here. I want to make sure you are getting assignments which are level specific and are interesting to you.

First of all, were you ever able to compile the Randora-Framework? Last I checked you were getting some compile errors. We can figure that out first.

Next, let's think about what you WANT to do, so you are interested. Maybe there is a specific aspect of the Framework you want to work on? Whatever your interest is, I'm sure there is a need for it. For instance, GUI, or Algorithms, or SDL, or whatever.

I can give you small tasks in that area until you build up a proficiency in it.

Or, I can assign you generic grunt work which I'm too busy to get into myself. Although, you might not like that so much.

Let me know what you WANT to do and I'll find stuff you'll probably enjoy working on.

mattwollf commented 9 years ago

I haven't gotten the project building yet. I still have the same "forward reference" errors all over, same as the paste above.

On Tue, Sep 1, 2015 at 12:49 AM, Master Foo notifications@github.com wrote:

OK, cool.

I guess we can go a couple of routes here. I want to make sure you are getting assignments which are level specific and are interesting to you.

First of all, were you ever able to compile the Randora-Framework? Last I checked you were getting some compile errors. We can figure that out first.

Next, let's think about what you WANT to do, so you are interested. Maybe there is a specific aspect of the Framework you want to work on? Whatever your interest is, I'm sure there is a need for it. For instance, GUI, or Algorithms, or SDL, or whatever.

I can give you small tasks in that area until you build up a proficiency in it.

Or, I can assign you generic grunt work which I'm too busy to get into myself. Although, you might not like that so much.

Let me know what you WANT to do and I'll find stuff you'll probably enjoy working on.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-136585326 .

Master-Foo commented 9 years ago

OK, do you have time now to figure it out? I'll try to work through it with you.

If not, let's find a time when we can both troubleshoot at the same time.

mattwollf commented 9 years ago

Not right now, It's late. I'm pretty busy this week but I should be free this weekend for a dedicated block.

I'll also poke around on my own for stuff and try to solve it in the fleeting spare time I have. otherwise sit down this weekend at some point?

On Tue, Sep 1, 2015 at 1:33 AM, Master Foo notifications@github.com wrote:

OK, do you have time now to figure it out? I'll try to work through it with you.

If not, let's find a time when we can both troubleshoot at the same time.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-136591042 .

Master-Foo commented 9 years ago

Yeah, I can do it during the weekend. However, I'm pretty sure we can figure this out pretty fast. Let's do that if we can't figure it out in the mean time.

We just need to figure out what is different between your machine and mine.

Here are some suspicions of mine...

  1. What version of DMD are you using? dmd --help I'm using 2.066.1
  2. Clone a new version of the repository git clone git@github.com:Cabal-Syndicate/randora_framework.git
  3. Upgrade the project dependencies dub upgrade
  4. Do a "Forced build" dub build --force
  5. Make sure SDL is installed.
mattwollf commented 9 years ago

dmd --help DMD64 D Compiler v2.068

I think its something to do with how pacman handles adding dev stuff vs how aptitude does it with their *-dev packages. I can install all the sdl2 libs but I can't find stuff specifically for "dev"

when I search for sdl2 using pacman I get:

pacman -Ss sdl2 extra/sdl2 2.0.3-1 [installed] A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2) extra/sdl2_gfx 1:1.0.1-1 [installed] SDL Graphic Primitives (Version 2) extra/sdl2_image 2.0.0-2 [installed] A simple library to load images of various formats as SDL surfaces (Version 2) extra/sdl2_mixer 2.0.0-3 [installed] A simple multi-channel audio mixer (Version 2) extra/sdl2_net 1:2.0.0-1 [installed] A small sample cross-platform networking library (Version 2) extra/sdl2_ttf 2.0.12-2 [installed] A library that allows you to use TrueType fonts in your SDL applications (Version 2) extra/smpeg2 1:2.0.0-1 [installed]

On Tue, Sep 1, 2015 at 1:57 AM, Master Foo notifications@github.com wrote:

Yeah, I can do it during the weekend. However, I'm pretty sure we can figure this out pretty fast. Let's do that if we can't figure it out in the mean time.

We just need to figure out what is different between your machine and mine.

Here are some suspicions of mine...

1.

What version of DMD are you using? dmd --help I'm using 2.066.1 2.

Clone a new version of the repository git clone git@github.com: Cabal-Syndicate/randora_framework.git 3.

Upgrade the project dependencies dub upgrade 4.

Do a "Forced build" dub build --force 5.

Make sure SDL is installed.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-136593855 .

mattwollf commented 9 years ago

Unless I am barking down the wrong tree and I need to compile SDL2 from source?

On Tue, Sep 1, 2015 at 2:09 AM, Matt Wolf mattwollf@gmail.com wrote:

dmd --help DMD64 D Compiler v2.068

I think its something to do with how pacman handles adding dev stuff vs how aptitude does it with their *-dev packages. I can install all the sdl2 libs but I can't find stuff specifically for "dev"

when I search for sdl2 using pacman I get:

pacman -Ss sdl2 extra/sdl2 2.0.3-1 [installed] A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2) extra/sdl2_gfx 1:1.0.1-1 [installed] SDL Graphic Primitives (Version 2) extra/sdl2_image 2.0.0-2 [installed] A simple library to load images of various formats as SDL surfaces (Version 2) extra/sdl2_mixer 2.0.0-3 [installed] A simple multi-channel audio mixer (Version 2) extra/sdl2_net 1:2.0.0-1 [installed] A small sample cross-platform networking library (Version 2) extra/sdl2_ttf 2.0.12-2 [installed] A library that allows you to use TrueType fonts in your SDL applications (Version 2) extra/smpeg2 1:2.0.0-1 [installed]

On Tue, Sep 1, 2015 at 1:57 AM, Master Foo notifications@github.com wrote:

Yeah, I can do it during the weekend. However, I'm pretty sure we can figure this out pretty fast. Let's do that if we can't figure it out in the mean time.

We just need to figure out what is different between your machine and mine.

Here are some suspicions of mine...

1.

What version of DMD are you using? dmd --help I'm using 2.066.1 2.

Clone a new version of the repository git clone git@github.com: Cabal-Syndicate/randora_framework.git 3.

Upgrade the project dependencies dub upgrade 4.

Do a "Forced build" dub build --force 5.

Make sure SDL is installed.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-136593855 .

Master-Foo commented 9 years ago

Try the shotgun approach and install everything SDL related. I don't work in Arch much, but my suspicion is that you are going to need to compile. It's kind of the Arch way, but isn't pacman supposed to build packages for you?

Also, There is nothing in the dump you provided that leads me to specifically suspect SDL. So, we may be barking up the wrong tree.

You might want to stop in to #D on IRC and ask for help. They are usually pretty helpful.

My biggest suspicion is that somehow your setup doesn't like templates for some reason. I'm working on a refactor now which gets rid of a lot of the templates the framework uses. It's not ready yet, but I'll give you a link to a newer version of the framework tomorrow. We'll try that and see if anything changes.

Master-Foo commented 9 years ago

I just uploaded my newest refactor. So, update your fork and try compiling again.

This refactor doesn't rely on templates as much as your current version. Reading that dump I suspect the "forward references" are referring to things in the templates. Spend 5 minutes and try it and tell me if it works. Or send me a new dump if it doesn't.

This refactor has also reduced the executable footprint by half and the compile time by half. The run-time cost is going to go up slightly, but I think it will be within acceptable margins once we get around to profiling the code and optimizing the most inefficient parts of the engine.

Master-Foo commented 9 years ago

FYI, I just now upgraded DMD to version 2.068.0

So, this should answer any questions we have about differences in compilers. I was able to compile my code base perfectly. So, the compiler itself isn't likely the problem...

mattwollf commented 9 years ago

success!

I get the black box and console output looks like X Y mouse coordinates.

On Wed, Sep 2, 2015 at 8:59 PM, Master Foo notifications@github.com wrote:

FYI, I just now upgraded DMD to version 2.068.0

So, this should answer any questions we have about differences in compilers. I was able to compile my code base perfectly. So, the compiler itself isn't likely the problem...

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-137287874 .

Master-Foo commented 9 years ago

Yeah, I had a nifty "demo" that demonstrates the graphics capabilities and input events. But the refactor requires that I also refactor the demo. Which I'm working on now.

Anyway, what you described is exactly what you are supposed to see. What your problem before was... I guess the world will never know.

Anyway, now that you have that working. I suppose it's time to get you started on something. Let me know if there is anything in particular that you are interested in working on. I'll make a game plan that sets you off in that direction.

If you can't decide, I'll can probably just assign you generic tasks. For instance, I built a skeleton for a Vector physics class. It's in /source/randora/math/vectors

If you are interested in vectors, there's probably a lot you can do there and it doesn't require immediate knowledge of the engine, so it might be a good place to start.

But, it's probably best for you to choose your own adventure. So, let me know what you want to do. Could be anything! Just ask.

mattwollf commented 9 years ago

I'll write up an installation guide for Arch linux now that I seem to be able to run the engine without any hiccups.

I'm not too familiar with vector math beyond the basics but I'm more than willing to read up on it.

I'll admit I didn't expect such heavy use of the "mixin" functionality though. Is that preferable to importing different classes?

Also, where is ScalarType defined?

Master-Foo commented 9 years ago

You don't HAVE to work on the vector class if you don't want to. I was just putting it out there for your consideration. But if you aren't familiar with vector math, this is probably a great opportunity to broaden your horizons. I'll coach you along and give you small pieces you can work with so you don't become overwhelmed.

Or tell me specifically what you would like to do. I'd rather you did that because I don't like bossing people around.

As for the mixins...

This is a framework, which means it's highly structured. Basically, all a mixin does is "Copy and Paste" code from one file into another. So everything that is "Pasted" into a class with a mixin shares the same scope. This would not be possible with a class. You'll get the hang of it quickly. It just seems strange because it's not a traditional convention.

The reason I'm using them so liberally is for many reasons.

  1. It encourages "Everything in it's place" This prevents "Spaghetti Code". When you are writing code for a property / method / event / whatever. The code you immediately see should only be concerned with what that property / method / event / whatever does. While programming for that whatever, you should not be concerned with a different whatever.
  2. We can do something like mixin Collideable; and that would immediately give an object collision detection in all it's glory. That's all we have to do. The point of a framework is to write as little code as possible to make something work.
  3. Eventually, when I get around to building the IDE, It will make it easier to build skeletons for events, properties, game characters, assets, etc...
  4. Breaking a class up into modules makes it easier to do surgical unittesting.
  5. As a rule, I dislike code which spans more than 1 screen of text.

ScalarType is defined in the vector class like this Class Vector(ScalarType){ it is an alias for whatever type was passed into the vector when defined (It is a template). So, Vector!(float) v = new Vector!(float)() would create a float vector and the ScalarType would be float. Alternatively, you could say, Vector!(double) v = new Vector!(double)() and the ScalarType would be double.

There's a learning curve to this project. I'll ease you in to it and give you small pieces you can finish at your skill level. But you have to be sure to as me lots of questions because I don't always know what you can handle. If you don't have the skill to do something, I'll put you on a path in which you can learn that skill.

Cool man, thanks for your help!

Master-Foo commented 9 years ago

FYI, if you don't want to work specifically on the vector class, and want to learn more about mixins, unit tests, etc... I can assign you some tasks which will broaden your horizons in those areas.

It's some "Wax on Wax off" bullshit, but you will definitely learn some valuable skills and it will familiarize you with the Framework and D in general.

That's just for your consideration. Let me know what you want to do.

mattwollf commented 9 years ago

Ah alright. Vector is really a template which builds itself around a ScalarType.

I noticed the same phrasing in std.traits to test whether the type was a builtin basic type.

I think you're right that starting with some unit testing/mixins would be better to ease in than jumping right into learning vector math on top of coding in a relatively foreign language. Give me some tasking relating to that for now and the vectors will come later.

On Thu, Sep 3, 2015 at 5:01 AM, Master Foo notifications@github.com wrote:

FYI, if you don't want to work specifically on the vector class, and want to learn more about mixins, unit tests, etc... I can assign you some tasks which will broaden your horizons in those areas.

It's some "Wax on Wax off" bullshit, but you will definitely learn some valuable skills and it will familiarize you with the Framework and D in general.

That's just for your consideration. Let me know what you want to do.

— Reply to this email directly or view it on GitHub https://github.com/Cabal-Syndicate/randora_framework/issues/7#issuecomment-137384211 .

Master-Foo commented 9 years ago

OK, I'll make some issues later today and assign them to you.