This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TorakTu's profile picture

CC / Lua Memory limits ?

Started by TorakTu, 02 May 2013 - 06:28 AM
TorakTu #1
Posted 02 May 2013 - 08:28 AM
Even though I used google and I searched the forums, I am not seeing the answer I'm trying to find. What I am curious about is what are the memory limits of Lua and CC ? If I write my program, and use a TON of tables, what are the limits in memory ? Or are there any ?

I was hoping to see some sort of LIMITS page for Lua / CC, but didn't see any.

Also, is there a way to find out how much ram my program is using ?

Are there Opt Codes or some other time / tick slice page ? Example, one function takes less CPU time then others.
Kingdaro #2
Posted 02 May 2013 - 08:34 AM
You shouldn't worry about memory when creating/using a CC program.

Or disk space for that matter; IIRC you have 2MB (~2048KB) per computer and the average program is only about 10KB, if that.
TorakTu #3
Posted 02 May 2013 - 08:38 AM
You shouldn't worry about memory when creating/using a CC program.

Or disk space for that matter; IIRC you have 2MB (~2048KB) per computer and the average program is only about 10KB, if that.

I am worried because I am working on a project that requires a lot of tables. It adds up. It's why I asked the question. So only 2 megs of ram per computer. OK, thanks for the reply.

Any ideas on CPU ticks ?
theoriginalbit #4
Posted 02 May 2013 - 08:44 AM
Ok so as Kingdaro stated you don't need to worry about CPU and Memory usage.

Users can modify the disk storage space size but the default is 2 MB, and most files are very small, there are the odd cases where they are bigger, but it is very rare!
And as for the CPU and Memory, you get access to whatever Minecraft gets access to, which is quite a lot.

In summary, I wouldn't worry about how much your program is using, just try to make it as efficient as possible, and leave it at that. :)/> Tables do use a little, but nothing to worry about, I can guarantee the data structures in Minecraft are using more RAM ;)/>
Edited on 02 May 2013 - 06:45 AM
TorakTu #5
Posted 02 May 2013 - 08:59 AM
Users can modify the disk storage space size but the default is 2 MB, and most files are very small, there are the odd cases where they are bigger, but it is very rare!

I see. I think my confusion is this.. "Modify the disk storage space size" – As in Floppy Disk space ? Cool, I'll look that up asap.

And I can use the memory and CPU of Minecraft.. That is what I was curious about. Ok thank you .. Perfect.

Thank you both for the replies.
theoriginalbit #6
Posted 02 May 2013 - 09:20 AM
I see. I think my confusion is this.. "Modify the disk storage space size" – As in Floppy Disk space ? Cool, I'll look that up asap.
Yes in the computercraft config you have the ability to modify the storage space allowed for floppy disks and the computers.


And I can use the memory and CPU of Minecraft.
Yes, but just because you have this much doesn't mean you should try to use it all, still try to be efficient as possible in the program.
TorakTu #7
Posted 02 May 2013 - 09:26 AM
Yes, but just because you have this much doesn't mean you should try to use it all, still try to be efficient as possible in the program.

Oh yes of course !!

You see, I am a 3D artist and I have also made a simple 3D first person server and client in JAVA. It works. So I was looking into what I can do in this nature with regards to CC.
Pharap #8
Posted 02 May 2013 - 12:42 PM
For making 3D in CC, you're either going to want to look into the rasterising process (the hard option) or use the OpenGL Peripheral (the easy option).

Also, if you are interested in memory and speed:
Lua tables are implemented as a mix of arrays and hash tables behind the scenes.
A Lua table will only use an array or has when one is needed, so if you have any tables using string and number indexes, that's an opportunity to try to cut down.
Arrays are also generally faster to index because they don't have to go through the process of hashing, so wherever you are using code that doesn't have to be viewed or maintained by others, stick to array indexes. This is particularly noteworthy if you're planning on making arrays of vertices to build meshes or faces.

It's not going to be a massive difference with small indexes of tables, but the more elements you add, the more you'll notice the difference.
I have experience with this as I'm trying to write an OS for the CC computers so I've had a bit of an experiment with how to speed up things as well as a nose around the luadocs. I have a fairly speedy graphics management system that I'm working on. I'm only handling 2D at the moment though, so I don't know any 3D rendering algorithms, only lua tricks.
TorakTu #9
Posted 02 May 2013 - 01:31 PM
For making 3D in CC, you're either going to want to look into the rasterising process (the hard option) or use the OpenGL Peripheral (the easy option).

The only problem with either one is that CC can't handle it. That is if you want to get into masking with textures that were made for it. CC wasn't made for PNG / BMP / bltBit type of graphics. Even OpenGL wont work on it. I could make a graphics version that uses each byte / character as part of the picture I suppose. Meaning, ASCII type of graphics. But with the limit of CC in the graphical aspect of it, it does make it difficult for a decent look. 3D is doable, if you like ASCII art. That is what I am finding out over the past couple hours. Funny, you don't know the limits of CC until you try to get into graphics.

One thing I noted however.. I can use a setTextScale of 0.5 in CC. I just can't do it in any of the emulators. Setting it to 0.5 does add to the screen resolution. So I might make a game with this idea in mind. I just wish the emulators would work with it. Would make my job easier. Better then to having to log into minecraft every time I want to work on this.

Spoke to a couple others on this forum and I see that games are needed. So I have a couple ideas I might try to work on. I have two multiplayer games in mind. I have already experimented with networking in CC. So I do have some experience there. So now I just need to work out the game ideas themselves. With graphics.. well.. best I can that is.
Pharap #10
Posted 02 May 2013 - 02:39 PM
For making 3D in CC, you're either going to want to look into the rasterising process (the hard option) or use the OpenGL Peripheral (the easy option).

The only problem with either one is that CC can't handle it. That is if you want to get into masking with textures that were made for it. CC wasn't made for PNG / BMP / bltBit type of graphics. Even OpenGL wont work on it. I could make a graphics version that uses each byte / character as part of the picture I suppose. Meaning, ASCII type of graphics. But with the limit of CC in the graphical aspect of it, it does make it difficult for a decent look. 3D is doable, if you like ASCII art. That is what I am finding out over the past couple hours. Funny, you don't know the limits of CC until you try to get into graphics.

One thing I noted however.. I can use a setTextScale of 0.5 in CC. I just can't do it in any of the emulators. Setting it to 0.5 does add to the screen resolution. So I might make a game with this idea in mind. I just wish the emulators would work with it. Would make my job easier. Better then to having to log into minecraft every time I want to work on this.

Spoke to a couple others on this forum and I see that games are needed. So I have a couple ideas I might try to work on. I have two multiplayer games in mind. I have already experimented with networking in CC. So I do have some experience there. So now I just need to work out the game ideas themselves. With graphics.. well.. best I can that is.

Well, computercraft is already a VM running inside a VM, and tbh trying to run a separate 3D graphics system inside of a game is a pretty demanding task. Bearing in mind for some people (like me) minecraft barely runs ok on a good day (I half blame Java, half the lack of optimisations in Minecraft).

OpenGL used to work once upon a time: http://www.computercraft.info/forums2/index.php?/topic/986-132-ccgpu-a-gpu-addon-for-computercraft/
Nobody's updated in a while though.
I'd give it a go, but Java isn't my language. I'm a C# person, with touches of C and C++.

There have been attempts at Raycasting engines and such: http://www.computercraft.info/forums2/index.php?/topic/10786-wolf3d-style-3d-engine-proof-of-concept/page__hl__graphics
But the people in charge won't make any official high power stuff because they want to keep servers balanced or something like that.
Again, I'd do it myself, but Java.

If you want proof that things are possible though, look at nitrogenfinger's channel: http://www.youtube.com/user/NitrogenFingers He's made some pretty decent stuff with what little is available.

Set text scale only works with monitors, but if you've seen how massive those things can get, you should know the sheer size of image you could manage. I haven't counted it but you could probably fit a few game sprites on there. I agree with the emulators, but again, I won't complain too much since someone actually bothered to make them. Again, if it weren't for Java, I'd be a lot more active and built my own emulator and stuff.

Games are always talked about and never done. Most people don't get the time or get distracted or go off course. Part of it is the lack of a decent IDE to keep people's interest, part of it is just people realising how hard it is. As a college student of gamedev and one of the only 2-3 programmers in my class (1 is webdev, but he can do a bit of regular stuff if coerced) I realise making a game is a tall order (I have quite a bit of experience with the XNA game engine and despite being a programmer for 1-2 years now, I have yet to finish anything half decent).

Making a game for a regular game engine is hard enough, let alone a quarter power engine running in an already lagging game. It's not impossible however, it's just lots of hard work and requires experience. I'm currently working on an OS for CC in what little time I get left over from college work. Once I've finished though, I may consider taking on some other matters. As a part of my OS, I've been developing some graphics management systems, and I have one that may just be suitable for fast graphics, but it's still in the preliminary tests. I tried it earlier today and using a mathematically based colour patterns and the sleep command, I managed to get it operating at a 30 fps full screen refresh rate. When I tried to handle input it slowed down, but in a real game it wouldn't be refreshing the whole screen, only the areas that need updating (which was actually the whole basis of the system).

I don't know if you're familiar with the windows forms API for the .Net languages, but in it, form controls only redraw when they need redrawing and only invalidated areas, which is different to what a game normally does. Normally a game has hardware access so it can full screen refresh every single time, but the lua system isn't fast enough to support that system, so I developed one centred around the forms library idea of only actually redrawing the areas that need redrawing. Again, still preliminary, but keep an eye on my OS and when my schedule is more free, it will be out there.
TorakTu #11
Posted 02 May 2013 - 03:32 PM
For making 3D in CC, you're either going to want to look into the rasterising process (the hard option) or use the OpenGL Peripheral (the easy option).

The only problem with either one is that CC can't handle it. That is if you want to get into masking with textures that were made for it. CC wasn't made for PNG / BMP / bltBit type of graphics. Even OpenGL wont work on it. I could make a graphics version that uses each byte / character as part of the picture I suppose. Meaning, ASCII type of graphics. But with the limit of CC in the graphical aspect of it, it does make it difficult for a decent look. 3D is doable, if you like ASCII art. That is what I am finding out over the past couple hours. Funny, you don't know the limits of CC until you try to get into graphics.

One thing I noted however.. I can use a setTextScale of 0.5 in CC. I just can't do it in any of the emulators. Setting it to 0.5 does add to the screen resolution. So I might make a game with this idea in mind. I just wish the emulators would work with it. Would make my job easier. Better then to having to log into minecraft every time I want to work on this.

Spoke to a couple others on this forum and I see that games are needed. So I have a couple ideas I might try to work on. I have two multiplayer games in mind. I have already experimented with networking in CC. So I do have some experience there. So now I just need to work out the game ideas themselves. With graphics.. well.. best I can that is.

Well, computercraft is already a VM running inside a VM, and tbh trying to run a separate 3D graphics system inside of a game is a pretty demanding task. Bearing in mind for some people (like me) minecraft barely runs ok on a good day (I half blame Java, half the lack of optimisations in Minecraft).

OpenGL used to work once upon a time: http://www.computerc...-computercraft/
Nobody's updated in a while though.
I'd give it a go, but Java isn't my language. I'm a C# person, with touches of C and C++.

There have been attempts at Raycasting engines and such: http://www.computerc...e__hl__graphics
But the people in charge won't make any official high power stuff because they want to keep servers balanced or something like that.
Again, I'd do it myself, but Java.

If you want proof that things are possible though, look at nitrogenfinger's channel: http://www.youtube.c...NitrogenFingers He's made some pretty decent stuff with what little is available.

Set text scale only works with monitors, but if you've seen how massive those things can get, you should know the sheer size of image you could manage. I haven't counted it but you could probably fit a few game sprites on there. I agree with the emulators, but again, I won't complain too much since someone actually bothered to make them. Again, if it weren't for Java, I'd be a lot more active and built my own emulator and stuff.

Games are always talked about and never done. Most people don't get the time or get distracted or go off course. Part of it is the lack of a decent IDE to keep people's interest, part of it is just people realising how hard it is. As a college student of gamedev and one of the only 2-3 programmers in my class (1 is webdev, but he can do a bit of regular stuff if coerced) I realise making a game is a tall order (I have quite a bit of experience with the XNA game engine and despite being a programmer for 1-2 years now, I have yet to finish anything half decent).

Making a game for a regular game engine is hard enough, let alone a quarter power engine running in an already lagging game. It's not impossible however, it's just lots of hard work and requires experience. I'm currently working on an OS for CC in what little time I get left over from college work. Once I've finished though, I may consider taking on some other matters. As a part of my OS, I've been developing some graphics management systems, and I have one that may just be suitable for fast graphics, but it's still in the preliminary tests. I tried it earlier today and using a mathematically based colour patterns and the sleep command, I managed to get it operating at a 30 fps full screen refresh rate. When I tried to handle input it slowed down, but in a real game it wouldn't be refreshing the whole screen, only the areas that need updating (which was actually the whole basis of the system).

I don't know if you're familiar with the windows forms API for the .Net languages, but in it, form controls only redraw when they need redrawing and only invalidated areas, which is different to what a game normally does. Normally a game has hardware access so it can full screen refresh every single time, but the lua system isn't fast enough to support that system, so I developed one centred around the forms library idea of only actually redrawing the areas that need redrawing. Again, still preliminary, but keep an eye on my OS and when my schedule is more free, it will be out there.

Yea I have actually built a client / server app in JAVA already. I used OpenGL ( LWJGL ) and I love that API. It was my first 3D app I ever did that worked over the network with multiplayer capabilities. The draw back is I used TCP and I prefer UDP.. but I was testing.. never did anything solid with it so the project just sits here on my desktop.

As for that first link with the graphics.. WOW.. now that IS IMPRESSIVE ! I wish I knew how they did that. I will have to look into it more.

As for the other two links, yes, I already experimented with simple graphical interfaces like those on my server. And I already played with multiplayer on my server with CC rednet. Its actually quit simple.. well.. compared to real networking.. hahaha

You have given me good ideas.. Thank you for this. I will definitely look into what is possible now that wasn't so obvious earlier.


EDIT UPDATE : I just found the thread on CCLights 2. And its currently being made for 1.5.1. I am soooo stoked man ! Thanks for opening my eyes to a whole different CC world. :D/>
Pharap #12
Posted 02 May 2013 - 04:24 PM
For making 3D in CC, you're either going to want to look into the rasterising process (the hard option) or use the OpenGL Peripheral (the easy option).

The only problem with either one is that CC can't handle it. That is if you want to get into masking with textures that were made for it. CC wasn't made for PNG / BMP / bltBit type of graphics. Even OpenGL wont work on it. I could make a graphics version that uses each byte / character as part of the picture I suppose. Meaning, ASCII type of graphics. But with the limit of CC in the graphical aspect of it, it does make it difficult for a decent look. 3D is doable, if you like ASCII art. That is what I am finding out over the past couple hours. Funny, you don't know the limits of CC until you try to get into graphics.

One thing I noted however.. I can use a setTextScale of 0.5 in CC. I just can't do it in any of the emulators. Setting it to 0.5 does add to the screen resolution. So I might make a game with this idea in mind. I just wish the emulators would work with it. Would make my job easier. Better then to having to log into minecraft every time I want to work on this.

Spoke to a couple others on this forum and I see that games are needed. So I have a couple ideas I might try to work on. I have two multiplayer games in mind. I have already experimented with networking in CC. So I do have some experience there. So now I just need to work out the game ideas themselves. With graphics.. well.. best I can that is.

Well, computercraft is already a VM running inside a VM, and tbh trying to run a separate 3D graphics system inside of a game is a pretty demanding task. Bearing in mind for some people (like me) minecraft barely runs ok on a good day (I half blame Java, half the lack of optimisations in Minecraft).

OpenGL used to work once upon a time: http://www.computerc...-computercraft/
Nobody's updated in a while though.
I'd give it a go, but Java isn't my language. I'm a C# person, with touches of C and C++.

There have been attempts at Raycasting engines and such: http://www.computerc...e__hl__graphics
But the people in charge won't make any official high power stuff because they want to keep servers balanced or something like that.
Again, I'd do it myself, but Java.

If you want proof that things are possible though, look at nitrogenfinger's channel: http://www.youtube.c...NitrogenFingers He's made some pretty decent stuff with what little is available.

Set text scale only works with monitors, but if you've seen how massive those things can get, you should know the sheer size of image you could manage. I haven't counted it but you could probably fit a few game sprites on there. I agree with the emulators, but again, I won't complain too much since someone actually bothered to make them. Again, if it weren't for Java, I'd be a lot more active and built my own emulator and stuff.

Games are always talked about and never done. Most people don't get the time or get distracted or go off course. Part of it is the lack of a decent IDE to keep people's interest, part of it is just people realising how hard it is. As a college student of gamedev and one of the only 2-3 programmers in my class (1 is webdev, but he can do a bit of regular stuff if coerced) I realise making a game is a tall order (I have quite a bit of experience with the XNA game engine and despite being a programmer for 1-2 years now, I have yet to finish anything half decent).

Making a game for a regular game engine is hard enough, let alone a quarter power engine running in an already lagging game. It's not impossible however, it's just lots of hard work and requires experience. I'm currently working on an OS for CC in what little time I get left over from college work. Once I've finished though, I may consider taking on some other matters. As a part of my OS, I've been developing some graphics management systems, and I have one that may just be suitable for fast graphics, but it's still in the preliminary tests. I tried it earlier today and using a mathematically based colour patterns and the sleep command, I managed to get it operating at a 30 fps full screen refresh rate. When I tried to handle input it slowed down, but in a real game it wouldn't be refreshing the whole screen, only the areas that need updating (which was actually the whole basis of the system).

I don't know if you're familiar with the windows forms API for the .Net languages, but in it, form controls only redraw when they need redrawing and only invalidated areas, which is different to what a game normally does. Normally a game has hardware access so it can full screen refresh every single time, but the lua system isn't fast enough to support that system, so I developed one centred around the forms library idea of only actually redrawing the areas that need redrawing. Again, still preliminary, but keep an eye on my OS and when my schedule is more free, it will be out there.

Yea I have actually built a client / server app in JAVA already. I used OpenGL ( LWJGL ) and I love that API. It was my first 3D app I ever did that worked over the network with multiplayer capabilities. The draw back is I used TCP and I prefer UDP.. but I was testing.. never did anything solid with it so the project just sits here on my desktop.

As for that first link with the graphics.. WOW.. now that IS IMPRESSIVE ! I wish I knew how they did that. I will have to look into it more.

As for the other two links, yes, I already experimented with simple graphical interfaces like those on my server. And I already played with multiplayer on my server with CC rednet. Its actually quit simple.. well.. compared to real networking.. hahaha

You have given me good ideas.. Thank you for this. I will definitely look into what is possible now that wasn't so obvious earlier.

I was thinking you meant rednet, not actual linkage. I must admit, internet connectivity is my major downfall, I've never really looked into it much and I'm useless with the different network protocols. I'd try more if I had a second computer I could use to test the receiving end. So far I've only managed to make something download from my dropbox files.

I would think it's either an interpreter, a compiler class (I assume those exist in Java like in .Net) or possibly a bit of both like how native lua is done. I'm assuming the system itself is actually just editing data in the texture class. Either that or it's cleverly drawing planes to look like they're on the screen. I would hope the later, it would be faster (unless using matrices I suppose).

Well, it cuts out all the protocol stuff. In theory it would be possible to make real networking that simple, but it would mean disregarding security and completely ignoring all those acronymed protocols.

Solving puzzles and realising the less obvious answers have always been two of my best skills. To be honest though, credit for inspiration has to go to my familiarity with the windows forms library (itself being a simplified version of the win32 library for C++). If you're willing to wait a week or so I can compile my system and add a few missing bits like line drawing and the function to load texture objects from the files paintutils generates (asking permission from NF first just to make sure those things are officially in the public domain). Once those are sorted and it's compiled my graphics facility will be able to draw (basic) textures, pixels (or texels as I call them, since they are actually closer to texels given what they do), rectangles, strings and lines. It's fast and buffered and nothing is drawn until you flush the buffer. I used to have a circle function lying around as well, but I've misplaced that for the time being. It's worth a wait if you don't want to have to go through the trial. If you want to have a go yourself though, by all means give it a go. After all my system isn't going anywhere any time soon.
TorakTu #13
Posted 02 May 2013 - 04:44 PM
Yea, as a programmer of many many years, I have learned a few things about programming in general…. Use what your comfortable with. Because with all the faster computers now days, it doesn't really matter the language as much as it used too.

I prefer PowerBasic and Assembly Language with some ANSI C. But meh… can't use that in minecraft so easily. So I started to learn JAVA. Glad I did. Best move I have made.

On the flip side though… the client / server I made was simple.. but it shown me what I am capable of. All those years of studying OpenGL had paid off.

Now I am here learning CC and I gotta say.. my passion for programming has returned. So now I am studying up to see what all my options are. However, as a friend pointed out to me.. make a non-OpenGL game with Lua first… Yea, I agree. Think I'll work on that and go from there.
Pharap #14
Posted 02 May 2013 - 05:19 PM
Yea, as a programmer of many many years, I have learned a few things about programming in general…. Use what your comfortable with. Because with all the faster computers now days, it doesn't really matter the language as much as it used too.

I prefer PowerBasic and Assembly Language with some ANSI C. But meh… can't use that in minecraft so easily. So I started to learn JAVA. Glad I did. Best move I have made.

On the flip side though… the client / server I made was simple.. but it shown me what I am capable of. All those years of studying OpenGL had paid off.

Now I am here learning CC and I gotta say.. my passion for programming has returned. So now I am studying up to see what all my options are. However, as a friend pointed out to me.. make a non-OpenGL game with Lua first… Yea, I agree. Think I'll work on that and go from there.

I can vouch for that, even some of my bytecode languages run surprisingly fast. (Which reminds me, I need to fix that chip 8 emulator).

I'd like to learn more assembly, but whenever I try assembling stuff, even sample code, my assemblers keep throwing daft errors like 'unable to open object file' and other things. I've dabbled a bit in C recently, but I decided I'd rather try and figure out how to use some useful C++ libs like the win32 api and some directx stuff. Still struggling with dlls, they're much easier in C#.
I would rather Minecraft had been written in C++, I get the feeling I'd just about get on better, even with all the all over the place includes and such. Dunno why but me and Java have never got on well. I'd probably do better learning Java bytecode than Java itself.

Never used OpenGL. I will someday, but not for a while. Still got other more pressing matters.

It's easier to start with. I made a game, but it wasn't anything that demanded fast processing, it was pretty much a port of voltorb flip from the pokemon heartgold/soulsilver games. The mechanics were nice and easy, and it was a decent minigame in its own right.
TorakTu #15
Posted 02 May 2013 - 07:23 PM
Yea, as a programmer of many many years, I have learned a few things about programming in general…. Use what your comfortable with. Because with all the faster computers now days, it doesn't really matter the language as much as it used too.

I prefer PowerBasic and Assembly Language with some ANSI C. But meh… can't use that in minecraft so easily. So I started to learn JAVA. Glad I did. Best move I have made.

On the flip side though… the client / server I made was simple.. but it shown me what I am capable of. All those years of studying OpenGL had paid off.

Now I am here learning CC and I gotta say.. my passion for programming has returned. So now I am studying up to see what all my options are. However, as a friend pointed out to me.. make a non-OpenGL game with Lua first… Yea, I agree. Think I'll work on that and go from there.

I can vouch for that, even some of my bytecode languages run surprisingly fast. (Which reminds me, I need to fix that chip 8 emulator).

I'd like to learn more assembly, but whenever I try assembling stuff, even sample code, my assemblers keep throwing daft errors like 'unable to open object file' and other things. I've dabbled a bit in C recently, but I decided I'd rather try and figure out how to use some useful C++ libs like the win32 api and some directx stuff. Still struggling with dlls, they're much easier in C#.
I would rather Minecraft had been written in C++, I get the feeling I'd just about get on better, even with all the all over the place includes and such. Dunno why but me and Java have never got on well. I'd probably do better learning Java bytecode than Java itself.

Never used OpenGL. I will someday, but not for a while. Still got other more pressing matters.

It's easier to start with. I made a game, but it wasn't anything that demanded fast processing, it was pretty much a port of voltorb flip from the pokemon heartgold/soulsilver games. The mechanics were nice and easy, and it was a decent minigame in its own right.

The nice part is C ad ASM can interface with the OpenGL API as well as other forms of hardware. In fact I have a working Bootable 32-Bit OS already that I worked hard on with ASM and C languages. The problem I had for the most part is I am on a x64Bit windows 7. Normally, not a problem. Win7 is awesome.. with the exception of making an OS. The GCC compiler and linkers wouldn't compile under x64Bit. Heck, MS doesn't want people making another OS as compitition .. hahaha
Pharap #16
Posted 04 May 2013 - 08:39 AM
I can vouch for that, even some of my bytecode languages run surprisingly fast. (Which reminds me, I need to fix that chip 8 emulator).

I'd like to learn more assembly, but whenever I try assembling stuff, even sample code, my assemblers keep throwing daft errors like 'unable to open object file' and other things. I've dabbled a bit in C recently, but I decided I'd rather try and figure out how to use some useful C++ libs like the win32 api and some directx stuff. Still struggling with dlls, they're much easier in C#.
I would rather Minecraft had been written in C++, I get the feeling I'd just about get on better, even with all the all over the place includes and such. Dunno why but me and Java have never got on well. I'd probably do better learning Java bytecode than Java itself.

Never used OpenGL. I will someday, but not for a while. Still got other more pressing matters.

It's easier to start with. I made a game, but it wasn't anything that demanded fast processing, it was pretty much a port of voltorb flip from the pokemon heartgold/soulsilver games. The mechanics were nice and easy, and it was a decent minigame in its own right.

The nice part is C ad ASM can interface with the OpenGL API as well as other forms of hardware. In fact I have a working Bootable 32-Bit OS already that I worked hard on with ASM and C languages. The problem I had for the most part is I am on a x64Bit windows 7. Normally, not a problem. Win7 is awesome.. with the exception of making an OS. The GCC compiler and linkers wouldn't compile under x64Bit. Heck, MS doesn't want people making another OS as compitition .. hahaha

I know it's possible to use C and ASM in VS for the C++ side of things, but I couldn't tell you if there was an OpenGL API or not without looking for one. I am without doubt that there would be a directX one though. I tend to use CodeBlocks for C++ though. I haven't done much C or ASM, mainly because I can't find any good ASM tutorials, I can't get ML64 to assemble anything properly and I've never really needed to use C for anything since most things I do can be done more easily in C#.

I have 64bit Win7, but CodeBlocks uses the GCC compiler and that compiles C and C++ fine. It also has templates for Win32 projects, Dlls and Kernal Mode drivers, so I recommend giving that a go if you're struggling to get other things to do it. So far I've never really had any major problems with windows.
I had one problem once, but it was a known issue and with minimal digging I found the fix.
Only other issue I've had is with windows movie editor not working, but I probably broke that one of the times when I was digging around in the registry and frankly I cba to try and fix it since I hardly ever use it anyway.
TorakTu #17
Posted 04 May 2013 - 10:19 AM
I can vouch for that, even some of my bytecode languages run surprisingly fast. (Which reminds me, I need to fix that chip 8 emulator).

I'd like to learn more assembly, but whenever I try assembling stuff, even sample code, my assemblers keep throwing daft errors like 'unable to open object file' and other things. I've dabbled a bit in C recently, but I decided I'd rather try and figure out how to use some useful C++ libs like the win32 api and some directx stuff. Still struggling with dlls, they're much easier in C#.
I would rather Minecraft had been written in C++, I get the feeling I'd just about get on better, even with all the all over the place includes and such. Dunno why but me and Java have never got on well. I'd probably do better learning Java bytecode than Java itself.

Never used OpenGL. I will someday, but not for a while. Still got other more pressing matters.

It's easier to start with. I made a game, but it wasn't anything that demanded fast processing, it was pretty much a port of voltorb flip from the pokemon heartgold/soulsilver games. The mechanics were nice and easy, and it was a decent minigame in its own right.

The nice part is C ad ASM can interface with the OpenGL API as well as other forms of hardware. In fact I have a working Bootable 32-Bit OS already that I worked hard on with ASM and C languages. The problem I had for the most part is I am on a x64Bit windows 7. Normally, not a problem. Win7 is awesome.. with the exception of making an OS. The GCC compiler and linkers wouldn't compile under x64Bit. Heck, MS doesn't want people making another OS as compitition .. hahaha

I know it's possible to use C and ASM in VS for the C++ side of things, but I couldn't tell you if there was an OpenGL API or not without looking for one. I am without doubt that there would be a directX one though. I tend to use CodeBlocks for C++ though. I haven't done much C or ASM, mainly because I can't find any good ASM tutorials, I can't get ML64 to assemble anything properly and I've never really needed to use C for anything since most things I do can be done more easily in C#.

I have 64bit Win7, but CodeBlocks uses the GCC compiler and that compiles C and C++ fine. It also has templates for Win32 projects, Dlls and Kernal Mode drivers, so I recommend giving that a go if you're struggling to get other things to do it. So far I've never really had any major problems with windows.
I had one problem once, but it was a known issue and with minimal digging I found the fix.
Only other issue I've had is with windows movie editor not working, but I probably broke that one of the times when I was digging around in the registry and frankly I cba to try and fix it since I hardly ever use it anyway.

Correct that CodeBlocks is a wonderful IDE. However its useless when it comes to OS creation, which is what I was refering too in my previous comments. It's not the C::B IDE at fault here. Its MinGW that can't compile / link very well when it comes to that. I use C and C++ in C::B. C++ I do not like in my OS creations. But for regular OpenGL game programming C++ in C::B for windows is awesome.

Assembly is easy once you understand what registers are. The hard part people have is math. If you are good at math, then you will be excelent at Assembly. The only other issue people have a hard time with when it comes to ASM is segments and offsets … in reference to pointers and memory. But if you can grasp that concept.. Assembly is so easy to learn at that point.
Pharap #18
Posted 04 May 2013 - 12:36 PM
The nice part is C ad ASM can interface with the OpenGL API as well as other forms of hardware. In fact I have a working Bootable 32-Bit OS already that I worked hard on with ASM and C languages. The problem I had for the most part is I am on a x64Bit windows 7. Normally, not a problem. Win7 is awesome.. with the exception of making an OS. The GCC compiler and linkers wouldn't compile under x64Bit. Heck, MS doesn't want people making another OS as compitition .. hahaha

I know it's possible to use C and ASM in VS for the C++ side of things, but I couldn't tell you if there was an OpenGL API or not without looking for one. I am without doubt that there would be a directX one though. I tend to use CodeBlocks for C++ though. I haven't done much C or ASM, mainly because I can't find any good ASM tutorials, I can't get ML64 to assemble anything properly and I've never really needed to use C for anything since most things I do can be done more easily in C#.

I have 64bit Win7, but CodeBlocks uses the GCC compiler and that compiles C and C++ fine. It also has templates for Win32 projects, Dlls and Kernal Mode drivers, so I recommend giving that a go if you're struggling to get other things to do it. So far I've never really had any major problems with windows.
I had one problem once, but it was a known issue and with minimal digging I found the fix.
Only other issue I've had is with windows movie editor not working, but I probably broke that one of the times when I was digging around in the registry and frankly I cba to try and fix it since I hardly ever use it anyway.

Correct that CodeBlocks is a wonderful IDE. However its useless when it comes to OS creation, which is what I was refering too in my previous comments. It's not the C::B IDE at fault here. Its MinGW that can't compile / link very well when it comes to that. I use C and C++ in C::B. C++ I do not like in my OS creations. But for regular OpenGL game programming C++ in C::B for windows is awesome.

Assembly is easy once you understand what registers are. The hard part people have is math. If you are good at math, then you will be excelent at Assembly. The only other issue people have a hard time with when it comes to ASM is segments and offsets … in reference to pointers and memory. But if you can grasp that concept.. Assembly is so easy to learn at that point.

There are probably settings that can fix that, but I don't play around with settings much since I rarely get time to try anything extravagant.
I know about registers and stuff, I've made my own bytecode language before (and a chip8 emulator). The hard parts I find are just finding an assembler that actually works and finding decent tutorials. I've found a few tutorials before, but few ever actually bother to list the registers' purposes and I can never get ml64 to assemble the stuff.
I'm ok at maths, but I could've been better. I know binary operations fairly well as well.
Pointers aren't too hard to work with in the C/C++ sense. C# has pointers too, which I sometimes use, mostly for performance enhancement.
TorakTu #19
Posted 04 May 2013 - 01:34 PM
The nice part is C ad ASM can interface with the OpenGL API as well as other forms of hardware. In fact I have a working Bootable 32-Bit OS already that I worked hard on with ASM and C languages. The problem I had for the most part is I am on a x64Bit windows 7. Normally, not a problem. Win7 is awesome.. with the exception of making an OS. The GCC compiler and linkers wouldn't compile under x64Bit. Heck, MS doesn't want people making another OS as compitition .. hahaha

I know it's possible to use C and ASM in VS for the C++ side of things, but I couldn't tell you if there was an OpenGL API or not without looking for one. I am without doubt that there would be a directX one though. I tend to use CodeBlocks for C++ though. I haven't done much C or ASM, mainly because I can't find any good ASM tutorials, I can't get ML64 to assemble anything properly and I've never really needed to use C for anything since most things I do can be done more easily in C#.

I have 64bit Win7, but CodeBlocks uses the GCC compiler and that compiles C and C++ fine. It also has templates for Win32 projects, Dlls and Kernal Mode drivers, so I recommend giving that a go if you're struggling to get other things to do it. So far I've never really had any major problems with windows.
I had one problem once, but it was a known issue and with minimal digging I found the fix.
Only other issue I've had is with windows movie editor not working, but I probably broke that one of the times when I was digging around in the registry and frankly I cba to try and fix it since I hardly ever use it anyway.

Correct that CodeBlocks is a wonderful IDE. However its useless when it comes to OS creation, which is what I was refering too in my previous comments. It's not the C::B IDE at fault here. Its MinGW that can't compile / link very well when it comes to that. I use C and C++ in C::B. C++ I do not like in my OS creations. But for regular OpenGL game programming C++ in C::B for windows is awesome.

Assembly is easy once you understand what registers are. The hard part people have is math. If you are good at math, then you will be excelent at Assembly. The only other issue people have a hard time with when it comes to ASM is segments and offsets … in reference to pointers and memory. But if you can grasp that concept.. Assembly is so easy to learn at that point.

There are probably settings that can fix that, but I don't play around with settings much since I rarely get time to try anything extravagant.
I know about registers and stuff, I've made my own bytecode language before (and a chip8 emulator). The hard parts I find are just finding an assembler that actually works and finding decent tutorials. I've found a few tutorials before, but few ever actually bother to list the registers' purposes and I can never get ml64 to assemble the stuff.
I'm ok at maths, but I could've been better. I know binary operations fairly well as well.
Pointers aren't too hard to work with in the C/C++ sense. C# has pointers too, which I sometimes use, mostly for performance enhancement.

Buy a couple books. Art of Assembly language and Rolf Browns Interrupt list. Those two can get you going in info you need to make anything in assembly. Another book I recommend is C - A reference Manual. All three of these books helped me secure my OS creation. As for MinGW, no its been stated over and over on several sites that it doesn't work under a 64 Bit environment to create a workable Bin file that can be used as a kernel in an OS. It has to do with the COFF reference that MinGW defaults too. It won't come out of PE mode. I would have to created and compile my own Cross compiler if I was to use MinGW.. too much work. You have to have 32 Bit windows or some other OS to be able to compile a C bin file for the creation of an OS. I use my Virtual Box that has windows XP ( 32 - Bit ) and I just work on my OS in that. So far so good. At least it boots up with my own bootstrap and loads a 32-Bit kernel now. The kernel is completely written in C. Only the bootstrap is written in assembly.