QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

LUA vs. C++

This is a discussion on LUA vs. C++ within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; The lowdown is that I am very new. When I say very I actually mean very very. Whats the best ...

Reply
 
LinkBack Thread Tools
Old 03-11-2006, 04:51 PM   #1
 
jack_561's Avatar
 
Join Date: Jan 2006
Location: Peterlee, N-E UK
Posts: 399
Trader Feedback: 0
Default LUA vs. C++

The lowdown is that I am very new. When I say very I actually mean very very. Whats the best way to get started LUA or C++. From what ive seen LUA is easier for noobs but C++ is way more advanced and powerful. So basically I would appreciate it if I could have your views on it as I hope it will help more people than myself.
jack_561 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 04:54 PM   #2
 
Join Date: Mar 2006
Posts: 33
Trader Feedback: 0
Default

Quote:
Originally Posted by jack_561
The lowdown is that I am very new. When I say very I actually mean very very. Whats the best way to get started LUA or C++. From what ive seen LUA is easier for noobs but C++ is way more advanced and powerful. So basically I would appreciate it if I could have your views on it as I hope it will help more people than myself.
While I have no knowledge of LUA, other than that it's an interpreted scripting language and not very close to the hardware, if you have little to no experience programming, I'd suggest starting with LUA. Alternatively, you could start with C if you want to learn on a more... widespread and accepted language.
Andorien is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 04:55 PM   #3
Kos
 
Join Date: Aug 2005
Location: Cornwall/England
Posts: 2,452
Trader Feedback: 0
Default

lua most deinitely altho lua is still hard to learn so ud be best not to start on anyting too hard.

theres soem great tutorials by both whitehawk and pspmilliomaire whihc you can find easily in the homebrew or dev setion of these forums i think. gd luck

p.s. i apologise for my spelling, i got bored and cracked open the vodka. lol...
__________________
[quote=Urza the Tyrant][B][COLOR=Purple]
Its hard to convince people of your opinion when you type like a moron.[/COLOR][/B][/quote]
Kos is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 04:59 PM   #4

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default

lol, if i wern't about to go i'd make a beautiful "posting while intoxicated" sig for u....AWW WELL see yaz

btw. go for lua if your not 100 percent ready to engulf urself in hard arse coding
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 05:03 PM   #5
 
Join Date: Mar 2006
Posts: 33
Trader Feedback: 0
Default

I think we have a verdict. Use LUA to learn your basic programming concepts. When you're ready to take the next step, move on to C or C++.
Andorien is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 05:37 PM   #6
 
jack_561's Avatar
 
Join Date: Jan 2006
Location: Peterlee, N-E UK
Posts: 399
Trader Feedback: 0
Default

Thanks for the help people. I think ill start with LUA.
jack_561 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 09:18 PM   #7
 
Join Date: Sep 2005
Location: meh
Posts: 2,799
Trader Feedback: 0
Default

start with c++.
trust me, youll appreciate the decision few months down the line...
it might be difficult right now, but once you get the hang of it, you can make the psp dance..ok maybe not, but you get my point
cyanide is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-11-2006, 09:56 PM   #8

SHOOP DA WHOOP
 
mannymix03's Avatar
 
Join Date: Aug 2005
Location: Wii forums
Posts: 7,404
Trader Feedback: 0
Default

C++ is really hard to learn but i think in the longrun it is worth it...(c++ is more accepted and can be used in more situations)

but as your just starting out try learning lua first
__________________
Required ReadingPiracy Policy |Positive Posting

mannymix03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 03:47 AM   #9
 
jack_561's Avatar
 
Join Date: Jan 2006
Location: Peterlee, N-E UK
Posts: 399
Trader Feedback: 0
Default

Quote:
Originally Posted by cyanide
start with c++.
trust me, youll appreciate the decision few months down the line...
it might be difficult right now, but once you get the hang of it, you can make the psp dance..ok maybe not, but you get my point
Ok, C++ it is then.

Quote:
Originally Posted by mannymix03
C++ is really hard to learn but i think in the longrun it is worth it...(c++ is more accepted and can be used in more situations)

but as your just starting out try learning lua first
Now im not sure.

Ok well how about I start with C++ and if I find it way too hard then I will just move down to LUA?
jack_561 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 05:31 AM   #10

AKA Homer
 
Moonchild's Avatar
 
Join Date: Jan 2006
Location: Sweden
Posts: 1,779
Trader Feedback: 0
Default

I'd say go for C. It's quite simple and when you know it it's simple to just move to C++.
__________________


Click Here if you want a Winamp Currently Playing Userbar like the one above.
Moonchild is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 05:33 AM   #11
 
Join Date: Mar 2006
Posts: 33
Trader Feedback: 0
Default

Quote:
Originally Posted by jack_561
Ok, C++ it is then.


Now im not sure.

Ok well how about I start with C++ and if I find it way too hard then I will just move down to LUA?
If you're unsure between the two of them, start with C. You'll be able to do more than you could with LUA, but you don't have to worry about a lot of the complicated aspects of C++. Also, once you've gotten the hang of C, it's very natural to step up to C++.
Andorien is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 05:36 AM   #12

OMFG
 
Slasher's Avatar
 
Join Date: Jul 2005
Location: Toronto
Posts: 2,816
Trader Feedback: 0
Default

Quote:
Originally Posted by jack_561
Ok, C++ it is then.


Now im not sure.

Ok well how about I start with C++ and if I find it way too hard then I will just move down to LUA?
Have you ever coded before...ever? If not, I strongly suggest starting out with Lua and then working your way into C. I sort of took that route and its a good feeling seeing some of the similaritys between the two languages, and then in the end when you work your way into C its really not all that hard after learning all the things you learn in Lua. So basically if you have no coding experience, go Lua, if you have a good grasp of coding go C/C++.
Slasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 06:40 AM   #13
 
Join Date: Sep 2005
Location: meh
Posts: 2,799
Trader Feedback: 0
Default

its always better to jump in the deeper end of the pool when you dont know swimming
cyanide is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 07:08 AM   #14

Developer
 
AnonymousTipster's Avatar
 
Join Date: Jun 2005
Location: Under a Large rock called Fred
Posts: 693
Trader Feedback: 0
Default

Ok, here's what I think:
If you think you might want to progress seriously into programming, learn C/C++. If you'd just like to make a few simple games, learn LUA.
Thing is, most people starting programming don't find that the language is the problem, it's the logic. E.g collision detection - it's basically the same in both languages, only the sytax is a little different. So if you're learning C, you'll probably encounter only a few more problems than in LUA.

Pros of both:
LUA:
Slightly faster to learn
Simple syntax (no messing with pointers and dereferences)
Image loading code pre-created
Programming on-the-go with TTLDE
C/C++:
Much more powerful and fast
More widespread language for other platforms
More reference material (the web's full of generic C help)
Ability to port C/C++ games to the PSP
OOP can be massively useful (c++ only)
It's what the cool people use :icon_wink

So there's my 2 cents/pence/rupees.

Just in case you're interested, this is how my programming progressed:
QBasic/Spectrum->Java->C++->C/C++
__________________
Developer of
Tipster Unzip/Unrar ThrottleX RoboTORN3D ODEPsp


Now, with the power of my PSP, I will finally RULE THE WORLD. Muhahahah.

Last edited by AnonymousTipster; 03-12-2006 at 07:11 AM..
AnonymousTipster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 08:19 AM   #15
Quality Haxing Since 1991
 
PSPHax0r9's Avatar
 
Join Date: Oct 2005
Location: Pennsylvania, USA Fi
Posts: 6,206
Trader Feedback: 0
Default

Quote:
Originally Posted by AnonymousTipster
Just in case you're interested, this is how my programming progressed:
QBasic/Spectrum->Java->C++->C/C++
? So you went from C++ to C/C++....

One thing to remember also, is if you want to program games or not. If you want to program a game and are just starting out, I would definitely recommend LUA. C/C++ has a lot of advantages, but it isn't as game-friendly as LUA is for beginners. If you're planning on making programs, LUA isn't the best language for that. If you're planning on making games and you're just starting otu, I would go with LUA. That way, if you want to make better games afterwards, it will be easier to learn C/C++

Also, one thing little OT, has anyone made a 3-D LUA game yet? I know that LUA has 3-D capabilities, but I don't remember a game ever being made in LUA that was 3-D.
__________________
Quote:
Originally Posted by Noriko
I would call you gay but I love you.


Wait ...huh.


PSPHax0r9 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 10:13 AM   #16

Developer
 
TheEmulatorGuy's Avatar
 
Join Date: Feb 2006
Location: Tauranga, New Zealand
Posts: 355
Trader Feedback: 0
Default

Here's a rundown of the two:

C++: Fast, but hard to use
Lua: Slow, but easy to use

If you want to gain respect, I'd suggest coding in C++.
TheEmulatorGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 10:13 AM   #17

Developer
 
AnonymousTipster's Avatar
 
Join Date: Jun 2005
Location: Under a Large rock called Fred
Posts: 693
Trader Feedback: 0
Default

Quote:
Originally Posted by PSPHax0r9
? So you went from C++ to C/C++....
Yes, I learnt C++, and all the quirks that C++ had were second nature to me when I used C, so it was easy for me to program C as well, but many people who learnt C find it hard to move to C++ as it's a little more restrictive.
__________________
Developer of
Tipster Unzip/Unrar ThrottleX RoboTORN3D ODEPsp


Now, with the power of my PSP, I will finally RULE THE WORLD. Muhahahah.
AnonymousTipster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 10:16 AM   #18
Quality Haxing Since 1991
 
PSPHax0r9's Avatar
 
Join Date: Oct 2005
Location: Pennsylvania, USA Fi
Posts: 6,206
Trader Feedback: 0
Default

Quote:
Originally Posted by TheEmulatorGuy
Here's a rundown of the two:

C++: Fast, but hard to use
Lua: Slow, but easy to use

If you want to gain respect, I'd suggest coding in C++.
Well...not exactly. You could get the same respect if you made a great LUA game. Like a 3-D LUA game. I don't think there's really that much of a "respect" difference there, unless you mean from other coders.
__________________
Quote:
Originally Posted by Noriko
I would call you gay but I love you.


Wait ...huh.


PSPHax0r9 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 10:39 AM   #19

Developer
 
Join Date: Feb 2006
Posts: 26
Trader Feedback: 0
Default

My coding background is C, and more recently I've been working in Java.

I first started coding for the PSP using C. I've recently switched to LUA because I can be way more productive in LUA than C. No compiling, and I don't have to copy the executable to the PSP to test, I can just test in the windows luaplayer.

The only reason I'd choose to write a game in C is if performance was a concern. I recently wrote a game proof-of-concept with loads of floating point ops which was unplayable in lua, but ran fine when I ported it to C.

Lee
fullerlee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 04:50 PM   #20
 
Devun_06's Avatar
 
Join Date: Feb 2006
Posts: 338
Trader Feedback: 0
Lightbulb

I believe LUA is more like a scripting language so if you're familiar with html or vbs and java I think you'll be okay with LUA. :mrgreen:

but ofcourse you'll find C++ to be a bit more complex and scary at first than you would LUA (for some people)

Last edited by Devun_06; 03-12-2006 at 04:54 PM..
Devun_06 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-12-2006, 05:11 PM   #21
 
Join Date: Jan 2006
Posts: 4,288
Trader Feedback: 0
Default

Quote:
Originally Posted by homer
I'd say go for C. It's quite simple and when you know it it's simple to just move to C++.
Agreed. He put it wonderfully. Honestly, I don't see how people say how C is difficult. They must have just not have ever used it, or be extremely slow.
soccerPMN is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2006, 09:06 AM   #22
 
Join Date: Jan 2006
Posts: 508
Trader Feedback: 0
Default

I'd say go for either language. C can seem hopelessly complex (writing a Hello World program in C is waaaay more complex than writing one in Lua. See this: PSP Programming Tutorials in Lua - Lesson One, Hello World ) but in the long run C/C++ is going to do you more good if you're going to get into programming as a career. It's the standard.

However, if you're impatient (don't want to screw around with programming environments, toolchains, etc) and want to get programs up and running right away, I'd go for Lua. Lua is really a capable language - people really underestimate it. It has a lot of stuff built into it so you can access the PSP filesystem, 3D/2D graphics, WiFi sockets, etc. With Lua Tables you can do full-on object oriented programming with classes and Inheritance - people think tables are arrays - they can be but then you aren't taking full advantage of them. I'm not saying that you can't do this stuff with C but it's alot easier doing it in Lua.

However with this ease of use there's also some serious deficiencies with Lua:
-can't launch eboots (for security reasons)
-graphics are a bit limited (images sizes of up to 512x512 pixels)
-3D functions are really poorly documented
-it's a bit slow
-cannot and will not ever play mp3s
matriculated is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2006, 10:00 AM   #23
 
jack_561's Avatar
 
Join Date: Jan 2006
Location: Peterlee, N-E UK
Posts: 399
Trader Feedback: 0
Default

Cheers for the help guys. Im going to follow Yeldarbs tutorials word for word then see how it goes from there.
jack_561 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2006, 10:09 AM   #24

Developer
 
TheEmulatorGuy's Avatar
 
Join Date: Feb 2006
Location: Tauranga, New Zealand
Posts: 355
Trader Feedback: 0
Default

Quote:
Originally Posted by PSPHax0r9
Well...not exactly. You could get the same respect if you made a great LUA game. Like a 3-D LUA game. I don't think there's really that much of a "respect" difference there, unless you mean from other coders.
I did mean other coders, Mr. Hack-Saw.
TheEmulatorGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
lua

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:26 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us